//! The Security tab of profile settings: the password, the passkeys, which of
//! the two this account needs to sign in, and the app passwords for WebDAV.
//!
//! Every rule that keeps an account reachable lives on the server. This view
//! only hides controls that cannot work — a browser without WebAuthn, a
//! `Remove password` button on an account with no passkeys — so the reason
//! for a refusal arrives as the server's own message rather than two
//! implementations of the same rule drifting apart.
use leptos::prelude::*;
use wasm_bindgen_futures::spawn_local;
use crate::api::{self, AppPasswordInfo, AuthMode, Me, PasskeyInfo, input_value};
use crate::components::icon::icon_svg;
use crate::components::toast::{ToastMsg, show, show_error};
use crate::i18n;
use crate::icons::IconName;
use crate::util::{copy_button, format_date};
#[component]
pub fn SecurityView(me: ReadSignal