Merge branch 'main' into legal

This commit is contained in:
Andrea Vos 2021-09-08 23:07:35 +02:00
commit 4df1fb293e
19 changed files with 76 additions and 144 deletions

View File

@ -59,7 +59,7 @@
<div class="input-group mb-3"> <div class="input-group mb-3">
<input type="text" class="form-control" v-model="username" <input type="text" class="form-control" v-model="username"
required minlength="4" maxlength="16"/> required minlength="4" maxlength="16"/>
<button class="btn btn-outline-primary"> <button class="btn btn-outline-primary" :disabled="username === user.username">
<T>user.account.changeUsername.action</T> <T>user.account.changeUsername.action</T>
</button> </button>
</div> </div>
@ -148,6 +148,7 @@
import {socialProviders} from "../src/data"; import {socialProviders} from "../src/data";
import {gravatar} from "../src/helpers"; import {gravatar} from "../src/helpers";
import cookieSettings from "../src/cookieSettings"; import cookieSettings from "../src/cookieSettings";
import {mapState} from "vuex";
export default { export default {
data() { data() {
@ -284,6 +285,9 @@
}, },
}, },
computed: { computed: {
...mapState([
'user',
]),
canChangeEmail() { canChangeEmail() {
return this.email && this.captchaToken; return this.email && this.captchaToken;
} }

View File

@ -3,7 +3,7 @@
{name: 'links.links', route: config.links.route, icon: 'bookmark', condition: config.links.links.length > 0}, {name: 'links.links', route: config.links.route, icon: 'bookmark', condition: config.links.links.length > 0},
{name: 'links.academic', route: config.links.academicRoute, icon: 'vial', condition: config.links.academic.length > 0}, {name: 'links.academic', route: config.links.academicRoute, icon: 'vial', condition: config.links.academic.length > 0},
{name: 'links.blog', route: config.links.blogRoute, icon: 'pen-nib', condition: config.links.blog}, {name: 'links.blog', route: config.links.blogRoute, icon: 'pen-nib', condition: config.links.blog},
{name: 'links.media', route: config.links.mediaRoute, icon: 'tv', condition: config.links.mediaGuests.length || config.links.mediaMentions.length > 0}, {name: 'links.media', route: config.links.mediaRoute, icon: 'tv', condition: config.links.mediaGuests.length > 0 || config.links.mediaMentions.length > 0},
{name: 'faq.header', route: config.faq.route, icon: 'map-marker-question', condition: config.faq.enabled}, {name: 'faq.header', route: config.faq.route, icon: 'map-marker-question', condition: config.faq.enabled},
{name: 'english.header', route: config.english.route, icon: 'globe-americas', condition: config.english.enabled}, {name: 'english.header', route: config.english.route, icon: 'globe-americas', condition: config.english.enabled},
]"/> ]"/>

View File

@ -6,7 +6,7 @@
</h3> </h3>
<p><T>support.description</T></p> <p><T>support.description</T></p>
<p> <p>
<a v-for="link in config.support.links" :key="link.url" <a v-for="link in [...links, ...config.support.links]" :key="link.url"
:href="link.url" target="_blank" rel="noopener" :href="link.url" target="_blank" rel="noopener"
class="btn btn-outline-primary border m-1"> class="btn btn-outline-primary border m-1">
<Icon :v="link.icon" :set="link.iconSet || 'l'"/> <Icon :v="link.icon" :set="link.iconSet || 'l'"/>
@ -15,3 +15,17 @@
</p> </p>
</section> </section>
</template> </template>
<script>
export default {
data() {
return {
links: [
{headline: 'Ko-Fi', url: 'https://ko-fi.com/radajezykaneutralnego', icon: 'coffee', },
{headline: 'PayPal', url: 'https://paypal.me/RJNeutralnego', icon: 'paypal', iconSet: 'b'},
{headline: 'BTC', url: 'https://www.blockchain.com/btc/address/1GFVeVZfYtPqDMAoCwK8WT2C4HjwiGxXS1', icon: 'bitcoin', iconSet: 'b'},
]
}
}
}
</script>

View File

@ -1,13 +1,16 @@
<template> <template>
<div> <div>
<p> <p v-for="(p, i) in term.definition.split('\n\n')">
<template v-if="i === 0">
<span v-if="term.key && $isGranted('terms')" class="badge bg-primary text-white"> <span v-if="term.key && $isGranted('terms')" class="badge bg-primary text-white">
<T>sources.submit.key</T>: <T>sources.submit.key</T>:
{{term.key}} {{term.key}}
</span> </span>
<strong><LinkedTextMultiple :texts="term.term" noicons/></strong> <strong><LinkedTextMultiple :texts="term.term" noicons/></strong>
<span v-if="term.original.length">(<LinkedTextMultiple :texts="term.original" glue="; " noicons/>)</span> <span v-if="term.original.length">(<LinkedTextMultiple :texts="term.original" glue="; " noicons/>)</span>
<LinkedText :text="term.definition" noicons/>
</template>
<LinkedText :text="p" noicons/>
</p> </p>
<ul class="list-inline"> <ul class="list-inline">

View File

@ -132,16 +132,7 @@ contact:
support: support:
enabled: true enabled: true
links: links: []
-
icon: 'coffee'
url: 'https://ko-fi.com/radajezykaneutralnego'
headline: 'Ko-Fi'
-
icon: 'paypal'
iconSet: 'b'
url: 'https://paypal.me/RJNeutralnego'
headline: 'PayPal'
user: user:
enabled: true enabled: true

View File

@ -4,21 +4,7 @@
We are a queer collective. All of us know perfectly well what it's like to have our identities We are a queer collective. All of us know perfectly well what it's like to have our identities
questioned, ridiculed and invalidated. And we definitely don't want to make our queer siblings suffer the same. questioned, ridiculed and invalidated. And we definitely don't want to make our queer siblings suffer the same.
That's why we're inclusive. When we say ACAB*, that also includes the _identity police_. That's why we're inclusive.
<p class="small">
* If you have a problem with us saying ACAB,
please <a href="https://en.wikipedia.org/wiki/ACAB" target="_blank" rel="noopener">learn its history</a>,
it originated in the 1920s in the UK and doesn't have to have anything to do with your US-centric view of the world.
It feels really sad to see it taken over by US-centric perspective and be gatekept from using it.
The US isn't the only country in the world, connotations of words and phrases might differ vastly.
We're predominantly based in Poland (although we do have members abroad too, including POC)
where queers regularly suffer at the hands of the cops.
The police here don't need any Black people around to be bastards towards the minorities.
Please be assured that we're wholeheartedly supporting the fight for racial equality everywhere in the world.
Our use of ACAB isn't meant to compare our experiences in any way or to diminish the struggle od BIPOC.
The only people it's supposed to target are the cops abusing their power for whatever reason.
</p>
Our team of volunteers creates (among many other things we do) a tool to create a card where you can present Our team of volunteers creates (among many other things we do) a tool to create a card where you can present
your pronouns, names, identities and more. your pronouns, names, identities and more.

View File

@ -224,16 +224,7 @@ contact:
support: support:
enabled: true enabled: true
links: links: []
-
icon: 'coffee'
url: 'https://ko-fi.com/radajezykaneutralnego'
headline: 'Ko-Fi'
-
icon: 'paypal'
iconSet: 'b'
url: 'https://paypal.me/RJNeutralnego'
headline: 'PayPal'
user: user:
enabled: true enabled: true

View File

@ -139,16 +139,7 @@ contact:
support: support:
enabled: true enabled: true
links: links: []
-
icon: 'coffee'
url: 'https://ko-fi.com/radajezykaneutralnego'
headline: 'Ko-Fi'
-
icon: 'paypal'
iconSet: 'b'
url: 'https://paypal.me/RJNeutralnego'
headline: 'PayPal'
user: user:
enabled: true enabled: true

View File

@ -113,16 +113,7 @@ contact:
support: support:
enabled: true enabled: true
links: links: []
-
icon: 'coffee'
url: 'https://ko-fi.com/radajezykaneutralnego'
headline: 'Ko-Fi'
-
icon: 'paypal'
iconSet: 'b'
url: 'https://paypal.me/RJNeutralnego'
headline: 'PayPal'
user: user:
enabled: true enabled: true

View File

@ -114,16 +114,7 @@ contact:
support: support:
enabled: true enabled: true
links: links: []
-
icon: 'coffee'
url: 'https://ko-fi.com/radajezykaneutralnego'
headline: 'Ko-Fi'
-
icon: 'paypal'
iconSet: 'b'
url: 'https://paypal.me/RJNeutralnego'
headline: 'PayPal'
user: user:
enabled: true enabled: true

View File

@ -116,16 +116,7 @@ contact:
support: support:
enabled: true enabled: true
links: links: []
-
icon: 'coffee'
url: 'https://ko-fi.com/radajezykaneutralnego'
headline: 'Ko-Fi'
-
icon: 'paypal'
iconSet: 'b'
url: 'https://paypal.me/RJNeutralnego'
headline: 'PayPal'
user: user:
enabled: true enabled: true

View File

@ -77,7 +77,7 @@ ale dają pojęcie, jak bardzo urosła w społeczeństwie świadomość niebinar
Pojedyncze wpisy pojawiają się już od 1795 roku, natomiast w ostatnich latach liczba tekstów drastycznie szybuje w górę, Pojedyncze wpisy pojawiają się już od 1795 roku, natomiast w ostatnich latach liczba tekstów drastycznie szybuje w górę,
do niemal stu rocznie w 2021! do niemal stu rocznie w 2021!
![Wykres opisany powyżej](/img-local/korpus-wykres.png) ![Wykres opisany powyżej](/img-local/blog/korpus-wykres.png)
Osoby niebinarne mają potrzebę dostosować swój język do swojej tożsamości. Osoby niebinarne mają potrzebę dostosować swój język do swojej tożsamości.
A społeczeństwo zaskakująco szybko zdaje się tę potrzebę zaczynać dostrzegać i respektować. A społeczeństwo zaskakująco szybko zdaje się tę potrzebę zaczynać dostrzegać i respektować.

View File

@ -862,6 +862,11 @@ links:
rodzajów męskiego i żeńskiego wynika z nieuświadomionej przemocy względem osób niebinarnych. rodzajów męskiego i żeńskiego wynika z nieuświadomionej przemocy względem osób niebinarnych.
Zwalczyć ją ma oswojenie społeczeństwa z wykwitem „aktywiszczy” i „partnerszczy”, Zwalczyć ją ma oswojenie społeczeństwa z wykwitem „aktywiszczy” i „partnerszczy”,
oraz zaszczepienie wrażliwości na „misgendering”, czyli używanie „niewłaściwych” zaimków. oraz zaszczepienie wrażliwości na „misgendering”, czyli używanie „niewłaściwych” zaimków.
-
icon: 'b:facebook'
url: 'https://www.facebook.com/MexicoMagicoBlog/posts/238339054965464'
headline: 'No soy tu “compañera”, soy tu “compañere” \[…]'
extra: ' <strong>Mexico Magico Blog</strong>'
socials: socials:
- -
icon: 'twitter' icon: 'twitter'
@ -1033,16 +1038,7 @@ contact:
support: support:
enabled: true enabled: true
links: links: []
-
icon: 'coffee'
url: 'https://ko-fi.com/radajezykaneutralnego'
headline: 'Ko-Fi'
-
icon: 'paypal'
iconSet: 'b'
url: 'https://paypal.me/RJNeutralnego'
headline: 'PayPal'
user: user:
enabled: true enabled: true

View File

@ -570,7 +570,7 @@ faq:
Dziś feminatywy są używane coraz częściej, i mało kogo jeszcze dziwią czy bulwersują. Dziś feminatywy są używane coraz częściej, i mało kogo jeszcze dziwią czy bulwersują.
Z neutratywami i niebinarnymi formami językowymi może być podobnie. Z neutratywami i niebinarnymi formami językowymi może być podobnie.
- > - >
Język jest żywy. Ewoluuje i dostosuje się do zmieniających się potrzeb jego użytkowników. Język jest żywy. Ewoluuje i dostosuje się do zmieniających się potrzeb osób go używających.
Język nie jest danym z niebios magicznym przykazaniem wyrytym w kamieniu Język nie jest danym z niebios magicznym przykazaniem wyrytym w kamieniu
jest jedynie narzędziem do porozumiewania się. jest jedynie narzędziem do porozumiewania się.
Może, powinien, i będzie się zmieniał czy tego chcesz czy nie. Może, powinien, i będzie się zmieniał czy tego chcesz czy nie.
@ -991,10 +991,10 @@ user:
headerLong: 'Twoje konto' headerLong: 'Twoje konto'
tokenExpired: 'Sesja wygasła. Odśwież stronę i spróbuj ponownie.' tokenExpired: 'Sesja wygasła. Odśwież stronę i spróbuj ponownie.'
login: login:
placeholder: 'Email (lub nazwa użytkownika, jeśli już posiadasz konto)' placeholder: 'Email (lub nazwa użytkownicza, jeśli już posiadasz konto)'
action: 'Zaloguj' action: 'Zaloguj'
emailSent: 'Na Twój adres wysłałośmy email z sześciocyfrowym kodem. Wpisz go poniżej. Kod jest jednorazowy i ważny przez 15 minut.' emailSent: 'Na Twój adres wysłałośmy email z sześciocyfrowym kodem. Wpisz go poniżej. Kod jest jednorazowy i ważny przez 15 minut.'
userNotFound: 'Użytkownik nie został znaleziony.' userNotFound: 'Konto nie zostało znalezione.'
email: email:
subject: 'Twój kod logowania to %code%' subject: 'Twój kod logowania to %code%'
content: | content: |
@ -1009,10 +1009,10 @@ user:
invalid: 'Kod nieprawidłowy.' invalid: 'Kod nieprawidłowy.'
account: account:
changeUsername: changeUsername:
header: 'Nazwa użytkownika' header: 'Nazwa użytkownicza'
action: 'Zmień' action: 'Zmień'
invalid: 'Nazwa użytkownika musi mieć od 4 do 16 znaków i zawierać wyłącznie cyfry, litery, kropkę, myślnik i podłogę.' invalid: 'Nazwa użytkownicza musi mieć od 4 do 16 znaków i zawierać wyłącznie cyfry, litery, kropkę, myślnik i podłogę.'
taken: 'Ta nazwa użytkownika jest zajęta.' taken: 'Ta nazwa użytkownicza jest zajęta.'
changeEmail: changeEmail:
header: 'Adres email' header: 'Adres email'
action: 'Zmień' action: 'Zmień'
@ -1379,7 +1379,7 @@ calendar:
nonbinary_parents_day: '{https://www.familyequality.org/2021/04/16/celebrating-nonbinary-parents-day-with-founder-johnny-blazes/=Dzień Rodzicielstwa Osób Niebinarnych}' nonbinary_parents_day: '{https://www.familyequality.org/2021/04/16/celebrating-nonbinary-parents-day-with-founder-johnny-blazes/=Dzień Rodzicielstwa Osób Niebinarnych}'
trans_prisoner: '{https://transprisoners.net/about/=Dzień Solidarności z Uwięzionymi Osobami Trans}' trans_prisoner: '{https://transprisoners.net/about/=Dzień Solidarności z Uwięzionymi Osobami Trans}'
xenogender_day: 'Dzień Widoczności {/terminologia#ksenopłciowość=Osób Ksenopłciowych}' xenogender_day: 'Dzień Widoczności {/terminologia#ksenopłciowość=Osób Ksenopłciowych}'
banner: 'Obchodzimy właśnie' banner: 'Dziś w kalendarzu'
image: image:
header: 'Ściągnij w formie obrazka' header: 'Ściągnij w formie obrazka'
overview: 'Przegląd' overview: 'Przegląd'

View File

@ -109,16 +109,7 @@ contact:
support: support:
enabled: true enabled: true
links: links: []
-
icon: 'coffee'
url: 'https://ko-fi.com/radajezykaneutralnego'
headline: 'Ko-Fi'
-
icon: 'paypal'
iconSet: 'b'
url: 'https://paypal.me/RJNeutralnego'
headline: 'PayPal'
user: user:
enabled: true enabled: true

View File

@ -189,16 +189,7 @@ contact:
support: support:
enabled: true enabled: true
links: links: []
-
icon: 'coffee'
url: 'https://ko-fi.com/radajezykaneutralnego'
headline: 'Ko-Fi'
-
icon: 'paypal'
iconSet: 'b'
url: 'https://paypal.me/RJNeutralnego'
headline: 'PayPal'
user: user:
enabled: true enabled: true

View File

@ -120,16 +120,7 @@ contact:
support: support:
enabled: true enabled: true
links: links: []
-
icon: 'coffee'
url: 'https://ko-fi.com/radajezykaneutralnego'
headline: 'Ko-Fi'
-
icon: 'paypal'
iconSet: 'b'
url: 'https://paypal.me/RJNeutralnego'
headline: 'PayPal'
user: user:
enabled: true enabled: true

View File

@ -19,28 +19,38 @@ const approve = async (db, id) => {
`); `);
} }
const linkOtherVersions = async (req, sources) => { const keyGetMain = (key) => {
const keys = new Set(sources.filter(s => !!s && s.key).map(s => `'` + clearKey(s.key) + `'`)); return key.split('/')[0];
}
const otherVersions = await req.db.all(SQL` const linkOtherVersions = async (req, sources) => {
const keys = new Set(sources.filter(s => !!s && s.key).map(s => keyGetMain(clearKey(s.key))));
let sql = SQL`
SELECT s.*, u.username AS submitter FROM sources s SELECT s.*, u.username AS submitter FROM sources s
LEFT JOIN users u ON s.submitter_id = u.id LEFT JOIN users u ON s.submitter_id = u.id
WHERE s.locale != ${global.config.locale} WHERE s.locale != ${global.config.locale}
AND s.deleted = 0 AND s.deleted = 0
AND s.approved >= ${req.isGranted('sources') ? 0 : 1} AND s.approved >= ${req.isGranted('sources') ? 0 : 1}
AND s.key IN (`.append([...keys].join(',')).append(SQL`) AND (`;
`)); for (let key of keys) {
sql = sql.append(SQL`s.key = ${key} OR s.key LIKE ${key + '/%'} OR `)
}
sql = sql.append(SQL`0=1)`);
const otherVersions = await req.db.all(sql);
const otherVersionsMap = {}; const otherVersionsMap = {};
otherVersions.forEach(version => { otherVersions.forEach(version => {
if (otherVersionsMap[version.key] === undefined) { const k = keyGetMain(version.key);
otherVersionsMap[version.key] = []; if (otherVersionsMap[k] === undefined) {
otherVersionsMap[k] = [];
} }
otherVersionsMap[version.key].push(version); otherVersionsMap[k].push(version);
}); });
return sources.map(s => { return sources.map(s => {
s.versions = s.key ? otherVersionsMap[s.key] || [] : []; s.versions = s.key ? otherVersionsMap[keyGetMain(s.key)] || [] : [];
return s; return s;
}); });
}; };

View File

@ -292,7 +292,7 @@ router.post('/user/change-username', handleErrorAsync(async (req, res) => {
} }
const dbUser = await req.db.get(SQL`SELECT * FROM users WHERE usernameNorm = ${normalise(req.body.username)}`); const dbUser = await req.db.get(SQL`SELECT * FROM users WHERE usernameNorm = ${normalise(req.body.username)}`);
if (dbUser) { if (dbUser && dbUser.id !== req.user.id) {
return res.json({ error: 'user.account.changeUsername.taken' }) return res.json({ error: 'user.account.changeUsername.taken' })
} }