diff --git a/.env.template b/.env.template index 140a4ccc..99f693dd 100644 --- a/.env.template +++ b/.env.template @@ -376,6 +376,7 @@ ## - "inline-menu-totp": Enable the use of inline menu TOTP codes in the browser extension. ## - "ssh-agent": Enable SSH agent support on Desktop. (Needs desktop >=2024.12.0) ## - "ssh-key-vault-item": Enable the creation and use of SSH key vault items. (Needs clients >=2024.12.0) +## - "pm-25373-windows-biometrics-v2": Enable the new implementation of biometrics on Windows. (Needs desktop >= 2025.11.0) ## - "export-attachments": Enable support for exporting attachments (Clients >=2025.4.0) ## - "anon-addy-self-host-alias": Enable configuring self-hosted Anon Addy alias generator. (Needs Android >=2025.3.0, iOS >=2025.4.0) ## - "simple-login-self-host-alias": Enable configuring self-hosted Simple Login alias generator. (Needs Android >=2025.3.0, iOS >=2025.4.0) diff --git a/src/api/core/emergency_access.rs b/src/api/core/emergency_access.rs index 84b00148..1897f995 100644 --- a/src/api/core/emergency_access.rs +++ b/src/api/core/emergency_access.rs @@ -47,24 +47,11 @@ pub fn routes() -> Vec { #[get("/emergency-access/trusted")] async fn get_contacts(headers: Headers, conn: DbConn) -> Json { - if !CONFIG.emergency_access_allowed() { - return Json(json!({ - "data": [{ - "id": "", - "status": 2, - "type": 0, - "waitTimeDays": 0, - "granteeId": "", - "email": "", - "name": "NOTE: Emergency Access is disabled!", - "object": "emergencyAccessGranteeDetails", - - }], - "object": "list", - "continuationToken": null - })); - } - let emergency_access_list = EmergencyAccess::find_all_by_grantor_uuid(&headers.user.uuid, &conn).await; + let emergency_access_list = if CONFIG.emergency_access_allowed() { + EmergencyAccess::find_all_by_grantor_uuid(&headers.user.uuid, &conn).await + } else { + Vec::new() + }; let mut emergency_access_list_json = Vec::with_capacity(emergency_access_list.len()); for ea in emergency_access_list { if let Some(grantee) = ea.to_json_grantee_details(&conn).await { diff --git a/src/config.rs b/src/config.rs index c018828e..80bba6eb 100644 --- a/src/config.rs +++ b/src/config.rs @@ -1047,6 +1047,7 @@ fn validate_config(cfg: &ConfigItems) -> Result<(), Error> { "ssh-agent", // Key Management Team "ssh-key-vault-item", + "pm-25373-windows-biometrics-v2", // Tools "export-attachments", // Mobile Team diff --git a/src/static/scripts/admin.css b/src/static/scripts/admin.css index dd153b1d..0df56771 100644 --- a/src/static/scripts/admin.css +++ b/src/static/scripts/admin.css @@ -58,3 +58,20 @@ img { .abbr-badge { cursor: help; } + +.theme-icon, +.theme-icon-active { + display: inline-flex; + flex: 0 0 1.75em; + justify-content: center; +} + +.theme-icon svg, +.theme-icon-active svg { + width: 1.25em; + height: 1.25em; + min-width: 1.25em; + min-height: 1.25em; + display: block; + overflow: visible; +} \ No newline at end of file diff --git a/src/static/scripts/admin.js b/src/static/scripts/admin.js index 06d6ca5c..f3c41942 100644 --- a/src/static/scripts/admin.js +++ b/src/static/scripts/admin.js @@ -106,7 +106,11 @@ const showActiveTheme = (theme, focus = false) => { const themeSwitcherText = document.querySelector("#bd-theme-text"); const activeThemeIcon = document.querySelector(".theme-icon-active use"); const btnToActive = document.querySelector(`[data-bs-theme-value="${theme}"]`); - const svgOfActiveBtn = btnToActive.querySelector("span use").textContent; + if (!btnToActive) { + return; + } + const btnIconUse = btnToActive ? btnToActive.querySelector("[data-theme-icon-use]") : null; + const iconHref = btnIconUse ? btnIconUse.getAttribute("href") || btnIconUse.getAttribute("xlink:href") : null; document.querySelectorAll("[data-bs-theme-value]").forEach(element => { element.classList.remove("active"); @@ -115,7 +119,12 @@ const showActiveTheme = (theme, focus = false) => { btnToActive.classList.add("active"); btnToActive.setAttribute("aria-pressed", "true"); - activeThemeIcon.textContent = svgOfActiveBtn; + + if (iconHref && activeThemeIcon) { + activeThemeIcon.setAttribute("href", iconHref); + activeThemeIcon.setAttribute("xlink:href", iconHref); + } + const themeSwitcherLabel = `${themeSwitcherText.textContent} (${btnToActive.dataset.bsThemeValue})`; themeSwitcher.setAttribute("aria-label", themeSwitcherLabel); diff --git a/src/static/templates/admin/base.hbs b/src/static/templates/admin/base.hbs index 5e713105..4cdec626 100644 --- a/src/static/templates/admin/base.hbs +++ b/src/static/templates/admin/base.hbs @@ -11,6 +11,28 @@ + + + + + + + + + + + + + + + + + + + + + +