mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-06 22:32:39 +02:00
refactor: centralize status visuals and improve connection indicator logic
- Introduced a new `status-visuals.ts` file to centralize status icons and labels for consistency across the plugin. - Updated connection indicator logic in the settings tab to utilize the new centralized visuals. - Removed deprecated connection visual methods to streamline the codebase. - Enhanced error handling in the status bar to reflect the new status visuals structure.
This commit is contained in:
parent
1c18735d38
commit
68156d2e74
5 changed files with 32 additions and 60 deletions
|
|
@ -203,7 +203,7 @@ export class SurfSenseApiClient {
|
|||
const baseUrl = this.opts.getServerUrl().replace(/\/+$/, "");
|
||||
const token = this.opts.getToken();
|
||||
if (!token) {
|
||||
throw new AuthError("Missing API token. Open SurfSense settings to paste one.");
|
||||
throw new AuthError("Missing API token. Open plugin settings to paste one.");
|
||||
}
|
||||
if (Date.now() < this.authBlockedUntil) {
|
||||
throw new AuthError("Token rejected. Paste a fresh one in settings.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue