mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-19 18:45:15 +02:00
feat: update status handling and connection indicator in SurfSense plugin
- Changed initial status to "needs-setup" to prompt user configuration. - Added a refreshStatus method to SyncEngine for immediate status updates after settings changes. - Enhanced connection indicator logic in the settings tab to reflect the new status. - Introduced "needs-setup" status visual for improved user feedback on configuration requirements.
This commit is contained in:
parent
68156d2e74
commit
4f1c870987
5 changed files with 51 additions and 5 deletions
|
|
@ -20,7 +20,7 @@ export default class SurfSensePlugin extends Plugin {
|
|||
queue!: PersistentQueue;
|
||||
engine!: SyncEngine;
|
||||
private statusBar: StatusBar | null = null;
|
||||
lastStatus: StatusState = { kind: "idle", queueDepth: 0 };
|
||||
lastStatus: StatusState = { kind: "needs-setup", queueDepth: 0 };
|
||||
serverCapabilities: string[] = [];
|
||||
private settingTab: SurfSenseSettingTab | null = null;
|
||||
private statusListeners = new Set<() => void>();
|
||||
|
|
@ -265,6 +265,9 @@ export default class SurfSensePlugin extends Plugin {
|
|||
|
||||
async saveSettings() {
|
||||
await this.saveData(this.settings);
|
||||
// Ensures the indicator reacts to settings edits (token paste, search-space pick)
|
||||
// without waiting for the next sync trigger.
|
||||
this.engine?.refreshStatus();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue