Add persistent Clouddrop synchronization for successful upload logs
CI / verify (push) Canceled after 0s
CI / verify (push) Canceled after 0s
This commit is contained in:
1 parent
be57ce13e2
commit
6182aa2262
13 files changed
+650
-2
No files matched your search
+12
-1
@@ -62,6 +62,7 @@ const DEFAULTS = {
|
||||
alwaysOnTop: false,
|
||||
shutdownAfterFinish: 'nothing', // nothing | sleep | shutdown | restart
|
||||
logFilePath: '',
|
||||
cloudLogSync: { enabled: false, apiKey: '', accountId: '', ip: '', folderId: '' },
|
||||
sessionLog: false, // legacy boolean (kept for back-compat reads); normalized into logMode on load
|
||||
logVerbose: false, // when true, [DEBUG] level entries are written to debug.log
|
||||
webhookUrl: '', // POST target on batch-done (Discord or generic JSON)
|
||||
@@ -499,7 +500,7 @@ class ConfigStore {
|
||||
const hosters = this._clone(config.hosters || {});
|
||||
const globalSettings = this._clone(config.globalSettings || {});
|
||||
delete globalSettings.allowPlaintextCredentialStorage;
|
||||
secretStore.encryptCredentials({ hosters });
|
||||
secretStore.encryptCredentials({ hosters, globalSettings });
|
||||
return JSON.stringify({ ...config, globalSettings, hosters }, null, 2);
|
||||
}
|
||||
|
||||
@@ -721,6 +722,7 @@ class ConfigStore {
|
||||
uploadRecovery: currentGlobalSettings.uploadRecovery ?? null,
|
||||
lastBrowseDirectory: currentGlobalSettings.lastBrowseDirectory || '',
|
||||
diagnostics: this._clone(currentGlobalSettings.diagnostics || {}),
|
||||
cloudLogSync: this._clone(currentGlobalSettings.cloudLogSync || {}),
|
||||
historyRetention: currentGlobalSettings.historyRetention || 'all',
|
||||
folderMonitor: {
|
||||
...currentFolderMonitor,
|
||||
@@ -738,6 +740,15 @@ class ConfigStore {
|
||||
});
|
||||
}
|
||||
|
||||
saveCloudLogSettings(settings) {
|
||||
const snapshot = this._clone(settings);
|
||||
return this._enqueueWrite(() => {
|
||||
const current = this.load();
|
||||
current.globalSettings.cloudLogSync = snapshot;
|
||||
return this._commit(current);
|
||||
});
|
||||
}
|
||||
|
||||
saveRemoteSettings(remoteSettings, createToken) {
|
||||
const incoming = this._clone(remoteSettings || {});
|
||||
return this._enqueueWrite(async () => {
|
||||
|
||||
Reference in new issue
Block a user