diff --git a/frontend/index.html b/frontend/index.html index cfcad7b..1266c9e 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -716,6 +716,23 @@ +

App-Passwörter (CalDAV)

+

Eigene Passwörter für CalDAV-Clients. Bei aktivem 2FA nötig, da Apps keinen 2FA-Code eingeben können. Jederzeit widerrufbar.

+
+ + +
+ +
+

Privatsphäre

Wie private Termine für andere Gruppenmitglieder erscheinen

@@ -995,26 +1012,6 @@
- -
-

App-Passwörter (CalDAV)

-

Eigene Passwörter für CalDAV-Clients. Bei aktivem 2FA nötig, da Apps keinen 2FA-Code eingeben können. Jederzeit widerrufbar.

-
- - -
- -
-
-

Meine Kalender

diff --git a/frontend/js/calendar.js b/frontend/js/calendar.js index b19bf4d..3c71acc 100644 --- a/frontend/js/calendar.js +++ b/frontend/js/calendar.js @@ -3110,6 +3110,7 @@ function openSettingsModal() { api.get('/profile/').then(p => { document.getElementById('cfg-email').value = p.email || ''; }).catch(() => {}); + initAppPasswords(); // Set active contrast/hour-height/duration buttons [ @@ -4144,12 +4145,17 @@ function bindProfileModal() { document.getElementById('2fa-disable-pw').value = ''; } catch (e) { showToast(e.message, true); } }; +} - // ── App passwords (CalDAV) ── +// ── App passwords (CalDAV) — lives in Settings → Profile ── +function initAppPasswords() { const appPwList = document.getElementById('app-pw-list'); - document.getElementById('app-pw-new').classList.add('hidden'); + if (!appPwList) return; + const newBox = document.getElementById('app-pw-new'); + newBox.classList.add('hidden'); document.getElementById('app-pw-new-value').textContent = ''; - async function loadAppPasswords() { + + const load = async () => { try { const rows = await api.get('/profile/app-passwords'); appPwList.innerHTML = rows.length @@ -4160,17 +4166,17 @@ function bindProfileModal() {
`).join('') : `

${t('app_pw_none')}

`; } catch (e) { /* ignore */ } - } - loadAppPasswords(); + }; + load(); document.getElementById('app-pw-create-btn').onclick = async () => { const label = document.getElementById('app-pw-label').value.trim() || 'CalDAV'; try { const res = await api.post('/profile/app-passwords', { label }); document.getElementById('app-pw-new-value').textContent = res.password; - document.getElementById('app-pw-new').classList.remove('hidden'); + newBox.classList.remove('hidden'); document.getElementById('app-pw-label').value = ''; - loadAppPasswords(); + load(); } catch (e) { showToast(e.message, true); } }; @@ -4185,7 +4191,7 @@ function bindProfileModal() { if (!confirm(t('app_pw_revoke_confirm'))) return; try { await api.delete(`/profile/app-passwords/${btn.dataset.id}`); - loadAppPasswords(); + load(); } catch (err) { showToast(err.message, true); } }; } diff --git a/frontend/js/version.js b/frontend/js/version.js index 8a9ae36..4888d28 100644 --- a/frontend/js/version.js +++ b/frontend/js/version.js @@ -1,2 +1,2 @@ // Increment APP_VERSION with every code change -export const APP_VERSION = 'v68'; +export const APP_VERSION = 'v69';