mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-22 23:31:12 +02:00
feat: remove plugin version references from Obsidian plugin routes, schemas, and UI components for cleaner integration
This commit is contained in:
parent
87150a6d7f
commit
54e66e131a
5 changed files with 0 additions and 16 deletions
|
|
@ -220,7 +220,6 @@ async def obsidian_connect(
|
||||||
"vault_id": payload.vault_id,
|
"vault_id": payload.vault_id,
|
||||||
"vault_name": payload.vault_name,
|
"vault_name": payload.vault_name,
|
||||||
"source": "plugin",
|
"source": "plugin",
|
||||||
"plugin_version": payload.plugin_version,
|
|
||||||
"devices": devices,
|
"devices": devices,
|
||||||
"last_connect_at": now_iso,
|
"last_connect_at": now_iso,
|
||||||
}
|
}
|
||||||
|
|
@ -244,7 +243,6 @@ async def obsidian_connect(
|
||||||
"vault_id": payload.vault_id,
|
"vault_id": payload.vault_id,
|
||||||
"vault_name": payload.vault_name,
|
"vault_name": payload.vault_name,
|
||||||
"source": "plugin",
|
"source": "plugin",
|
||||||
"plugin_version": payload.plugin_version,
|
|
||||||
"devices": devices,
|
"devices": devices,
|
||||||
"files_synced": 0,
|
"files_synced": 0,
|
||||||
"last_connect_at": now_iso,
|
"last_connect_at": now_iso,
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,6 @@ class ConnectRequest(_PluginBase):
|
||||||
vault_id: str
|
vault_id: str
|
||||||
vault_name: str
|
vault_name: str
|
||||||
search_space_id: int
|
search_space_id: int
|
||||||
plugin_version: str
|
|
||||||
device_id: str
|
device_id: str
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,6 @@ export class PermanentError extends Error {
|
||||||
export interface ApiClientOptions {
|
export interface ApiClientOptions {
|
||||||
getServerUrl: () => string;
|
getServerUrl: () => string;
|
||||||
getToken: () => string;
|
getToken: () => string;
|
||||||
pluginVersion: string;
|
|
||||||
onAuthError?: () => void;
|
onAuthError?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -73,10 +72,6 @@ export class SurfSenseApiClient {
|
||||||
Object.assign(this.opts, partial);
|
Object.assign(this.opts, partial);
|
||||||
}
|
}
|
||||||
|
|
||||||
get pluginVersion(): string {
|
|
||||||
return this.opts.pluginVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
async health(): Promise<HealthResponse> {
|
async health(): Promise<HealthResponse> {
|
||||||
return await this.request<HealthResponse>("GET", "/api/v1/obsidian/health");
|
return await this.request<HealthResponse>("GET", "/api/v1/obsidian/health");
|
||||||
}
|
}
|
||||||
|
|
@ -113,7 +108,6 @@ export class SurfSenseApiClient {
|
||||||
vault_id: input.vaultId,
|
vault_id: input.vaultId,
|
||||||
vault_name: input.vaultName,
|
vault_name: input.vaultName,
|
||||||
search_space_id: input.searchSpaceId,
|
search_space_id: input.searchSpaceId,
|
||||||
plugin_version: this.opts.pluginVersion,
|
|
||||||
device_id: input.deviceId,
|
device_id: input.deviceId,
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -34,12 +34,9 @@ export default class SurfSensePlugin extends Plugin {
|
||||||
this.seedIdentity();
|
this.seedIdentity();
|
||||||
await this.saveSettings();
|
await this.saveSettings();
|
||||||
|
|
||||||
const pluginVersion = this.manifest.version;
|
|
||||||
|
|
||||||
this.api = new SurfSenseApiClient({
|
this.api = new SurfSenseApiClient({
|
||||||
getServerUrl: () => this.settings.serverUrl,
|
getServerUrl: () => this.settings.serverUrl,
|
||||||
getToken: () => this.settings.apiToken,
|
getToken: () => this.settings.apiToken,
|
||||||
pluginVersion,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
this.queue = new PersistentQueue(this.settings.queue ?? [], {
|
this.queue = new PersistentQueue(this.settings.queue ?? [], {
|
||||||
|
|
|
||||||
|
|
@ -107,10 +107,6 @@ const PluginStats: FC<{ config: Record<string, unknown> }> = ({ config }) => {
|
||||||
: null;
|
: null;
|
||||||
return [
|
return [
|
||||||
{ label: "Vault", value: (config.vault_name as string) || "—" },
|
{ label: "Vault", value: (config.vault_name as string) || "—" },
|
||||||
{
|
|
||||||
label: "Plugin version",
|
|
||||||
value: (config.plugin_version as string) || "—",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
label: "Devices",
|
label: "Devices",
|
||||||
value: deviceCount !== null ? deviceCount.toLocaleString() : "—",
|
value: deviceCount !== null ? deviceCount.toLocaleString() : "—",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue