fix desktop preference synchronization (#1106)

This commit is contained in:
ZacharyZcR
2026-07-28 02:21:09 +08:00
committed by GitHub
parent a9c2aec165
commit 5c709d38d6
9 changed files with 118 additions and 38 deletions
+15
View File
@@ -0,0 +1,15 @@
const SYNCED_ENTITY_TYPES = Object.freeze([
// Ordered by reference dependency: hosts and snippets resolve credential,
// vault and folder syncIds, so those have to exist on the other side first.
"sshCredentials",
"vaultProfiles",
"sshFolders",
"snippetFolders",
"hosts",
"snippets",
"dashboardServiceLinks",
"homepageItems",
"userPreferences",
]);
module.exports = { SYNCED_ENTITY_TYPES };
+1 -11
View File
@@ -14,17 +14,7 @@
const { app, safeStorage } = require("electron");
const fs = require("fs");
const path = require("path");
const SYNCED_ENTITY_TYPES = [
"sshCredentials",
"vaultProfiles",
"sshFolders",
"snippetFolders",
"hosts",
"snippets",
"dashboardServiceLinks",
"homepageItems",
];
const { SYNCED_ENTITY_TYPES } = require("./remote-sync-entities.cjs");
const SYNC_INTERVAL_MS = 90 * 1000;
const EMBEDDED_BASE_URL = "http://127.0.0.1:30001";