(profile) visibility setting - CR

This commit is contained in:
Andrea Vos 2024-11-09 09:34:08 +01:00
parent fcab355709
commit 665e029392
5 changed files with 14 additions and 15 deletions

View File

@ -908,13 +908,13 @@ profile:
options:
Public:
header: 'Public'
description: 'Anyone with a link can see your card.'
description: 'Anyone with a link can see your full card.'
InternalBots:
header: 'Internal + bots'
description: 'Only logged in users can see your card on the website, bots and other integrations can fetch your data via the API.'
description: 'Only logged in users can see your full card on the website, bots and other integrations can fetch your data via the API.'
Internal:
header: 'Internal'
description: 'Only logged in users can see your card.'
description: 'Only logged in users can see your full card.'
always: 'Your username, avatar and pronouns will remain public regardless of the visibility settings.'
accessDenied: 'This card is only visible to logged in users.'

View File

@ -1110,13 +1110,13 @@ profile:
options:
Public:
header: 'Public'
description: 'Anyone with a link can see your card.'
description: 'Anyone with a link can see your full card.'
InternalBots:
header: 'Internal + bots'
description: 'Only logged in users can see your card on the website, bots and other integrations can fetch your data via the API.'
description: 'Only logged in users can see your full card on the website, bots and other integrations can fetch your data via the API.'
Internal:
header: 'Internal'
description: 'Only logged in users can see your card.'
description: 'Only logged in users can see your full card.'
always: 'Your username, avatar and pronouns will remain public regardless of the visibility settings.'
accessDenied: 'This card is only visible to logged in users.'

View File

@ -1734,13 +1734,13 @@ profile:
options:
Public:
header: 'Publiczny'
description: 'Każda osoba znająca link może zobaczyć Twoją wizytówkę.'
description: 'Każda osoba znająca link może zobaczyć Twoją pełną wizytówkę.'
InternalBots:
header: 'Wewnętrzny + boty'
description: 'Tylko zalogowane osoby mogą zobaczyć Twoją wizytówkę na stronie, ale boty i inne integracje mogą pobrać dane przez API.'
description: 'Tylko zalogowane osoby mogą zobaczyć Twoją pełną wizytówkę na stronie, ale boty i inne integracje mogą pobrać dane przez API.'
Internal:
header: 'Wewnętrzny'
description: 'Tylko zalogowane osoby mogą zobaczyć Twoją wizytówkę.'
description: 'Tylko zalogowane osoby mogą zobaczyć Twoją pełną wizytówkę.'
always: 'Twoja nazwa użytkownicza, awatar i zaimki pozostaną widoczne niezależnie od ustawień widocznośći.'
accessDenied: 'Ta wizytówka jest widoczna wyłącznie dla zalogowanych osób.'

View File

@ -349,7 +349,7 @@
<li v-for="[k, v] in Object.entries(ProfileVisibility).filter(([_, k]) => Number.isInteger(k))" class="mb-2">
<label class="form-check-label">
<input v-model="formData.visibility" type="radio" :value="v" class="form-check-input">
<Icon :v="visibilityIcons[v as ProfileVisibility]" class="ms-2 " />
<Icon v-for="icon in visibilityIcons[v as ProfileVisibility]" :v="icon" class="ms-2 " />
<T>profile.visibility.options.{{ k }}.header</T>
<br>
<small class="text-muted"><T>profile.visibility.options.{{ k }}.description</T></small>
@ -645,10 +645,10 @@ export default defineComponent({
birthdateRange: birthdateRange(config),
ProfileVisibility,
visibilityIcons: {
[ProfileVisibility.Public]: 'globe-africa',
[ProfileVisibility.InternalBots]: 'user-robot',
[ProfileVisibility.Internal]: 'user-lock',
} as Record<ProfileVisibility, string>,
[ProfileVisibility.Public]: ['globe-africa'],
[ProfileVisibility.InternalBots]: ['user-shield', 'user-robot'],
[ProfileVisibility.Internal]: ['user-shield'],
} as Record<ProfileVisibility, string[]>,
};
},
data() {

View File

@ -61,7 +61,6 @@ const shoot = async (db: Database, mode: 'light' | 'dark'): Promise<void> => {
for (const { locale, username } of profiles) {
const token = jwt.sign(
{
id: '01FE1FZW2HCKE2PQY63NY20XJH',
username: 'example',
email: 'example@pronouns.page',
roles: '',