aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/src/meshbay_hub/static/chat-app-settings.js
diff options
context:
space:
mode:
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.js16
1 files changed, 15 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 96fc52f..1eba59a 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
@@ -17,7 +17,8 @@ import { FolderPickerField } from './folder-tree.js';
* has to be on a read-write root. The picker greys out the rest rather than
* letting the node's refusal arrive after the fact.
*/
-function ChatSettings({ roots, dirs, settings, saveDirectories, transport, signFn }) {
+function ChatSettings({ roots, dirs, settings, saveDirectories, transport,
+ signFn }) {
const { busy, msg, run } = useSaver();
const [directory, setDirectory] = useState(settings.chatDirectory || '');
const [linkPreview, setLinkPreview] = useState(settings.chatLinkPreview !== false);
@@ -59,6 +60,19 @@ function ChatSettings({ roots, dirs, settings, saveDirectories, transport, signF
label=${t('settings_app.chat_link_preview_label')} />
<p class="settings-hint">${t('settings_app.chat_link_preview_hint')}</p>
</div>
+ ${/* Not a toggle: chat is always encrypted (MNP 2.0), so there is
+ nothing here to turn on. What an operator may want is to move the
+ key on deliberately — the removals that matter already do it by
+ themselves. Stated rather than left invisible, because "is my chat
+ encrypted?" is a question people ask of a settings pane. */ ''}
+ <div class="settings-row" style="margin-top:12px">
+ <p class="settings-hint">${t('settings_app.chat_encrypted_always')}</p>
+ <button class="app-save" disabled=${busy}
+ onClick=${() => run(() => transport.rotateChatEpoch(signFn))}>
+ ${busy ? t('settings_app.saving') : t('settings_app.chat_rotate_epoch')}
+ </button>
+ <p class="settings-hint">${t('settings_app.chat_rotate_epoch_hint')}</p>
+ </div>
${msg && html`<p class="settings-hint">${msg}</p>`}
</div>
`;