mirror of
https://github.com/Equicord/Equicord.git
synced 2025-03-31 12:41:58 -04:00
Move Old Cloud Domains 2 New Domain
This commit is contained in:
parent
f51340778d
commit
eacc527b1a
3 changed files with 11 additions and 20 deletions
|
@ -48,8 +48,6 @@ function EquicordSettings() {
|
|||
});
|
||||
const settings = useSettings();
|
||||
|
||||
const discordInvite = "bFp57wxCkv";
|
||||
const vcDiscordInvite = "https://discord.gg/KGgvd6jPFu";
|
||||
const donateImage = React.useMemo(
|
||||
() => (Math.random() > 0.5 ? DEFAULT_DONATE_IMAGE : SHIGGY_DONATE_IMAGE),
|
||||
[],
|
||||
|
|
|
@ -13,7 +13,7 @@ import { User } from "discord-types/general";
|
|||
let data = {
|
||||
avatars: {} as Record<string, string>,
|
||||
};
|
||||
|
||||
const API_URL = "https://userpfp.github.io/UserPFP/source/data.json";
|
||||
const settings = definePluginSettings({
|
||||
preferNitro: {
|
||||
description: "Which avatar to use if both default animated (Nitro) pfp and UserPFP avatars are present",
|
||||
|
@ -22,21 +22,6 @@ const settings = definePluginSettings({
|
|||
{ label: "UserPFP", value: false },
|
||||
{ label: "Nitro", value: true, default: true },
|
||||
],
|
||||
},
|
||||
databaseToUse: {
|
||||
type: OptionType.SELECT,
|
||||
description: "Which Database url to use to load avatars, KNOW WHAT YOUR DOING",
|
||||
options: [
|
||||
{
|
||||
label: "UserPFP Main DB",
|
||||
value: "https://userpfp.github.io/UserPFP/source/data.json",
|
||||
default: true
|
||||
},
|
||||
{
|
||||
label: "UserPFP Backup DB",
|
||||
value: "https://userpfp.equicord.org/data.json"
|
||||
}
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -74,7 +59,7 @@ export default definePlugin({
|
|||
return data.avatars[user.id] ?? original(user, animated, size);
|
||||
},
|
||||
async start() {
|
||||
await fetch(settings.store.databaseToUse)
|
||||
await fetch(API_URL)
|
||||
.then(async res => {
|
||||
if (res.ok) this.data = data = await res.json();
|
||||
})
|
||||
|
|
|
@ -25,7 +25,15 @@ import { Logger } from "./Logger";
|
|||
import { openModal } from "./modal";
|
||||
|
||||
export const cloudLogger = new Logger("Cloud", "#39b7e0");
|
||||
export const getCloudUrl = () => new URL(Settings.cloud.url);
|
||||
export const cloudUrl = () => {
|
||||
if (Settings.cloud.url.includes("https://equicord.thororen.com") || Settings.cloud.url.includes("https://cloud.equicord.fyi")) {
|
||||
Settings.cloud.url = "https://cloud.equicord.org";
|
||||
Settings.cloud.authenticated = false;
|
||||
deauthorizeCloud();
|
||||
}
|
||||
return Settings.cloud.url;
|
||||
};
|
||||
export const getCloudUrl = () => new URL(cloudUrl());
|
||||
|
||||
const cloudUrlOrigin = () => getCloudUrl().origin;
|
||||
const getUserId = () => {
|
||||
|
|
Loading…
Add table
Reference in a new issue