From 9c9460fab10385034f561f826c4f2cacca90abc5 Mon Sep 17 00:00:00 2001 From: Avris Date: Sun, 27 Jun 2021 12:36:29 +0200 Subject: [PATCH] [profile] badges for collective members --- assets/dark.scss | 2 +- assets/style.scss | 4 ++++ locale/de/translations.suml | 1 + locale/en/translations.suml | 3 ++- locale/es/translations.suml | 1 + locale/fr/translations.suml | 1 + locale/nl/translations.suml | 1 + locale/pl/translations.suml | 1 + locale/pt/translations.suml | 1 + locale/ru/translations.suml | 1 + locale/yi/translations.suml | 1 + locale/zh/translations.suml | 1 + routes/profile.vue | 8 +++++++- routes/team.vue | 2 +- server/routes/profile.js | 3 ++- 15 files changed, 26 insertions(+), 5 deletions(-) diff --git a/assets/dark.scss b/assets/dark.scss index ce8909b8..1189890b 100644 --- a/assets/dark.scss +++ b/assets/dark.scss @@ -210,7 +210,7 @@ body[data-theme="dark"] { } } - .icon, .revesible { + .icon, .reversible { filter: invert(1); } diff --git a/assets/style.scss b/assets/style.scss index 4557aab6..a60d6561 100644 --- a/assets/style.scss +++ b/assets/style.scss @@ -166,3 +166,7 @@ form[disabled] { margin-right: calc(-50vw + 50% + 3rem); } } + +.icon, .reversed { + filter: invert(1); +} diff --git a/locale/de/translations.suml b/locale/de/translations.suml index c0be5699..c2686bd5 100644 --- a/locale/de/translations.suml +++ b/locale/de/translations.suml @@ -319,6 +319,7 @@ contact: are created by the “Neutral Language Council” collective. logo: 'Logo of the collective is a combination of the transgender symbol and a speech bubble that symbolises language.' # TODO members: 'Current members' # TODO + member: 'Member of the collective' # TODO upcoming: 'Upcoming language versions' # TODO support: diff --git a/locale/en/translations.suml b/locale/en/translations.suml index 50855009..7e29f120 100644 --- a/locale/en/translations.suml +++ b/locale/en/translations.suml @@ -391,12 +391,13 @@ contact: authors: 'Authors of the website' team: name: 'The “Neutral Language Council” collective' - description: # TODO + description: - > {https://pronouns.page=Pronouns.page} and related initiatives are created by the “Neutral Language Council” collective. logo: 'Logo of the collective is a combination of the transgender symbol and a speech bubble that symbolises language.' members: 'Current members' + member: 'Member of the collective' upcoming: 'Upcoming language versions' support: diff --git a/locale/es/translations.suml b/locale/es/translations.suml index b7c90476..d0bef51a 100644 --- a/locale/es/translations.suml +++ b/locale/es/translations.suml @@ -328,6 +328,7 @@ contact: are created by the “Neutral Language Council” collective. logo: 'Logo of the collective is a combination of the transgender symbol and a speech bubble that symbolises language.' # TODO members: 'Current members' # TODO + member: 'Member of the collective' # TODO upcoming: 'Upcoming language versions' # TODO support: diff --git a/locale/fr/translations.suml b/locale/fr/translations.suml index 40d13409..59a5a529 100644 --- a/locale/fr/translations.suml +++ b/locale/fr/translations.suml @@ -317,6 +317,7 @@ contact: are created by the “Neutral Language Council” collective. logo: 'Logo of the collective is a combination of the transgender symbol and a speech bubble that symbolises language.' members: 'Current members' + member: 'Member of the collective' # TODO blog: 'Blog' upcoming: 'Upcoming language versions' diff --git a/locale/nl/translations.suml b/locale/nl/translations.suml index 4928bdeb..998b15a1 100644 --- a/locale/nl/translations.suml +++ b/locale/nl/translations.suml @@ -321,6 +321,7 @@ contact: zijn bedacht door het "Raad van Neutrale Taal" collectief. logo: 'Het logo van het collectief is een combinatie van het transgender symbool en een spraakballon dat taal symboliseert.' members: 'Huidige leden' + member: 'Member of the collective' # TODO blog: 'Blog' upcoming: 'Komende taalversies' diff --git a/locale/pl/translations.suml b/locale/pl/translations.suml index fe5c5b30..780e65e5 100644 --- a/locale/pl/translations.suml +++ b/locale/pl/translations.suml @@ -879,6 +879,7 @@ contact: są tworzone przez kolektyw „Rada Języka Neutralnego”. logo: 'Logo kolektywu to połączenie symbolu transpłciowości z chmurką dialogową symbolizującą język.' members: 'Obecny skład' + member: 'Osoba członkowska kolektywu' upcoming: 'Nadchodzące wersje językowe' support: diff --git a/locale/pt/translations.suml b/locale/pt/translations.suml index 499f6d73..7ebde15b 100644 --- a/locale/pt/translations.suml +++ b/locale/pt/translations.suml @@ -325,6 +325,7 @@ contact: são criadas pelo o coletivo “Conselho da Língua Neutra”. logo: 'A logo do coletivo é uma combinação do símbolo transgênero e um balão de fala que simboliza a língua.' # TODO members: 'Membres atuais' # TODO + member: 'Member of the collective' # TODO blog: 'Blog' # TODO upcoming: 'Próximas versões' # TODO diff --git a/locale/ru/translations.suml b/locale/ru/translations.suml index badd5933..8d4fd6f3 100644 --- a/locale/ru/translations.suml +++ b/locale/ru/translations.suml @@ -860,6 +860,7 @@ contact: są tworzone przez kolektyw „Rada Języka Neutralnego”. logo: 'Logo kolektywu to połączenie symbolu transpłciowości z chmurką dialogową symbolizującą język.' members: 'Obecny skład' + member: 'Member of the collective' # TODO blog: 'Blog' upcoming: 'Nadchodzące wersje językowe' diff --git a/locale/yi/translations.suml b/locale/yi/translations.suml index dca14cb6..abe3ce70 100644 --- a/locale/yi/translations.suml +++ b/locale/yi/translations.suml @@ -339,6 +339,7 @@ contact: are created by the “Neutral Language Council” collective. logo: 'Logo of the collective is a combination of the transgender symbol and a speech bubble that symbolises language.' # TODO members: 'Current members' # TODO + member: 'Member of the collective' # TODO blog: 'Blog' # TODO upcoming: 'Upcoming language versions' # TODO diff --git a/locale/zh/translations.suml b/locale/zh/translations.suml index c0cbf85c..32d6c587 100644 --- a/locale/zh/translations.suml +++ b/locale/zh/translations.suml @@ -307,6 +307,7 @@ contact: 由“中立語推行委員會”集體創建。 logo: '集體的標誌是跨性別符號和象徵語言的講話泡泡的結合。​​' # TODO members: '份子' # TODO + member: 'Member of the collective' # TODO blog: '博客' upcoming: '即將到來語言文本' # TODO diff --git a/routes/profile.vue b/routes/profile.vue index 1d3f8dc8..befe8b8d 100644 --- a/routes/profile.vue +++ b/routes/profile.vue @@ -46,7 +46,13 @@ -
+
+

+ + + contact.team.member + +

diff --git a/routes/team.vue b/routes/team.vue index 58f67ca2..007f8b92 100644 --- a/routes/team.vue +++ b/routes/team.vue @@ -6,7 +6,7 @@
- +

contact.team.logo

diff --git a/server/routes/profile.js b/server/routes/profile.js index 354f0e08..61d3ae29 100644 --- a/server/routes/profile.js +++ b/server/routes/profile.js @@ -26,7 +26,7 @@ const calcAge = birthday => { const fetchProfiles = async (db, username, self, isAdmin) => { const profiles = await db.all(SQL` - SELECT profiles.*, users.id, users.username, users.email, users.avatarSource, users.bannedReason FROM profiles LEFT JOIN users on users.id == profiles.userId + SELECT profiles.*, users.id, users.username, users.email, users.avatarSource, users.bannedReason, users.roles FROM profiles LEFT JOIN users on users.id == profiles.userId WHERE lower(trim(replace(replace(replace(replace(replace(replace(replace(replace(replace(username, 'Ą', 'ą'), 'Ć', 'ć'), 'Ę', 'ę'), 'Ł', 'ł'), 'Ń', 'ń'), 'Ó', 'ó'), 'Ś', 'ś'), 'Ż', 'ż'), 'Ź', 'ż'))) = ${normalise(username)} AND profiles.active = 1 ORDER BY profiles.locale @@ -56,6 +56,7 @@ const fetchProfiles = async (db, username, self, isAdmin) => { footerName: profile.footerName, footerAreas: profile.footerAreas ? profile.footerAreas.split(',') : [], bannedReason: profile.bannedReason, + team: !!profile.roles, }; } return p;