Japanese hover label on the passkey button

This commit is contained in:
Daniel Redetzke
2026-10-04 22:03:12 +03:00
parent 3e44022b0b
commit 2cbe344d74
+2 -2
View File
@@ -636,7 +636,7 @@
// allows it. // allows it.
const passkeyRow = h('div', { class: 'loginalt', hidden: true }, const passkeyRow = h('div', { class: 'loginalt', hidden: true },
h('div', { class: 'or' }, 'or'), h('div', { class: 'or' }, 'or'),
h('button', { type: 'button', class: 'btn altbtn', onClick: async () => { h('button', { type: 'button', class: 'btn altbtn signin', onClick: async () => {
err.textContent = ''; err.textContent = '';
try { try {
const b = await api('POST', '/auth/login/passkey/begin'); const b = await api('POST', '/auth/login/passkey/begin');
@@ -644,7 +644,7 @@
await api('POST', '/auth/login/passkey/finish?id=' + encodeURIComponent(b.id), cred); await api('POST', '/auth/login/passkey/finish?id=' + encodeURIComponent(b.id), cred);
await signedIn(); await signedIn();
} catch (x) { err.textContent = keyError(x); } } catch (x) { err.textContent = keyError(x); }
} }, icon('key', 18), 'Sign in with a passkey')); } }, icon('key', 18), h('span', { class: 'en' }, 'Sign in with a passkey'), h('span', { class: 'ja', lang: 'ja', 'aria-hidden': 'true' }, 'パスキーでサインイン')));
if (window.PublicKeyCredential) { if (window.PublicKeyCredential) {
api('GET', '/auth/options').then((o) => { passkeyRow.hidden = !o.passkeys; }).catch(() => {}); api('GET', '/auth/options').then((o) => { passkeyRow.hidden = !o.passkeys; }).catch(() => {});
} }