mirror of
https://github.com/martinlegend/neogdsync.git
synced 2026-07-22 06:08:29 +00:00
v1.0.4: migrate legacy OGD proxy URL to self-hosted Worker on load
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
03243972b1
commit
6dd16def1a
4 changed files with 13 additions and 2 deletions
4
main.js
4
main.js
|
|
@ -1164,6 +1164,10 @@ var NeoGDSync = class extends import_obsidian5.Plugin {
|
|||
this.pendingOps = (_b = saved == null ? void 0 : saved.pendingOps) != null ? _b : {};
|
||||
this.conflicts = (_c = saved == null ? void 0 : saved.conflicts) != null ? _c : [];
|
||||
if (this.snapshot) this.snapshot.setRaw(saved == null ? void 0 : saved.snapshot);
|
||||
if (this.settings.authProxyUrl === "https://ogd.richardxiong.com/api/access") {
|
||||
this.settings.authProxyUrl = DEFAULT_SETTINGS.authProxyUrl;
|
||||
await this.saveSettings();
|
||||
}
|
||||
}
|
||||
async saveSettings() {
|
||||
await this.saveData({
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "neogdsync",
|
||||
"name": "NeoGDSync",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.4",
|
||||
"minAppVersion": "1.6.0",
|
||||
"description": "Lightweight Google Drive sync with path-based index, conflict detection, and smart/push/pull modes.",
|
||||
"author": "martinlegend",
|
||||
|
|
|
|||
|
|
@ -292,6 +292,12 @@ export default class NeoGDSync extends Plugin {
|
|||
this.pendingOps = saved?.pendingOps ?? {};
|
||||
this.conflicts = saved?.conflicts ?? [];
|
||||
if (this.snapshot) this.snapshot.setRaw(saved?.snapshot);
|
||||
|
||||
// Migrate: replace legacy third-party proxy URL with self-hosted Worker
|
||||
if (this.settings.authProxyUrl === 'https://ogd.richardxiong.com/api/access') {
|
||||
this.settings.authProxyUrl = DEFAULT_SETTINGS.authProxyUrl;
|
||||
await this.saveSettings();
|
||||
}
|
||||
}
|
||||
|
||||
async saveSettings() {
|
||||
|
|
|
|||
|
|
@ -14,5 +14,6 @@
|
|||
"1.0.0": "1.6.0",
|
||||
"1.0.1": "1.6.0",
|
||||
"1.0.2": "1.6.0",
|
||||
"1.0.3": "1.6.0"
|
||||
"1.0.3": "1.6.0",
|
||||
"1.0.4": "1.6.0"
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue