///|
/// 出错兜底页:托盘在极端情况下(拿不到对话框、也没有通知)会打开这一页。
///
/// URL 只接受一个 `code`,正文从这张固定表里查。不接收任意文本,所以没有注入面。
/// 早先想过 `body=...&hash=md5(...)`,但裸 hash 谁都能算,等于没有校验。
fn err_page(code : String) -> String {
  let (title, body) = match code {
    "sysunit" =>
      (
        "无法用托盘管理开机启动", "检测到系统级(非 --user)的同名 systemd unit。托盘只能用 systemctl --user 管理用户级 unit,对系统级无效,请用 sudo systemctl 自行处理。",
      )
    "boot" =>
      (
        "开机启动设置失败", "调用 systemctl 失败了。可以用 journalctl --user -xe 看看具体原因。",
      )
    "access" =>
      (
        "访问控制设置失败", "写入配置文件或重启服务失败。检查 ~/.config/screen-kacha/ 是否可写。",
      )
    "service" =>
      (
        "服务操作失败", "systemctl 调用返回了非零退出码。可以用 systemctl --user status screen-kacha 看看状态。",
      )
    "dnd" =>
      (
        "改不了勿扰设置", "写 ~/.config/plasmanotifyrc 失败,多半是这台机器上没有 kwriteconfig6(不是 KDE 桌面),或者文件不可写。屏幕共享时的勿扰行为由 xdg-desktop-portal-kde 控制,也可以在系统设置的「通知」里手动改。",
      )
    _ =>
      (
        "screen-kacha 出错了", "托盘遇到了一个没有预置说明的错误,请查看 journalctl --user -u screen-kacha-tray 的日志。",
      )
  }
  let html = ""
  let html = html + "" + title + ""
  let html = html +
    ""
  let html = html + "

" + title + "

" + body + "

" html }