diff --git a/modules/tts/tts-overlay.html b/modules/tts/tts-overlay.html
index 65f6fab..13c100b 100644
--- a/modules/tts/tts-overlay.html
+++ b/modules/tts/tts-overlay.html
@@ -121,6 +121,43 @@ body {
gap: 8px;
}
+.header-toggles {
+ display: flex;
+ gap: 6px;
+}
+
+.header-toggle {
+ display: flex;
+ align-items: center;
+ gap: 4px;
+ padding: 4px 10px;
+ background: var(--bg-input);
+ border: 1px solid var(--border);
+ border-radius: 12px;
+ font-size: 11px;
+ color: var(--text-secondary);
+ cursor: pointer;
+ transition: all 0.15s;
+ white-space: nowrap;
+}
+
+.header-toggle:hover {
+ border-color: var(--border-light);
+ color: var(--text-primary);
+}
+
+.header-toggle input[type="checkbox"] {
+ width: 14px;
+ height: 14px;
+ accent-color: var(--accent);
+ cursor: pointer;
+}
+
+@media (max-width: 768px) {
+ .header-toggle span { display: none; }
+ .header-toggle { padding: 6px 8px; }
+}
+
.header-badge {
display: flex;
align-items: center;
@@ -1205,6 +1242,16 @@ select.input { cursor: pointer; }
+
@@ -2152,6 +2199,9 @@ function fillForm(cfg) {
$('cacheMaxEntries').value = cfg.volc?.cacheMaxEntries ?? 200;
$('cacheMaxMB').value = cfg.volc?.cacheMaxMB ?? 200;
applyCacheStats(cfg.cacheStats || {});
+
+ $('showFloorButton').checked = cfg.showFloorButton !== false;
+ $('showFloatingButton').checked = cfg.showFloatingButton === true;
updateApiStatus();
renderMyVoiceList();
@@ -2249,6 +2299,8 @@ window.addEventListener('message', ev => {
handleSaveResult(false);
post('xb-tts:toast', { type: 'error', message: payload?.message || '保存失败' });
break;
+ case 'xb-tts:button-mode-saved':
+ break;
case 'xb-tts:test-done':
['testMyStatus', 'testTrialStatus', 'testAuthStatus'].forEach(id => setTestStatus(id, 'playing', '播放中...'));
setTimeout(() => ['testMyStatus', 'testTrialStatus', 'testAuthStatus'].forEach(id => setTestStatus(id, '', '')), 3000);
@@ -2278,6 +2330,18 @@ document.addEventListener('DOMContentLoaded', () => {
$$('.nav-item, .mobile-nav-item').forEach(item => item.addEventListener('click', () => switchView(item.dataset.view)));
$('tts_close').addEventListener('click', () => post('xb-tts:close'));
+ $('showFloorButton').addEventListener('change', () => {
+ post('xb-tts:save-button-mode', {
+ showFloorButton: $('showFloorButton').checked,
+ showFloatingButton: $('showFloatingButton').checked
+ });
+ });
+ $('showFloatingButton').addEventListener('change', () => {
+ post('xb-tts:save-button-mode', {
+ showFloorButton: $('showFloorButton').checked,
+ showFloatingButton: $('showFloatingButton').checked
+ });
+ });
$('toggleKey').addEventListener('click', () => {
const input = $('accessKey');
@@ -2404,4 +2468,4 @@ document.addEventListener('DOMContentLoaded', () => {
});