(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: options:
Public: Public:
header: 'Public' header: 'Public'
description: 'Anyone with a link can see your card.' description: 'Anyone with a link can see your full card.'
InternalBots: InternalBots:
header: 'Internal + bots' 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: Internal:
header: '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.' always: 'Your username, avatar and pronouns will remain public regardless of the visibility settings.'
accessDenied: 'This card is only visible to logged in users.' accessDenied: 'This card is only visible to logged in users.'

View File

@ -1110,13 +1110,13 @@ profile:
options: options:
Public: Public:
header: 'Public' header: 'Public'
description: 'Anyone with a link can see your card.' description: 'Anyone with a link can see your full card.'
InternalBots: InternalBots:
header: 'Internal + bots' 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: Internal:
header: '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.' always: 'Your username, avatar and pronouns will remain public regardless of the visibility settings.'
accessDenied: 'This card is only visible to logged in users.' accessDenied: 'This card is only visible to logged in users.'

View File

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

View File

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