[card] verified links - provide explanation

This commit is contained in:
Andrea 2022-04-24 11:09:46 +02:00
parent 491ddf979b
commit 1d4289109c
21 changed files with 181 additions and 12 deletions

View File

@ -2,7 +2,13 @@
<div :class="['modal', shown ? 'd-block' : '', shownFull ? 'modal-shown' : '']" @click="hideClick">
<div class="modal-dialog modal-dialog-centered" role="document">
<div class="modal-content shadow">
<div class="modal-header" v-if="choice">
<div class="modal-header" v-if="header">
<p class="h5 modal-title">
<Icon v-if="icon" :v="icon"/>
{{header}}
</p>
</div>
<div class="modal-header" v-else-if="choice">
<p class="h5 modal-title">
<Icon v="map-marker-question"/>
{{$t('confirm.header')}}
@ -36,6 +42,8 @@
shown: false,
shownFull: false,
choice: false,
icon: undefined,
header: undefined,
message: undefined,
resolve: undefined,
reject: undefined,
@ -64,7 +72,14 @@
methods: {
show(choice, message, color, resolve, reject) {
this.choice = choice;
this.message = message;
if (typeof(message) === 'string') {
this.header = undefined;
this.message = message;
} else {
this.icon = message.icon;
this.header = message.header;
this.message = message.message;
}
this.resolve = resolve;
this.reject = reject;
this.color = color;
@ -90,6 +105,8 @@
setTimeout(() => {
this.shown = false;
this.choice = false;
this.icon = undefined;
this.header = undefined;
this.message = undefined;
this.resolve = undefined;
this.reject = undefined;

View File

@ -1,9 +1,9 @@
<template>
<span>
<span ref="original" v-show="!$isGranted('users')">
<span ref="original" v-show="!$isGranted('users') || !hasSus">
<slot ref="original"></slot>
</span>
<span ref="marked" v-show="$isGranted('users')"></span>
<span ref="marked" v-show="$isGranted('users') && hasSus"></span>
</span>
</template>
@ -12,6 +12,7 @@ export default {
data() {
return {
moderation: null,
hasSus: false,
}
},
async mounted() {
@ -36,7 +37,10 @@ export default {
let html = this.$refs.original.innerHTML;
for (let sus of this.moderation.susRegexes) {
html = html.replace(new RegExp(sus, 'gi'), m => `<mark>${m}</mark>`);
html = html.replace(new RegExp(sus, 'gi'), m => {
this.hasSus = true;
return `<mark>${m}</mark>`;
});
}
this.$refs.marked.innerHTML = html;
},

View File

@ -1,12 +1,10 @@
<template>
<span>
<Icon :v="niceLink.icon" :set="niceLink.iconSet || 'l'"/>
<a :href="linkTrimmed" target="_blank" :rel="verifiedBy ? 'me' : 'noopener'">
{{niceLink.text}}
</a>
<small v-if="verifiedBy">
<a :href="linkTrimmed" target="_blank" :rel="verifiedBy ? 'me' : 'noopener'">{{niceLink.text}}</a>
<button class="btn btn-sm p-0" v-if="verifiedBy" @click="verificationInfo">
<Icon v="shield-check" set="s" class="small text-primary"/>
</small>
</button>
</span>
</template>
@ -29,8 +27,17 @@
},
verifiedBy() {
return this.verifiedLinks[this.link];
}
}
},
},
methods: {
async verificationInfo() {
await this.$alert({
icon: 'shield-check',
header: this.$t('profile.verifiedLinks.header'),
message: this.$t('profile.verifiedLinks.info')
});
},
},
};
</script>

View File

@ -571,6 +571,13 @@ profile:
flagsCustomWarning: 'This flag has been uploaded by a user. The team of pronouns.page is not responsible for it.'
links: 'Links'
linksRecommended: 'We recommend linking to'
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: 'Column'
header: 'Cards'

View File

@ -492,6 +492,14 @@ profile:
flagsCustomWarning: 'Diese Flagge wurde von einer*m Nutzer*in hochgeladen. Das Team von pronouns.page ist nicht dafür verantwortlich.'
links: 'Links'
linksRecommended: 'Wir empfehlen Verlinkung zu'
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: 'Spalte'
list: 'Deine Visitenkarten'

View File

@ -605,6 +605,13 @@ profile:
flagsCustomWarning: 'This flag has been uploaded by a user. The team of pronouns.page is not responsible for it.'
links: 'Links'
linksRecommended: 'We recommend linking to'
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: 'Column'
header: 'Cards'

View File

@ -557,6 +557,14 @@ profile:
flagsCustomWarning: 'This flag has been uploaded by a user. The team of pronouns.page is not responsible for it.'
links: 'Ligiloj'
linksRecommended: 'We recommend linking to'
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: 'Kolumno'
header: 'Kartoj'

View File

@ -577,6 +577,14 @@ profile:
flagsCustomWarning: 'Esta bandera fue subida por un usuario. El equipo de pronouns.page no es responsable de ella.'
links: 'Enlaces'
linksRecommended: 'Recomendamos enlaces a'
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: 'Columna'
list: 'Tus tarjetas'

View File

@ -495,6 +495,14 @@ profile:
flagsCustomWarning: 'Ce drapeau a été uploadé par un.e utilisateur.rice. Léquipe de pronouns.page nen est pas tenue responsable.'
links: 'Liens'
linksRecommended: 'Nous vous recommandons ces liens'
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: 'Colonne'
list: 'Vos cartes'

View File

@ -476,6 +476,14 @@ profile:
flagsCustomWarning: 'Esta bandeira foi enviada por ume usuárie. O time da pronouns.page não é responsável por este conteúdo.'
links: 'Links'
linksRecommended: 'Recomendamos linkar com'
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: 'Coluna'
list: 'Os cartões'

View File

@ -573,6 +573,14 @@ profile:
flagsCustomWarning: 'This flag has been uploaded by a user. The team of pronouns.page is not responsible for it.'
links: 'Links'
linksRecommended: 'We recommend linking to'
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: 'Column'
header: 'Cards'

View File

@ -495,6 +495,14 @@ profile:
links: 'リンク'
linksRecommended: ''
linksRecommendedAfter: 'にリンクすることをお勧めします。'
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: '欄'
list: 'あなたのカード'

View File

@ -570,6 +570,14 @@ profile:
flagsCustomWarning: '이 플래그는 사용자가 업로드했습니다. pronouns.page 팀은 이에 대한 책임을 지지 않습니다.'
links: '링크'
linksRecommended: '여기 연결하는 것이 좋습니다.'
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: '열'
header: '카드'

View File

@ -496,6 +496,14 @@ profile:
flagsCustomWarning: 'Deze vlag werd geuploaded door een gebruiker. Het team van pronouns.page is hier niet verantwoordelijk voor.'
links: 'Links'
linksRecommended: 'We raden aan te linken naar'
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: 'Kolom'
list: 'Jouw kaarten'

View File

@ -473,6 +473,14 @@ profile:
flagsCustomWarning: 'Dette flagget har blitt lastet opp av en bruker. Teamet som har laget pronouns.page er ikke ansvarlig for det.'
links: 'Linker'
linksRecommended: 'Vi anbefaler å linke til'
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: 'Kolonne'
header: 'Kort'

View File

@ -1266,6 +1266,13 @@ profile:
flagsCustomWarning: 'Ta flaga została wgrana przez osobę użytkującą. Ekipa zaimki.pl nie jest za nią odpowiedzialna.'
links: 'Linki'
linksRecommended: 'Polecamy dodać link do'
verifiedLinks:
header: 'Potwierdzone linki'
info: >
Linki umieszczone publicznie w profilu otrzymują znaczek tarczy,
jeśli zostały zweryfikowane za pomocą logowania przez danego dostawcę uwierzytelniania,
albo (ficzer w budowie) poprzez umieszczenie tagu <code>rel="me"</code> wskazującego z powrotem na wizytówkę.
Nasze linki również umieszczają <code>rel="me"</code>, aby zewnętrzne strony mogły potwierdzić wizytówkę również w odwrotną stronę.
column: 'Kolumna'
header: 'Wizytówki'

View File

@ -498,6 +498,14 @@ profile:
flagsCustomWarning: 'Esta bandeira foi enviada por ume usuárie. O time da pronouns.page não é responsável por este conteúdo.'
links: 'Links'
linksRecommended: 'Recomendamos linkar com'
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: 'Coluna'
list: 'Os cartões'

View File

@ -586,6 +586,14 @@ profile:
flagsCustomWarning: 'Этот прайд-флаг был добавлен пользователь_ницей. Команда pronouns.page не несет ответственность за это.'
links: 'Ссылки'
linksRecommended: 'Рекомендуем перейти по этим ссылкам'
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: 'Колонка'
header: 'Карточки'

View File

@ -609,6 +609,14 @@ profile:
flagsCustomWarning: 'Цей прайд-прапор був доданий користувач_кою. Команда pronouns.page не несе відповідальності за це.'
links: 'Посилання'
linksRecommended: 'Рекомендуємо перейти за цими посиланням'
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: 'Колонка'
header: 'Картки'

View File

@ -471,6 +471,14 @@ profile:
flagsCustomWarning: 'This flag has been uploaded by a user. The team of pronouns.page is not responsible for it.' # TODO
links: 'פֿאַרבינדונגען'
linksRecommended: 'We recommend linking to' # TODO
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: 'Column'
list: 'דײַנע‎ װיזיט־⁠קאַרטלעך'

View File

@ -450,6 +450,14 @@ profile:
flagsCustomWarning: '此旗幟由一名用戶上傳。pronouns.page團隊不為此負責'
links: '鏈接'
linksRecommended: '我們建議鏈接至'
# TODO
verifiedLinks:
header: 'Verified links'
info: >
The links that one puts publicly in one's profile will be marked with the shield icon,
if they are verified by logging in using the given authentication provider,
or (under construction) by a <code>rel="me"</code> tag pointing back to the card.
Our links also include a <code>rel="me"</code> tag, so that external websites can verify your card the other way round too.
column: '列'
list: '你的卡'