diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-17 23:14:46 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-17 23:14:46 +0200 |
| commit | e412581e04a2c9b33f5cdc019b44bc7cd2158180 (patch) | |
| tree | 70e01405ae5920a4b87276fde2fe04176b08c9dd /packages/meshbay-hub/src/meshbay_hub/static/chat-app-settings.js | |
| parent | 84946b1fef64ee619f1c161d57ef4afdc533eae2 (diff) | |
| download | meshbay-e412581e04a2c9b33f5cdc019b44bc7cd2158180.tar.gz | |
feat(spa): purging the chat asks first
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/chat-app-settings.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/chat-app-settings.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/chat-app-settings.js b/packages/meshbay-hub/src/meshbay_hub/static/chat-app-settings.js index 892c3324..4a38b074 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/chat-app-settings.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/chat-app-settings.js @@ -2,6 +2,7 @@ import { html, useState, useEffect } from './vendor/htm-preact.js'; import { t } from './i18n.js'; import { ToggleSwitch, useSaver } from './settings-ui.js'; import { FolderPickerField } from './folder-tree.js'; +import { ask } from './ask.js'; /** * Chat's operator settings. @@ -75,7 +76,10 @@ function ChatSettings({ roots, dirs, settings, saveDirectories, transport, </div> <div class="settings-row" style="margin-top:12px"> <button class="app-save" disabled=${busy} - onClick=${() => run(() => transport.purgeChat(signFn))}> + onClick=${async () => { + if (!(await ask(t('settings_app.chat_purge_confirm')))) return; + run(() => transport.purgeChat(signFn)); + }}> ${busy ? t('settings_app.saving') : t('settings_app.chat_purge')} </button> <p class="settings-hint">${t('settings_app.chat_purge_hint')}</p> |