diff --git a/src/components/VencordSettings/BackupAndRestoreTab.tsx b/src/components/VencordSettings/BackupAndRestoreTab.tsx
index 9c12fbf0..7e0f32e3 100644
--- a/src/components/VencordSettings/BackupAndRestoreTab.tsx
+++ b/src/components/VencordSettings/BackupAndRestoreTab.tsx
@@ -44,6 +44,7 @@ function BackupRestoreTab() {
— Custom QuickCSS
— Theme Links
— Plugin Settings
+ — Plugin DataStores (e.g. Timezones or IRememberYou)
diff --git a/src/utils/settingsSync.ts b/src/utils/settingsSync.ts
index fc5c4172..a31aa621 100644
--- a/src/utils/settingsSync.ts
+++ b/src/utils/settingsSync.ts
@@ -16,6 +16,7 @@
* along with this program. If not, see .
*/
+import { DataStore } from "@api/index";
import { showNotification } from "@api/Notifications";
import { PlainSettings, Settings } from "@api/Settings";
import { moment, Toasts } from "@webpack/common";
@@ -34,18 +35,20 @@ export async function importSettings(data: string) {
throw new Error("Failed to parse JSON: " + String(err));
}
- if ("settings" in parsed && "quickCss" in parsed) {
+ if ("settings" in parsed && "quickCss" in parsed && "dataStore" in parsed) {
Object.assign(PlainSettings, parsed.settings);
await VencordNative.settings.set(parsed.settings);
await VencordNative.quickCss.set(parsed.quickCss);
+ await DataStore.setMany(parsed.dataStore);
} else
- throw new Error("Invalid Settings. Is this even a Equicord Settings file?");
+ throw new Error("Invalid Settings. Is this even an Equicord Settings file?");
}
export async function exportSettings({ minify }: { minify?: boolean; } = {}) {
const settings = VencordNative.settings.get();
const quickCss = await VencordNative.quickCss.get();
- return JSON.stringify({ settings, quickCss }, null, minify ? undefined : 4);
+ const dataStore = await DataStore.entries();
+ return JSON.stringify({ settings, quickCss, dataStore }, null, minify ? undefined : 4);
}
export async function downloadSettingsBackup() {