e63a707 ←8542bbdantonApr 11, 2026 api

edit version-view.ts via macOS

M /sublimated/undefined +6 -4
46 unmodified lines
47 });
48 return;
49 }
50
51 if (!this.plugin.settings.apiToken) {
51 // read xattrs to get space + item ID
52 const meta = this.plugin.lastMetadata;
53 if (!meta?.space || !meta?.id) {
54 contentEl.createEl("p", {
53 text: "API token required for version history.",
55 text: "Not a sublimated file.",
56 cls: "sbl-version-empty",
57 });
56 contentEl.createEl("p", {
57 text: "Configure in Settings → sublimated",
58 cls: "sbl-version-hint",
59 });
58 return;
59 }
60
63 // read xattrs to get space + item ID
64 const meta = this.plugin.lastMetadata;
65 if (!meta?.space || !meta?.id) {
61 // public files can be fetched anonymously; private/shared files require a token
62 const isPublic = meta.visibility === "public";
63 if (!this.plugin.settings.apiToken && !isPublic) {
64 contentEl.createEl("p", {
67 text: "Not a sublimated file.",
65 text: "API token required for version history.",
66 cls: "sbl-version-empty",
67 });
68 contentEl.createEl("p", {
69 text: "Configure in Settings → sublimated",
70 cls: "sbl-version-hint",
71 });
72 return;
73 }
74
75 contentEl.createEl("h4", {
155 unmodified lines