aboutsummaryrefslogtreecommitdiff
path: root/src/utils/settingsSync.ts
diff options
context:
space:
mode:
authorRyan Cao <70191398+ryanccn@users.noreply.github.com>2023-07-04 23:57:28 +0800
committerGitHub <noreply@github.com>2023-07-04 17:57:28 +0200
commit0f7b9f588ecc5c95af047d86b8680b5feb0b73dc (patch)
treeb9ba5595f5c65db153a90f51e522be381876ccbb /src/utils/settingsSync.ts
parent93482ac2a5f7a073f505ba130a3074b97e6da6ca (diff)
downloadVencord-0f7b9f588ecc5c95af047d86b8680b5feb0b73dc.tar.gz
Vencord-0f7b9f588ecc5c95af047d86b8680b5feb0b73dc.tar.bz2
Vencord-0f7b9f588ecc5c95af047d86b8680b5feb0b73dc.zip
perf(cloud sync): minify synced settings (#1377)
Diffstat (limited to 'src/utils/settingsSync.ts')
-rw-r--r--src/utils/settingsSync.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils/settingsSync.ts b/src/utils/settingsSync.ts
index bcf59be..850d45f 100644
--- a/src/utils/settingsSync.ts
+++ b/src/utils/settingsSync.ts
@@ -41,10 +41,10 @@ export async function importSettings(data: string) {
throw new Error("Invalid Settings. Is this even a Vencord Settings file?");
}
-export async function exportSettings() {
+export async function exportSettings({ minify }: { minify?: boolean; } = {}) {
const settings = JSON.parse(VencordNative.settings.get());
const quickCss = await VencordNative.quickCss.get();
- return JSON.stringify({ settings, quickCss }, null, 4);
+ return JSON.stringify({ settings, quickCss }, null, minify ? undefined : 4);
}
export async function downloadSettingsBackup() {
@@ -122,7 +122,7 @@ export async function uploadSettingsBackup(showToast = true): Promise<void> {
const cloudSettingsLogger = new Logger("Cloud:Settings", "#39b7e0");
export async function putCloudSettings() {
- const settings = await exportSettings();
+ const settings = await exportSettings({ minify: true });
try {
const res = await fetch(new URL("/v1/settings", getCloudUrl()), {