This repository has been archived on 2026-11-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
desktop/settings.html
T

125 lines
4.0 KiB
HTML

<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>FMCRAFT Chat 通知设置</title>
<style>
:root {
color-scheme: dark;
--bg: #0b0e14;
--panel: #141922;
--panel2: #1b2230;
--line: #2a3444;
--fg: #e7edf7;
--muted: #8b98ad;
--accent: #3b82f6;
--danger: #ef4444;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
margin: 0;
padding: 18px;
background: var(--bg);
color: var(--fg);
font-family: "Microsoft YaHei UI", "Segoe UI", sans-serif;
font-size: 13px;
}
.card {
max-width: 520px;
margin: 0 auto;
border: 1px solid var(--line);
border-radius: 16px;
background: var(--panel);
padding: 20px;
box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
h1 { margin: 0; font-size: 18px; }
.sub { margin: 6px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.row {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 12px;
border: 1px solid var(--line);
border-radius: 12px;
background: var(--panel2);
margin-bottom: 10px;
}
.row input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--accent); }
.row strong { display: block; font-size: 13px; font-weight: 600; }
.row span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.path {
margin-top: 14px;
padding: 10px 12px;
border-radius: 10px;
background: var(--panel2);
color: var(--muted);
font-size: 11px;
line-height: 1.6;
word-break: break-all;
}
.path code { color: var(--fg); font-family: Consolas, monospace; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
button {
border: 1px solid var(--line);
border-radius: 10px;
background: var(--panel2);
color: var(--fg);
padding: 9px 14px;
font-size: 12px;
cursor: pointer;
}
button:hover { background: #222c3d; }
button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button.primary:hover { filter: brightness(1.08); }
#status { min-height: 18px; margin: 12px 0 0; color: #34d399; font-size: 12px; }
#status.error { color: var(--danger); }
</style>
</head>
<body>
<div class="card">
<h1>通知设置</h1>
<p class="sub">
当窗口未停留在对应会话时,桌面端可以提醒新消息。所有开关默认开启,设置会保存到本地
config.ini。
</p>
<label class="row">
<input type="checkbox" id="windows" />
<span>
<strong>Windows 消息通知</strong>
<span>通过 Windows 托盘气泡提醒新消息,兼容 Windows 7 及以上。</span>
</span>
</label>
<label class="row">
<input type="checkbox" id="flash" />
<span>
<strong>任务栏闪烁</strong>
<span>窗口未聚焦时闪烁任务栏,点击窗口后自动停止。</span>
</span>
</label>
<label class="row">
<input type="checkbox" id="sound" />
<span>
<strong>音效播放</strong>
<span>收到提醒时播放桌面端本地音效,不依赖网页音频权限。</span>
</span>
</label>
<div class="path">配置文件:<code id="configPath">加载中…</code></div>
<div class="actions">
<button id="test">测试通知</button>
<button id="openConfig">打开配置文件</button>
<button id="save" class="primary">保存设置</button>
</div>
<p id="status"></p>
</div>
<script src="settings.js"></script>
</body>
</html>