diff --git a/components/Flag.vue b/components/Flag.vue
index 068828fd..f76482bd 100644
--- a/components/Flag.vue
+++ b/components/Flag.vue
@@ -2,14 +2,18 @@
-
+
-
+
+
+
+ profile.flagsCustomWarning
+
@@ -21,6 +25,7 @@
alt: { required: true },
img: { required: true },
terms: { },
+ custom: { type: Boolean },
},
computed: {
link() {
@@ -57,6 +62,9 @@
left: 0;
z-index: 999;
display: none;
+ img {
+ max-height: 128px;
+ }
}
&:hover {
diff --git a/components/ImageThumb.vue b/components/ImageThumb.vue
index 31c97b5f..9c95ae3a 100644
--- a/components/ImageThumb.vue
+++ b/components/ImageThumb.vue
@@ -1,8 +1,8 @@
-
-
+
@@ -10,11 +10,9 @@
export default {
props: {
id: {required: true},
- },
- methods: {
- getUrl(size) {
- return `${process.env.BUCKET}/images/${this.id}-${size}.png`;
- },
+ smallSize: {'default': 'thumb'},
+ bigSize: {'default': 'big'},
+ size: {'default': 'auto'}
},
}
diff --git a/components/ImageWidgetRich.vue b/components/ImageWidgetRich.vue
new file mode 100644
index 00000000..dd866318
--- /dev/null
+++ b/components/ImageWidgetRich.vue
@@ -0,0 +1,82 @@
+
+
+
+
+
diff --git a/locale/de/translations.suml b/locale/de/translations.suml
index 134931bd..c660c7dc 100644
--- a/locale/de/translations.suml
+++ b/locale/de/translations.suml
@@ -384,6 +384,8 @@ profile:
birthdayInfo: 'Wir veröffentlichen nicht dein Geburtstag, sondern nur das errechnete Alter.'
flags: 'Flaggen'
flagsInfo: 'Ziehe deine Pride Flaggen per drag & drop in diesen Rahmen.'
+ flagsCustom: 'Upload custom flags' # TODO
+ flagsCustomWarning: 'This flag has been uploaded by a user. The team of pronouns.page is not responsible for it.' # TODO
links: 'Links'
column: 'Spalte'
@@ -402,6 +404,14 @@ profile:
meh: 'Okay'
no: 'Nope'
+# TODO
+# banner: >
+# You can also use our website to create a card, {/@andrea=like this one},
+# containing your names, pronouns, pride flags, liked words, etc.
+# Then you can link to it in your bio or email footer.
+# Just create an account {/account=here}.
+# bannerButton: 'Create a card'
+
share: 'Teilen'
crud:
diff --git a/locale/en/translations.suml b/locale/en/translations.suml
index 4d54b0b8..cfecda62 100644
--- a/locale/en/translations.suml
+++ b/locale/en/translations.suml
@@ -293,17 +293,6 @@ faq:
Nonbinary folks can use binary pronouns, some lesbians use {/he=he/him} for cultural reasons, etc.
- >
Simply say “pronouns”.
- add-flags:
- question: 'My flag is not in the editor. Can you add it?'
- answer:
- - >
- To avoid potential vandalisms (flags of attack helicopters, MAPs, TERFs, etc.)
- we've decided not to allow uploading your own pictures to the flags editor.
- But we do offer a choice from a pretty long list of more popular flags
- – unfortunately that requires us to make a subjective choice.
- - >
- You can try using the closest matching flag you identify with instead.
- And in the “description” field you can just write anything you want.
links:
header: 'Links'
@@ -397,6 +386,8 @@ profile:
birthdayInfo: 'We do not publish your birthday, just the calculated age.'
flags: 'Flags'
flagsInfo: 'Drag & drop your pride flags into this frame.'
+ flagsCustom: 'Upload custom flags'
+ flagsCustomWarning: 'This flag has been uploaded by a user. The team of pronouns.page is not responsible for it.'
links: 'Links'
column: 'Column'
diff --git a/locale/es/translations.suml b/locale/es/translations.suml
index 190ae227..73013c13 100644
--- a/locale/es/translations.suml
+++ b/locale/es/translations.suml
@@ -393,6 +393,8 @@ profile:
birthdayInfo: 'No publicamos la fecha de tu cumpleaños, sólo la edad calculada.'
flags: 'Banderas'
flagsInfo: 'Arrastra tus banderas de orgullo a este marco.'
+ flagsCustom: 'Upload custom flags' # TODO
+ flagsCustomWarning: 'This flag has been uploaded by a user. The team of pronouns.page is not responsible for it.' # TODO
links: 'Enlaces'
column: 'Columna'
@@ -411,6 +413,14 @@ profile:
meh: 'Okey'
no: 'No'
+# TODO
+# banner: >
+# You can also use our website to create a card, {/@andrea=like this one},
+# containing your names, pronouns, pride flags, liked words, etc.
+# Then you can link to it in your bio or email footer.
+# Just create an account {/account=here}.
+# bannerButton: 'Create a card'
+
share: 'Compartir'
crud:
diff --git a/locale/nl/translations.suml b/locale/nl/translations.suml
index 3d9381c0..0ad4cb69 100644
--- a/locale/nl/translations.suml
+++ b/locale/nl/translations.suml
@@ -386,6 +386,8 @@ profile:
birthdayInfo: 'We laten jouw verjaardagsdatum niet zien, alleen de berekende leeftijd.'
flags: 'Vlaggen'
flagsInfo: 'Klik en sleep jouw pridevlaggen naar deze frame.'
+ flagsCustom: 'Upload custom flags' # TODO
+ flagsCustomWarning: 'This flag has been uploaded by a user. The team of pronouns.page is not responsible for it.' # TODO
links: 'Links'
column: 'Kolom'
@@ -404,6 +406,14 @@ profile:
meh: 'Oké'
no: 'Nee'
+# TODO
+# banner: >
+# You can also use our website to create a card, {/@andrea=like this one},
+# containing your names, pronouns, pride flags, liked words, etc.
+# Then you can link to it in your bio or email footer.
+# Just create an account {/account=here}.
+# bannerButton: 'Create a card'
+
share: 'Deel'
crud:
diff --git a/locale/pl/translations.suml b/locale/pl/translations.suml
index cb796435..61698daa 100644
--- a/locale/pl/translations.suml
+++ b/locale/pl/translations.suml
@@ -767,19 +767,6 @@ faq:
niektóre lesbijki ze względów kulturowych i historycznych używają form męskich, itp.
- >
Mów po prostu „zaimki”. To prościej i sensowniej.
- moja-flaga:
- question: 'Mojej flagi nie ma w edytorze wizytówki'
- answer:
- - >
- Aby uniknąć potencjalnych wandalizmów
- (flaga helikopterów szturmowych, MAPów, TERFów, itp.),
- zdecydowałośmy się nie umożliwiać wgrywania własnych obrazków na stronę.
- Oferujemy natomiast wybór spośród dość bogatej listy co popularniejszych flag
- – niestety siłą rzeczy musi być to wybór subiektywny.
- - >
- Możesz spróbować wybrać najbliższą pasującą flagę, z którą się identyfikujesz.
- No i zawsze w polu „opis” możesz wpisać, co tylko ci się podoba.
-
a-moj-dziadek:
question: 'Czy po to mój dziadek walczył na wojnie, by teraz ktoś mówił o sobie „ono”?'
answer:
@@ -942,6 +929,8 @@ profile:
flagsInfo: >
Przeciągnij swoje pride''owe flagi do poniższej ramki.
Więcej informacji o etykietkach znajdziesz w naszym Słowniku Terminologii Queerowej.
+ flagsCustom: 'Dodaj inne flagi'
+ flagsCustomWarning: 'Ta flaga została wgrana przez osobę użytkującą. Ekipa zaimki.pl nie jest za nią odpowiedzialna.'
links: 'Linki'
column: 'Kolumna'
diff --git a/locale/pt/translations.suml b/locale/pt/translations.suml
index aeecb586..bcd98eb6 100644
--- a/locale/pt/translations.suml
+++ b/locale/pt/translations.suml
@@ -390,6 +390,8 @@ profile:
birthdayInfo: 'Não publicamos a data do aniversário, somente a idade calculada.'
flags: 'Bandeiras'
flagsInfo: 'Arrasta as bandeiras de orgulho a esse marco.'
+ flagsCustom: 'Upload custom flags' # TODO
+ flagsCustomWarning: 'This flag has been uploaded by a user. The team of pronouns.page is not responsible for it.' # TODO
links: 'Enlaces'
column: 'Coluna'
@@ -408,6 +410,14 @@ profile:
meh: 'OK'
no: 'Não'
+# TODO
+# banner: >
+# You can also use our website to create a card, {/@andrea=like this one},
+# containing your names, pronouns, pride flags, liked words, etc.
+# Then you can link to it in your bio or email footer.
+# Just create an account {/account=here}.
+# bannerButton: 'Create a card'
+
share: 'Compartilhar'
crud:
diff --git a/locale/ru/translations.suml b/locale/ru/translations.suml
index a4a91d95..aa893584 100644
--- a/locale/ru/translations.suml
+++ b/locale/ru/translations.suml
@@ -925,6 +925,8 @@ profile:
birthdayInfo: 'Nie pokazujemy publicznie pełnej daty urodzenia, jedynie obliczony wiek.'
flags: 'Flagi'
flagsInfo: 'Przeciągnij swoje pride''owe flagi do poniższej ramki.'
+ flagsCustom: 'Upload custom flags' # TODO
+ flagsCustomWarning: 'This flag has been uploaded by a user. The team of pronouns.page is not responsible for it.' # TODO
links: 'Linki'
column: 'Kolumna'
@@ -943,6 +945,14 @@ profile:
meh: 'Spoko'
no: 'Nie'
+# TODO
+# banner: >
+# You can also use our website to create a card, {/@andrea=like this one},
+# containing your names, pronouns, pride flags, liked words, etc.
+# Then you can link to it in your bio or email footer.
+# Just create an account {/account=here}.
+# bannerButton: 'Create a card'
+
census:
header: 'Spis'
headerLong: 'Niebinarny spis powszechny'
diff --git a/locale/yi/translations.suml b/locale/yi/translations.suml
index f9e2fc80..ea68e547 100644
--- a/locale/yi/translations.suml
+++ b/locale/yi/translations.suml
@@ -404,6 +404,8 @@ profile:
birthdayInfo: 'We do not publish your birthday, just the calculated age.'
flags: 'פֿענער'
flagsInfo: 'Drag & drop your pride flags into this frame.'
+ flagsCustom: 'Upload custom flags' # TODO
+ flagsCustomWarning: 'This flag has been uploaded by a user. The team of pronouns.page is not responsible for it.' # TODO
links: 'פֿאַרבינדונגען'
column: 'Column'
@@ -422,6 +424,14 @@ profile:
meh: 'אָקײ'
no: 'נײן'
+# TODO
+# banner: >
+# You can also use our website to create a card, {/@andrea=like this one},
+# containing your names, pronouns, pride flags, liked words, etc.
+# Then you can link to it in your bio or email footer.
+# Just create an account {/account=here}.
+# bannerButton: 'Create a card'
+
share: 'Share'
crud:
diff --git a/locale/zh/translations.suml b/locale/zh/translations.suml
index 4c049f0b..d2be2330 100644
--- a/locale/zh/translations.suml
+++ b/locale/zh/translations.suml
@@ -371,6 +371,8 @@ profile:
birthdayInfo: '我們不發布您的生日,只發布計算出的年齡。'
flags: '旗幟'
flagsInfo: '將您的驕傲旗幟拖放到此框架中.'
+ flagsCustom: 'Upload custom flags' # TODO
+ flagsCustomWarning: 'This flag has been uploaded by a user. The team of pronouns.page is not responsible for it.' # TODO
links: '鏈接'
column: '列'
@@ -389,6 +391,14 @@ profile:
meh: 'OK'
no: '不好'
+# TODO
+# banner: >
+# You can also use our website to create a card, {/@andrea=like this one},
+# containing your names, pronouns, pride flags, liked words, etc.
+# Then you can link to it in your bio or email footer.
+# Just create an account {/account=here}.
+# bannerButton: 'Create a card'
+
share: '這裡'
crud:
diff --git a/migrations/023-custom-flags.sql b/migrations/023-custom-flags.sql
new file mode 100644
index 00000000..0864e0e8
--- /dev/null
+++ b/migrations/023-custom-flags.sql
@@ -0,0 +1,5 @@
+-- Up
+
+ALTER TABLE profiles ADD COLUMN customFlags TEXT NOT NULL DEFAULT '{}';
+
+-- Down
diff --git a/routes/profile.vue b/routes/profile.vue
index f1adeffd..e2e8dcf4 100644
--- a/routes/profile.vue
+++ b/routes/profile.vue
@@ -44,7 +44,17 @@
diff --git a/routes/profileEditor.vue b/routes/profileEditor.vue
index 0f3a3a94..45213d10 100644
--- a/routes/profileEditor.vue
+++ b/routes/profileEditor.vue
@@ -96,6 +96,15 @@
+
+
+ profile.flagsCustom
+
+
+
+
+
+
@@ -178,6 +187,7 @@
birthday: profile.birthday,
links: Object.keys(profile.links).length ? profile.links : [],
flags: profile.flags,
+ customFlags: profile.customFlags,
words: profile.words.map(x => dictToList(x)),
teamName: profile.teamName,
footerName: profile.footerName,
@@ -198,6 +208,7 @@
birthday: profile.birthday,
links: Object.keys(profile.links).length ? profile.links : [],
flags: profile.flags.filter(f => !f.startsWith('-')),
+ customFlags: profile.customFlags,
words: defaultWords,
teamName: profile.teamName,
footerName: profile.footerName,
@@ -212,6 +223,7 @@
birthday: null,
links: [],
flags: [],
+ customFlags: {},
words: defaultWords,
teamName: '',
footerName: '',
@@ -234,6 +246,7 @@
birthday: this.birthday,
links: [...this.links],
flags: [...this.flags],
+ customFlags: {...this.customFlags},
words: this.words.map(x => listToDict(x)),
teamName: this.teamName,
footerName: this.footerName,
diff --git a/server/routes/images.js b/server/routes/images.js
index 8575bf94..5cabf144 100644
--- a/server/routes/images.js
+++ b/server/routes/images.js
@@ -8,6 +8,7 @@ import S3 from 'aws-sdk/clients/s3';
const sizes = {
big: [1600, false],
+ flag: [256, false],
thumb: [240, true],
}
diff --git a/server/routes/profile.js b/server/routes/profile.js
index ea695ff8..e5210a2e 100644
--- a/server/routes/profile.js
+++ b/server/routes/profile.js
@@ -44,6 +44,7 @@ const fetchProfiles = async (db, username, self) => {
age: calcAge(profile.birthday),
links: JSON.parse(profile.links),
flags: JSON.parse(profile.flags),
+ customFlags: JSON.parse(profile.customFlags),
words: JSON.parse(profile.words),
avatar: await avatar(db, profile),
birthday: self ? profile.birthday : undefined,
@@ -67,9 +68,9 @@ router.post('/profile/save', async (req, res) => {
}
await req.db.get(SQL`DELETE FROM profiles WHERE userId = ${req.user.id} AND locale = ${req.config.locale}`);
- await req.db.get(SQL`INSERT INTO profiles (id, userId, locale, names, pronouns, description, birthday, links, flags, words, active, teamName, footerName, footerAreas)
+ await req.db.get(SQL`INSERT INTO profiles (id, userId, locale, names, pronouns, description, birthday, links, flags, customFlags, words, active, teamName, footerName, footerAreas)
VALUES (${ulid()}, ${req.user.id}, ${req.config.locale}, ${JSON.stringify(req.body.names)}, ${JSON.stringify(req.body.pronouns)},
- ${req.body.description}, ${req.body.birthday || null}, ${JSON.stringify(req.body.links.filter(x => !!x))}, ${JSON.stringify(req.body.flags)},
+ ${req.body.description}, ${req.body.birthday || null}, ${JSON.stringify(req.body.links.filter(x => !!x))}, ${JSON.stringify(req.body.flags)}, ${JSON.stringify(req.body.customFlags)},
${JSON.stringify(req.body.words)}, 1,
${req.isGranted('users') ? req.body.teamName || null : ''},
${req.isGranted('users') ? req.body.footerName || null : ''},