feat: enable Telegram features on binding

This commit is contained in:
zhoujun0601
2026-08-13 12:42:11 -04:00
parent d3eda6d1f8
commit d923a6ed51
8 changed files with 184 additions and 49 deletions
+2 -23
View File
@@ -1026,28 +1026,7 @@ function Telegram() {
}
/>
</label>
<div className="checks">
<label>
<input
type="checkbox"
checked={v.enabled}
onChange={(e) => setV({ ...v, enabled: e.target.checked })}
/>
启用提醒
</label>
<label>
<input
type="checkbox"
checked={v.menuEnabled}
onChange={(e) => setV({ ...v, menuEnabled: e.target.checked })}
/>
启用查询菜单
</label>
</div>
<p className="hint telegram-switch-hint">
“启用提醒”只控制自动额度提醒,关闭后仍可发送测试消息;“启用查询菜单”关闭后将停止查询并移除
Telegram 键盘。
</p>
<p className="hint">Bot 绑定后会自动启用额度提醒和查询菜单。</p>
<button>验证并保存</button>
<div className="actions">
<button
@@ -1085,7 +1064,7 @@ function Telegram() {
onClick={async () => {
if (
!confirm(
"确定要解除 Telegram Bot 绑定吗?这会删除 Bot Token、Chat ID、开关和未使用的绑定码。",
"确定要解除 Telegram Bot 绑定吗?这会删除 Bot Token、Chat ID 和未使用的绑定码。",
)
)
return;
-5
View File
@@ -478,11 +478,6 @@ header p {
.checks input {
width: auto;
}
.telegram-switch-hint {
margin: -8px 0 0;
font-size: 12px;
line-height: 1.6;
}
.actions {
display: flex;
gap: 10px;