diff --git a/ui/src/app/editor-window/editor-window.html b/ui/src/app/editor-window/editor-window.html
index 5977396..54b9ed5 100644
--- a/ui/src/app/editor-window/editor-window.html
+++ b/ui/src/app/editor-window/editor-window.html
@@ -89,6 +89,16 @@
}
+ @if (sessionDead()) {
+
+
+ Disconnected from {{ ctx.sessionTitle }} — saving will fail, but your text is preserved
+ in this window.
+
+ }
+
@if (loading()) {
diff --git a/ui/src/app/settings.service.ts b/ui/src/app/settings.service.ts
index 86eafc7..8e81d23 100644
--- a/ui/src/app/settings.service.ts
+++ b/ui/src/app/settings.service.ts
@@ -32,23 +32,28 @@ export class SettingsService {
this.applyAccent();
if (!this.rpc.available) return;
void this.rpc.request.getSettings({}).then((res) => {
- if (!res.ok) return;
- this.theme.set(res.settings.theme);
- this.darkTone.set(res.settings.darkTone);
- this.accent.set(res.settings.accent);
- this.iconColors.set(res.settings.iconColors);
- this.speedUnit.set(res.settings.speedUnit);
- this.textSize.set(res.settings.textSize);
- this.transferMode.set(res.settings.transferMode);
- this.transferConcurrency.set(res.settings.transferConcurrency);
- this.autoClearCompleted.set(res.settings.autoClearCompleted);
- this.editor.set(res.settings.editor);
- this.editorApp.set(res.settings.editorApp);
- this.applyTheme();
- this.applyDarkTone();
- this.applyAccent();
- this.applyTextSize();
+ if (res.ok) this.applyAll(res.settings);
});
+ // editor windows: follow settings the main window saves, live
+ this.rpc.onSettingsChanged((settings) => this.applyAll(settings));
+ }
+
+ private applyAll(settings: AppSettings): void {
+ this.theme.set(settings.theme);
+ this.darkTone.set(settings.darkTone);
+ this.accent.set(settings.accent);
+ this.iconColors.set(settings.iconColors);
+ this.speedUnit.set(settings.speedUnit);
+ this.textSize.set(settings.textSize);
+ this.transferMode.set(settings.transferMode);
+ this.transferConcurrency.set(settings.transferConcurrency);
+ this.autoClearCompleted.set(settings.autoClearCompleted);
+ this.editor.set(settings.editor);
+ this.editorApp.set(settings.editorApp);
+ this.applyTheme();
+ this.applyDarkTone();
+ this.applyAccent();
+ this.applyTextSize();
}
setTheme(theme: AppSettings['theme']): void {