mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-19 03:17:02 -04:00
Visual Refresh
Co-Authored-By: sadan4 <117494111+sadan4@users.noreply.github.com> Co-Authored-By: doyle31 <abacubabacus@gmail.com> Co-Authored-By: iilwy <iilwy@omg.games> Co-Authored-By: Noa <164402463+nroggendorff@users.noreply.github.com> Co-Authored-By: rini c <rini@rinici.de> Co-Authored-By: Cassie <37855219+codef53@users.noreply.github.com> Co-Authored-By: jamesbt365 <moxy@mothoxi.de> Co-Authored-By: khcrysalis <97859147+khcrysalis@users.noreply.github.com> Co-Authored-By: nin0dev <75569739+nin0-dev@users.noreply.github.com>
This commit is contained in:
parent
fce4ffaabb
commit
ca4b63c386
23 changed files with 283 additions and 101 deletions
|
@ -19,7 +19,7 @@
|
|||
import { DataStore } from "@api/index";
|
||||
import { showNotification } from "@api/Notifications";
|
||||
import { PlainSettings, Settings } from "@api/Settings";
|
||||
import { moment, Toasts } from "@webpack/common";
|
||||
import { moment, SettingsRouter, Toasts } from "@webpack/common";
|
||||
import { deflateSync, inflateSync } from "fflate";
|
||||
|
||||
import { getCloudAuth, getCloudUrl } from "./cloud";
|
||||
|
@ -172,6 +172,19 @@ export async function getCloudSettings(shouldNotify = true, force = false) {
|
|||
},
|
||||
});
|
||||
|
||||
if (res.status === 401) {
|
||||
// User switched to an account that isn't connected to cloud
|
||||
showNotification({
|
||||
title: "Cloud Settings",
|
||||
body: "Cloud sync was disabled because this account isn't connected to the Vencloud App. You can enable it again by connecting this account in Cloud Settings. (note: it will store your preferences separately)",
|
||||
color: "var(--yellow-360)",
|
||||
onClick: () => SettingsRouter.open("VencordCloud")
|
||||
});
|
||||
// Disable cloud sync globally
|
||||
Settings.cloud.authenticated = false;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (res.status === 404) {
|
||||
cloudSettingsLogger.info("No settings on the cloud");
|
||||
if (shouldNotify)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue