mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-02 19:55:18 +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_name": payload.vault_name,
|
||||
"source": "plugin",
|
||||
"plugin_version": payload.plugin_version,
|
||||
"devices": devices,
|
||||
"last_connect_at": now_iso,
|
||||
}
|
||||
|
|
@ -244,7 +243,6 @@ async def obsidian_connect(
|
|||
"vault_id": payload.vault_id,
|
||||
"vault_name": payload.vault_name,
|
||||
"source": "plugin",
|
||||
"plugin_version": payload.plugin_version,
|
||||
"devices": devices,
|
||||
"files_synced": 0,
|
||||
"last_connect_at": now_iso,
|
||||
|
|
|
|||
|
|
@ -83,7 +83,6 @@ class ConnectRequest(_PluginBase):
|
|||
vault_id: str
|
||||
vault_name: str
|
||||
search_space_id: int
|
||||
plugin_version: str
|
||||
device_id: str
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ export class PermanentError extends Error {
|
|||
export interface ApiClientOptions {
|
||||
getServerUrl: () => string;
|
||||
getToken: () => string;
|
||||
pluginVersion: string;
|
||||
onAuthError?: () => void;
|
||||
}
|
||||
|
||||
|
|
@ -73,10 +72,6 @@ export class SurfSenseApiClient {
|
|||
Object.assign(this.opts, partial);
|
||||
}
|
||||
|
||||
get pluginVersion(): string {
|
||||
return this.opts.pluginVersion;
|
||||
}
|
||||
|
||||
async health(): Promise<HealthResponse> {
|
||||
return await this.request<HealthResponse>("GET", "/api/v1/obsidian/health");
|
||||
}
|
||||
|
|
@ -113,7 +108,6 @@ export class SurfSenseApiClient {
|
|||
vault_id: input.vaultId,
|
||||
vault_name: input.vaultName,
|
||||
search_space_id: input.searchSpaceId,
|
||||
plugin_version: this.opts.pluginVersion,
|
||||
device_id: input.deviceId,
|
||||
}
|
||||
);
|
||||
|
|
|
|||
|
|
@ -34,12 +34,9 @@ export default class SurfSensePlugin extends Plugin {
|
|||
this.seedIdentity();
|
||||
await this.saveSettings();
|
||||
|
||||
const pluginVersion = this.manifest.version;
|
||||
|
||||
this.api = new SurfSenseApiClient({
|
||||
getServerUrl: () => this.settings.serverUrl,
|
||||
getToken: () => this.settings.apiToken,
|
||||
pluginVersion,
|
||||
});
|
||||
|
||||
this.queue = new PersistentQueue(this.settings.queue ?? [], {
|
||||
|
|
|
|||
|
|
@ -107,10 +107,6 @@ const PluginStats: FC<{ config: Record<string, unknown> }> = ({ config }) => {
|
|||
: null;
|
||||
return [
|
||||
{ label: "Vault", value: (config.vault_name as string) || "—" },
|
||||
{
|
||||
label: "Plugin version",
|
||||
value: (config.plugin_version as string) || "—",
|
||||
},
|
||||
{
|
||||
label: "Devices",
|
||||
value: deviceCount !== null ? deviceCount.toLocaleString() : "—",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue