fix: show stored UUID instead of Directus ID in settings, add hint text
This commit is contained in:
@@ -92,7 +92,7 @@ class PageSettings extends HTMLElement {
|
||||
const eyeOffIcon = this.querySelector('#toggle-uid-btn .icon-eye-off')
|
||||
if (display) {
|
||||
display.textContent = this.uidVisible
|
||||
? this.user?.id
|
||||
? auth.getStoredUuid()
|
||||
: '••••••••-••••-••••-••••-••••••••••••'
|
||||
}
|
||||
if (eyeIcon) eyeIcon.style.display = this.uidVisible ? 'none' : 'block'
|
||||
@@ -101,8 +101,9 @@ class PageSettings extends HTMLElement {
|
||||
|
||||
// Copy UUID
|
||||
this.querySelector('#copy-uid-btn')?.addEventListener('click', async () => {
|
||||
if (this.user?.id) {
|
||||
await navigator.clipboard.writeText(this.user.id)
|
||||
const uuid = auth.getStoredUuid()
|
||||
if (uuid) {
|
||||
await navigator.clipboard.writeText(uuid)
|
||||
this.showToast(t('auth.copy') + ' ✓')
|
||||
}
|
||||
})
|
||||
@@ -225,8 +226,11 @@ class PageSettings extends HTMLElement {
|
||||
<h2>${t('settings.account')}</h2>
|
||||
|
||||
${this.isLoggedIn ? /* html */`
|
||||
<div class="setting-item">
|
||||
<label>${t('settings.userId')}</label>
|
||||
<div class="setting-item setting-item-column">
|
||||
<div>
|
||||
<label>${t('settings.userId')}</label>
|
||||
<p class="setting-hint">${t('settings.userIdHint')}</p>
|
||||
</div>
|
||||
<div class="user-id-row">
|
||||
<code class="user-id" id="user-id-display">${'•'.repeat(8)}-••••-••••-••••-${'•'.repeat(12)}</code>
|
||||
<div class="user-id-actions">
|
||||
@@ -351,6 +355,11 @@ style.textContent = /* css */`
|
||||
padding: var(--space-sm) 0;
|
||||
}
|
||||
|
||||
page-settings .setting-item-column {
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
page-settings .setting-item + .setting-item {
|
||||
border-top: 1px solid var(--color-border);
|
||||
margin-top: var(--space-sm);
|
||||
|
||||
@@ -259,6 +259,7 @@
|
||||
"language": "Sprache",
|
||||
"account": "Konto",
|
||||
"userId": "Benutzer-ID",
|
||||
"userIdHint": "Wird nicht auf dem Server gespeichert. Nur du kennst diese ID.",
|
||||
"logout": "Abmelden",
|
||||
"login": "Anmelden",
|
||||
"notLoggedIn": "Du bist nicht angemeldet.",
|
||||
|
||||
@@ -259,6 +259,7 @@
|
||||
"language": "Language",
|
||||
"account": "Account",
|
||||
"userId": "User ID",
|
||||
"userIdHint": "Not stored on the server. Only you know this ID.",
|
||||
"logout": "Logout",
|
||||
"login": "Login",
|
||||
"notLoggedIn": "You are not logged in.",
|
||||
|
||||
@@ -259,6 +259,7 @@
|
||||
"language": "Idioma",
|
||||
"account": "Cuenta",
|
||||
"userId": "ID de usuario",
|
||||
"userIdHint": "No se almacena en el servidor. Solo tú conoces este ID.",
|
||||
"logout": "Cerrar sesión",
|
||||
"login": "Iniciar sesión",
|
||||
"notLoggedIn": "No has iniciado sesión.",
|
||||
|
||||
@@ -259,6 +259,7 @@
|
||||
"language": "Langue",
|
||||
"account": "Compte",
|
||||
"userId": "ID utilisateur",
|
||||
"userIdHint": "Non enregistré sur le serveur. Vous seul connaissez cet identifiant.",
|
||||
"logout": "Déconnexion",
|
||||
"login": "Connexion",
|
||||
"notLoggedIn": "Vous n'êtes pas connecté.",
|
||||
|
||||
@@ -259,6 +259,7 @@
|
||||
"language": "Lingua",
|
||||
"account": "Account",
|
||||
"userId": "ID utente",
|
||||
"userIdHint": "Non memorizzato sul server. Solo tu conosci questo ID.",
|
||||
"logout": "Esci",
|
||||
"login": "Accedi",
|
||||
"notLoggedIn": "Non hai effettuato l'accesso.",
|
||||
|
||||
@@ -259,6 +259,7 @@
|
||||
"language": "Idioma",
|
||||
"account": "Conta",
|
||||
"userId": "ID do Usuário",
|
||||
"userIdHint": "Não armazenado no servidor. Apenas você conhece este ID.",
|
||||
"logout": "Sair",
|
||||
"login": "Entrar",
|
||||
"notLoggedIn": "Você não está logado.",
|
||||
|
||||
@@ -259,6 +259,7 @@
|
||||
"language": "Язык",
|
||||
"account": "Аккаунт",
|
||||
"userId": "ID пользователя",
|
||||
"userIdHint": "Не хранится на сервере. Только вы знаете этот ID.",
|
||||
"logout": "Выйти",
|
||||
"login": "Войти",
|
||||
"notLoggedIn": "Вы не вошли в аккаунт.",
|
||||
|
||||
Reference in New Issue
Block a user