fix: improve error handling and logging in various components
This commit is contained in:
5 files changed
+140
-169
No files matched your search
+6
-1
@@ -44,7 +44,8 @@ export class Config {
|
|||||||
this.encrypt && this.crypto ? this.crypto.decrypt(fileStream) : fileStream
|
this.encrypt && this.crypto ? this.crypto.decrypt(fileStream) : fileStream
|
||||||
) as Record<string, unknown>;
|
) as Record<string, unknown>;
|
||||||
this.config = decryptedJSON;
|
this.config = decryptedJSON;
|
||||||
} catch {
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
this.config = {};
|
this.config = {};
|
||||||
await this.save();
|
await this.save();
|
||||||
}
|
}
|
||||||
@@ -63,6 +64,10 @@ export class Config {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
values () {
|
||||||
|
return this.config;
|
||||||
|
}
|
||||||
|
|
||||||
value(key: string) {
|
value(key: string) {
|
||||||
return {
|
return {
|
||||||
set: <T>(val: T) => {
|
set: <T>(val: T) => {
|
||||||
|
|||||||
+66
-116
@@ -283,51 +283,19 @@ export const downloadTheme = async (
|
|||||||
await path.normalize(`${themeFolder}/assets/${themeInfoObj.preview}`)
|
await path.normalize(`${themeFolder}/assets/${themeInfoObj.preview}`)
|
||||||
);
|
);
|
||||||
|
|
||||||
const downloadableThemes = await getDownloadableThemes();
|
|
||||||
custom_themes.update((themes) => {
|
custom_themes.update((themes) => {
|
||||||
const reloadedThemes = [...themes];
|
const matchedTheme = themes.find((t) => t.name === theme.name);
|
||||||
|
if (matchedTheme) {
|
||||||
for (const theme of downloadableThemes) {
|
matchedTheme.scriptUrl = themeScriptUrl;
|
||||||
if (theme.name === 'Default') continue; // never overwrite Default from remote
|
matchedTheme.assets = themeAssets;
|
||||||
|
matchedTheme.preview = themePreview;
|
||||||
if (!reloadedThemes.find((t) => t.name === theme.name)) {
|
matchedTheme.status = 'installed';
|
||||||
reloadedThemes.push(theme);
|
matchedTheme.progress = 1;
|
||||||
}
|
}
|
||||||
|
return themes;
|
||||||
const installedTheme = reloadedThemes.find((t) => t.name === theme.name);
|
|
||||||
if (installedTheme) {
|
|
||||||
const installedThemeVersion = new SemVer(installedTheme.version);
|
|
||||||
const downloadableThemeVersion = new SemVer(theme.version);
|
|
||||||
if (downloadableThemeVersion.compare(installedThemeVersion) > 0) {
|
|
||||||
installedTheme.updateAvailable = true;
|
|
||||||
const index = reloadedThemes.findIndex((t) => t.name === theme.name);
|
|
||||||
reloadedThemes[index] = installedTheme;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const installedTheme of reloadedThemes) {
|
|
||||||
if (installedTheme.name === 'Default') continue; // never touch Default
|
|
||||||
|
|
||||||
if (installedTheme.name === theme.name) {
|
|
||||||
installedTheme.name = themeInfoObj.name;
|
|
||||||
installedTheme.author = themeInfoObj.author;
|
|
||||||
installedTheme.version = themeInfoObj.version;
|
|
||||||
installedTheme.scriptUrl = themeScriptUrl;
|
|
||||||
installedTheme.assets = themeAssets;
|
|
||||||
installedTheme.preview = themePreview;
|
|
||||||
installedTheme.status = 'installed';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return reloadedThemes.sort((a, b) => {
|
|
||||||
if (a.name === 'Default') return -1;
|
|
||||||
if (b.name === 'Default') return 1;
|
|
||||||
if (a.status === 'installed' && b.status !== 'installed') return -1;
|
|
||||||
if (a.status !== 'installed' && b.status === 'installed') return 1;
|
|
||||||
return a.name.localeCompare(b.name);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await reloadThemes();
|
||||||
return {
|
return {
|
||||||
success: true,
|
success: true,
|
||||||
};
|
};
|
||||||
@@ -357,38 +325,20 @@ export const deleteTheme = async (themeToUninstall: Theme) => {
|
|||||||
return themes;
|
return themes;
|
||||||
});
|
});
|
||||||
await fs.remove(themeFolder, { recursive: true });
|
await fs.remove(themeFolder, { recursive: true });
|
||||||
const downloadableThemes = await getDownloadableThemes();
|
|
||||||
custom_themes.update((themes) => {
|
custom_themes.update((themes) => {
|
||||||
const reloadedThemes = [...themes];
|
const matchedTheme = themes.find((t) => t.name === themeToUninstall.name);
|
||||||
for (const theme of downloadableThemes) {
|
if (matchedTheme) {
|
||||||
if (theme.name === themeToUninstall.name) {
|
matchedTheme.scriptUrl = '';
|
||||||
const themeIndex = reloadedThemes.findIndex((t) => t.name === theme.name);
|
matchedTheme.assets = '';
|
||||||
if (themeIndex) {
|
matchedTheme.preview = `https://git.ez-pp.farm/EZPPFarm/EZPPLauncher-Themes/raw/branch/main/previews/${toSafeName(themeToUninstall.name)}.png`;
|
||||||
reloadedThemes.splice(themeIndex, 1);
|
matchedTheme.status = 'not-installed';
|
||||||
reloadedThemes.push(theme);
|
matchedTheme.updateAvailable = false;
|
||||||
}
|
}
|
||||||
}
|
return themes;
|
||||||
|
|
||||||
const installedTheme = reloadedThemes.find((t) => t.name === theme.name);
|
|
||||||
if (installedTheme) {
|
|
||||||
const installedThemeVersion = new SemVer(installedTheme.version);
|
|
||||||
const downloadableThemeVersion = new SemVer(theme.version);
|
|
||||||
if (downloadableThemeVersion.compare(installedThemeVersion) > 0) {
|
|
||||||
installedTheme.updateAvailable = true;
|
|
||||||
const index = reloadedThemes.findIndex((t) => t.name === theme.name);
|
|
||||||
reloadedThemes[index] = installedTheme;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return reloadedThemes.sort((a, b) => {
|
|
||||||
if (a.name === 'Default') return -1;
|
|
||||||
if (b.name === 'Default') return 1;
|
|
||||||
if (a.status === 'installed' && b.status !== 'installed') return -1;
|
|
||||||
if (a.status !== 'installed' && b.status === 'installed') return 1;
|
|
||||||
return a.name.localeCompare(b.name);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
await reloadThemes();
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -424,7 +374,8 @@ export const checkThemeFromFile = async (filePath: string) => {
|
|||||||
style: string;
|
style: string;
|
||||||
preview: string;
|
preview: string;
|
||||||
};
|
};
|
||||||
} catch {
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
return {
|
return {
|
||||||
success: false,
|
success: false,
|
||||||
error: 'Could not read theme file',
|
error: 'Could not read theme file',
|
||||||
@@ -464,54 +415,56 @@ export const importThemeFromFile = async (themeName: string, filePath: string) =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const themeInfo = await fs.readTextFile(await path.join(themeFolder, 'theme.json'));
|
|
||||||
const themeInfoObj = JSON.parse(themeInfo) as ThemeInfo;
|
|
||||||
const themeScriptUrl = convertFileSrc(
|
|
||||||
await path.normalize(`${themeFolder}/${themeInfoObj.entry}`)
|
|
||||||
);
|
|
||||||
const themeAssets = convertFileSrc(await path.normalize(`${themeFolder}/assets`));
|
|
||||||
const themePreview = convertFileSrc(
|
|
||||||
await path.normalize(`${themeFolder}/assets/${themeInfoObj.preview}`)
|
|
||||||
);
|
|
||||||
|
|
||||||
const downloadableThemes = await getDownloadableThemes();
|
await reloadThemes();
|
||||||
custom_themes.update((themes) => {
|
return {
|
||||||
const reloadedThemes = [...themes];
|
success: true,
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
for (const theme of downloadableThemes) {
|
export const reloadThemes = async () => {
|
||||||
if (theme.name === 'Default') continue; // never overwrite Default from remote
|
const [downloadableThemes, installedThemes] = await Promise.all([
|
||||||
|
getDownloadableThemes(),
|
||||||
|
getThemes(),
|
||||||
|
]);
|
||||||
|
|
||||||
if (!reloadedThemes.find((t) => t.name === theme.name)) {
|
const installedMap = new Map(installedThemes.map((t) => [t.name, t]));
|
||||||
reloadedThemes.push(theme);
|
const combinedMap = new Map(installedThemes.map((t) => [t.name, { ...t }]));
|
||||||
|
|
||||||
|
for (const downloadable of downloadableThemes) {
|
||||||
|
const installed = installedMap.get(downloadable.name);
|
||||||
|
|
||||||
|
if (installed) {
|
||||||
|
if (new SemVer(downloadable.version).compare(new SemVer(installed.version)) > 0) {
|
||||||
|
combinedMap.get(downloadable.name)!.updateAvailable = true;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
const installedTheme = reloadedThemes.find((t) => t.name === theme.name);
|
combinedMap.set(downloadable.name, downloadable);
|
||||||
if (installedTheme) {
|
|
||||||
const installedThemeVersion = new SemVer(installedTheme.version);
|
|
||||||
const downloadableThemeVersion = new SemVer(theme.version);
|
|
||||||
if (downloadableThemeVersion.compare(installedThemeVersion) > 0) {
|
|
||||||
installedTheme.updateAvailable = true;
|
|
||||||
const index = reloadedThemes.findIndex((t) => t.name === theme.name);
|
|
||||||
reloadedThemes[index] = installedTheme;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const installedTheme of reloadedThemes) {
|
|
||||||
if (installedTheme.name === 'Default') continue; // never touch Default
|
|
||||||
|
|
||||||
if (installedTheme.name === themeName) {
|
|
||||||
installedTheme.name = themeInfoObj.name;
|
|
||||||
installedTheme.author = themeInfoObj.author;
|
|
||||||
installedTheme.version = themeInfoObj.version;
|
|
||||||
installedTheme.scriptUrl = themeScriptUrl;
|
|
||||||
installedTheme.assets = themeAssets;
|
|
||||||
installedTheme.preview = themePreview;
|
|
||||||
installedTheme.status = 'installed';
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return reloadedThemes.sort((a, b) => {
|
const combinedThemes = [...combinedMap.values()];
|
||||||
|
|
||||||
|
custom_themes.update((storeThemes) => {
|
||||||
|
const storeMap = new Map(storeThemes.map((t) => [t.name, t]));
|
||||||
|
const ACTIVE_STATUSES = new Set(['downloading', 'extracting', 'deleting']);
|
||||||
|
|
||||||
|
for (const theme of combinedThemes) {
|
||||||
|
const storeTheme = storeMap.get(theme.name);
|
||||||
|
if (!storeTheme || ACTIVE_STATUSES.has(storeTheme.status)) continue;
|
||||||
|
|
||||||
|
storeTheme.scriptUrl = theme.scriptUrl;
|
||||||
|
storeTheme.assets = theme.assets;
|
||||||
|
storeTheme.preview = theme.preview;
|
||||||
|
storeTheme.version = theme.version;
|
||||||
|
storeTheme.author = theme.author;
|
||||||
|
storeTheme.updateAvailable = theme.updateAvailable;
|
||||||
|
}
|
||||||
|
|
||||||
|
const newThemes = combinedThemes.filter((t) => !storeMap.has(t.name));
|
||||||
|
const merged = [...storeThemes, ...newThemes];
|
||||||
|
|
||||||
|
return merged.sort((a, b) => {
|
||||||
if (a.name === 'Default') return -1;
|
if (a.name === 'Default') return -1;
|
||||||
if (b.name === 'Default') return 1;
|
if (b.name === 'Default') return 1;
|
||||||
if (a.status === 'installed' && b.status !== 'installed') return -1;
|
if (a.status === 'installed' && b.status !== 'installed') return -1;
|
||||||
@@ -519,9 +472,6 @@ export const importThemeFromFile = async (themeName: string, filePath: string) =
|
|||||||
return a.name.localeCompare(b.name);
|
return a.name.localeCompare(b.name);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
return {
|
|
||||||
success: true,
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export const toSafeName = (name: string) => {
|
export const toSafeName = (name: string) => {
|
||||||
|
|||||||
+56
-46
@@ -99,55 +99,13 @@
|
|||||||
disableReload();
|
disableReload();
|
||||||
setupValues();
|
setupValues();
|
||||||
launcherVersion.set(await getLauncherVersion());
|
launcherVersion.set(await getLauncherVersion());
|
||||||
platform.set(await getPlatform());
|
|
||||||
if ($platform !== 'windows' && $platform !== 'linux') unsupported_platform = true;
|
|
||||||
const isFirstStartup = await $userSettings.init();
|
const isFirstStartup = await $userSettings.init();
|
||||||
firstStartup.set(isFirstStartup);
|
firstStartup.set(isFirstStartup);
|
||||||
$userAuth.init();
|
$userAuth.init();
|
||||||
|
|
||||||
try {
|
|
||||||
const themeVolume = $userSettings.value('volume').get(0.15);
|
|
||||||
custom_theme_volume.set(themeVolume);
|
|
||||||
currentLoadingInfo.set('Loading themes...');
|
|
||||||
const downloadableThemes = await getDownloadableThemes();
|
|
||||||
const themes = await getThemes();
|
|
||||||
const combinedThemes = [...themes];
|
|
||||||
for (const theme of downloadableThemes) {
|
|
||||||
if (!combinedThemes.find((t) => t.name === theme.name)) combinedThemes.push(theme);
|
|
||||||
const installedTheme = themes.find((t) => t.name === theme.name);
|
|
||||||
if (installedTheme) {
|
|
||||||
const installedThemeVersion = new SemVer(installedTheme.version);
|
|
||||||
const downloadableThemeVersion = new SemVer(theme.version);
|
|
||||||
if (downloadableThemeVersion.compare(installedThemeVersion) > 0) {
|
|
||||||
installedTheme.updateAvailable = true;
|
|
||||||
const index = combinedThemes.findIndex((t) => t.name === theme.name);
|
|
||||||
combinedThemes[index] = installedTheme;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
custom_themes.set(combinedThemes);
|
|
||||||
const activeTheme = $userSettings.value('theme').get('Default');
|
|
||||||
const theme = themes.find((theme) => theme.name === activeTheme);
|
|
||||||
if (!theme) {
|
|
||||||
$userSettings.value('theme').set('Default');
|
|
||||||
await $userSettings.save();
|
|
||||||
loadTheme(themes[0], $custom_theme_container!, themeVolume);
|
|
||||||
} else {
|
|
||||||
loadTheme(theme, $custom_theme_container!, themeVolume);
|
|
||||||
}
|
|
||||||
} catch {
|
|
||||||
sileo.error({
|
|
||||||
title: 'An error occured!',
|
|
||||||
description: 'Failed to load theme',
|
|
||||||
fill: '#181825',
|
|
||||||
styles: {
|
|
||||||
description: 'text-center!',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
currentLoadingInfo.set('Loading config...');
|
currentLoadingInfo.set('Loading config...');
|
||||||
|
const config_theme = $userSettings.value('theme');
|
||||||
|
const config_theme_volume = $userSettings.value('volume');
|
||||||
const config_patching = $userSettings.value('patching');
|
const config_patching = $userSettings.value('patching');
|
||||||
const config_custom_cursor = $userSettings.value('custom_cursor');
|
const config_custom_cursor = $userSettings.value('custom_cursor');
|
||||||
const config_cursor_smoothening = $userSettings.value('cursor_smoothening');
|
const config_cursor_smoothening = $userSettings.value('cursor_smoothening');
|
||||||
@@ -156,6 +114,17 @@
|
|||||||
const config_discord_presence = $userSettings.value('discord_presence');
|
const config_discord_presence = $userSettings.value('discord_presence');
|
||||||
const config_tracking_enabled = $userSettings.value('tracking_consent');
|
const config_tracking_enabled = $userSettings.value('tracking_consent');
|
||||||
|
|
||||||
|
const localThemes = await getThemes();
|
||||||
|
const last_theme = localThemes.find((t) => t.name === config_theme.get('Default'));
|
||||||
|
if (!last_theme) {
|
||||||
|
$userSettings.value('theme').set('Default');
|
||||||
|
await $userSettings.save();
|
||||||
|
loadTheme(localThemes[0], $custom_theme_container!, config_theme_volume.get(0.15));
|
||||||
|
} else {
|
||||||
|
loadTheme(last_theme, $custom_theme_container!, config_theme_volume.get(0.15));
|
||||||
|
}
|
||||||
|
|
||||||
|
custom_theme_volume.set(config_theme_volume.get(0.15));
|
||||||
patch.set(config_patching.get(true));
|
patch.set(config_patching.get(true));
|
||||||
customCursor.set(config_custom_cursor.get(true));
|
customCursor.set(config_custom_cursor.get(true));
|
||||||
cursorSmoothening.set(config_cursor_smoothening.get(true));
|
cursorSmoothening.set(config_cursor_smoothening.get(true));
|
||||||
@@ -170,6 +139,7 @@
|
|||||||
customCursor.subscribe((val) => config_custom_cursor.set(val));
|
customCursor.subscribe((val) => config_custom_cursor.set(val));
|
||||||
cursorSmoothening.subscribe((val) => config_cursor_smoothening.set(val));
|
cursorSmoothening.subscribe((val) => config_cursor_smoothening.set(val));
|
||||||
reduceAnimations.subscribe((val) => config_reduce_animations.set(val));
|
reduceAnimations.subscribe((val) => config_reduce_animations.set(val));
|
||||||
|
|
||||||
discordPresence.subscribe(async (val) => {
|
discordPresence.subscribe(async (val) => {
|
||||||
config_discord_presence.set(val);
|
config_discord_presence.set(val);
|
||||||
try {
|
try {
|
||||||
@@ -180,7 +150,10 @@
|
|||||||
await presence.disconnect();
|
await presence.disconnect();
|
||||||
}
|
}
|
||||||
presenceLoading.set(false);
|
presenceLoading.set(false);
|
||||||
} catch {}
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
presenceLoading.set(false);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -190,7 +163,44 @@
|
|||||||
await presence.connect();
|
await presence.connect();
|
||||||
presenceLoading.set(false);
|
presenceLoading.set(false);
|
||||||
}
|
}
|
||||||
} catch {}
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
presenceLoading.set(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
currentLoadingInfo.set('Loading themes...');
|
||||||
|
const downloadableThemes = await getDownloadableThemes();
|
||||||
|
const combinedThemes = [...localThemes];
|
||||||
|
for (const theme of downloadableThemes) {
|
||||||
|
if (!combinedThemes.find((t) => t.name === theme.name)) combinedThemes.push(theme);
|
||||||
|
const installedTheme = localThemes.find((t) => t.name === theme.name);
|
||||||
|
if (installedTheme) {
|
||||||
|
const installedThemeVersion = new SemVer(installedTheme.version);
|
||||||
|
const downloadableThemeVersion = new SemVer(theme.version);
|
||||||
|
if (downloadableThemeVersion.compare(installedThemeVersion) > 0) {
|
||||||
|
installedTheme.updateAvailable = true;
|
||||||
|
const index = combinedThemes.findIndex((t) => t.name === theme.name);
|
||||||
|
combinedThemes[index] = installedTheme;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
custom_themes.set(combinedThemes);
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
sileo.error({
|
||||||
|
title: 'An error occured!',
|
||||||
|
description: 'Failed to load themes',
|
||||||
|
fill: '#181825',
|
||||||
|
styles: {
|
||||||
|
description: 'text-center!',
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
platform.set(await getPlatform());
|
||||||
|
if ($platform !== 'windows' && $platform !== 'linux') unsupported_platform = true;
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -225,7 +225,7 @@
|
|||||||
}
|
}
|
||||||
osuInstallationPath.set(selectedPath);
|
osuInstallationPath.set(selectedPath);
|
||||||
$userSettings.value('osu_installation_path').set(selectedPath);
|
$userSettings.value('osu_installation_path').set(selectedPath);
|
||||||
$userSettings.save();
|
await $userSettings.save();
|
||||||
sileo.success({
|
sileo.success({
|
||||||
title: 'Yay!',
|
title: 'Yay!',
|
||||||
description: 'osu! installation path set successfully.',
|
description: 'osu! installation path set successfully.',
|
||||||
@@ -642,7 +642,9 @@
|
|||||||
largeImageKey: 'ezppfarm',
|
largeImageKey: 'ezppfarm',
|
||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
} catch {}
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
await new Promise((res) => setTimeout(res, 1000));
|
await new Promise((res) => setTimeout(res, 1000));
|
||||||
await replaceUIFiles(osuPath, true);
|
await replaceUIFiles(osuPath, true);
|
||||||
@@ -740,7 +742,8 @@
|
|||||||
});
|
});
|
||||||
loginIsLoading = false;
|
loginIsLoading = false;
|
||||||
}
|
}
|
||||||
} catch {
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
sileo.error({
|
sileo.error({
|
||||||
title: 'Login failed!',
|
title: 'Login failed!',
|
||||||
description: 'There was an issue connecting to the server. Please try again later.',
|
description: 'There was an issue connecting to the server. Please try again later.',
|
||||||
@@ -1105,7 +1108,8 @@
|
|||||||
description: 'text-center!',
|
description: 'text-center!',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch {
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
sileo.error({
|
sileo.error({
|
||||||
title: 'Hmmm...',
|
title: 'Hmmm...',
|
||||||
description: 'An unknown error occurred while importing your theme.',
|
description: 'An unknown error occurred while importing your theme.',
|
||||||
|
|||||||
@@ -106,7 +106,8 @@
|
|||||||
message: 'Please check your username and password.',
|
message: 'Please check your username and password.',
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
} catch {
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
userLoginResult = {
|
userLoginResult = {
|
||||||
message: 'There was an issue connecting to the server. Please try again later.',
|
message: 'There was an issue connecting to the server. Please try again later.',
|
||||||
};
|
};
|
||||||
@@ -122,7 +123,8 @@
|
|||||||
preferredMode.set(userInfo.player.info.preferred_mode);
|
preferredMode.set(userInfo.player.info.preferred_mode);
|
||||||
preferredType.set(userInfo.player.info.preferred_type);
|
preferredType.set(userInfo.player.info.preferred_type);
|
||||||
}
|
}
|
||||||
} catch {
|
} catch (err) {
|
||||||
|
console.log(err);
|
||||||
userLoginResult = {
|
userLoginResult = {
|
||||||
message: 'There was an issue connecting to the server. Please try again later.',
|
message: 'There was an issue connecting to the server. Please try again later.',
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in new issue
Block a user