summaryrefslogtreecommitdiff
path: root/frontend/src/components/modals
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2023-12-30 21:32:23 -0500
committerAAGaming <aagaming@riseup.net>2023-12-30 21:32:23 -0500
commit40c7c1b515abf4abcecd6480afb28f27fb71d0f0 (patch)
tree576399085651b6e7cb0c37876ed6c2b3d0452dd7 /frontend/src/components/modals
parent70104065e2145e9a04fef4ae28ec9875a6114e2d (diff)
downloaddecky-loader-40c7c1b515abf4abcecd6480afb28f27fb71d0f0.tar.gz
decky-loader-40c7c1b515abf4abcecd6480afb28f27fb71d0f0.zip
port updater to ws, also small refactoring
Diffstat (limited to 'frontend/src/components/modals')
-rw-r--r--frontend/src/components/modals/MultiplePluginsInstallModal.tsx2
-rw-r--r--frontend/src/components/modals/PluginInstallModal.tsx2
-rw-r--r--frontend/src/components/modals/PluginUninstallModal.tsx2
-rw-r--r--frontend/src/components/modals/filepicker/index.tsx2
-rw-r--r--frontend/src/components/modals/filepicker/patches/library.ts4
5 files changed, 5 insertions, 7 deletions
diff --git a/frontend/src/components/modals/MultiplePluginsInstallModal.tsx b/frontend/src/components/modals/MultiplePluginsInstallModal.tsx
index febdc38d..bfbff08c 100644
--- a/frontend/src/components/modals/MultiplePluginsInstallModal.tsx
+++ b/frontend/src/components/modals/MultiplePluginsInstallModal.tsx
@@ -46,7 +46,7 @@ const MultiplePluginsInstallModal: FC<MultiplePluginsInstallModalProps> = ({
setLoading(true);
await onOK();
setTimeout(() => Navigation.OpenQuickAccessMenu(QuickAccessTab.Decky), 250);
- setTimeout(() => window.DeckyPluginLoader.checkPluginUpdates(), 1000);
+ setTimeout(() => DeckyPluginLoader.checkPluginUpdates(), 1000);
}}
onCancel={async () => {
await onCancel();
diff --git a/frontend/src/components/modals/PluginInstallModal.tsx b/frontend/src/components/modals/PluginInstallModal.tsx
index b37dbc65..bf263b6d 100644
--- a/frontend/src/components/modals/PluginInstallModal.tsx
+++ b/frontend/src/components/modals/PluginInstallModal.tsx
@@ -34,7 +34,7 @@ const PluginInstallModal: FC<PluginInstallModalProps> = ({
setLoading(true);
await onOK();
setTimeout(() => Navigation.OpenQuickAccessMenu(QuickAccessTab.Decky), 250);
- setTimeout(() => window.DeckyPluginLoader.checkPluginUpdates(), 1000);
+ setTimeout(() => DeckyPluginLoader.checkPluginUpdates(), 1000);
}}
onCancel={async () => {
await onCancel();
diff --git a/frontend/src/components/modals/PluginUninstallModal.tsx b/frontend/src/components/modals/PluginUninstallModal.tsx
index e9c243b6..3fc0a71f 100644
--- a/frontend/src/components/modals/PluginUninstallModal.tsx
+++ b/frontend/src/components/modals/PluginUninstallModal.tsx
@@ -19,7 +19,7 @@ const PluginUninstallModal: FC<PluginUninstallModalProps> = ({ name, title, butt
await uninstallPlugin(name);
// uninstalling a plugin resets the hidden setting for it server-side
// we invalidate here so if you re-install it, you won't have an out-of-date hidden filter
- await window.DeckyPluginLoader.hiddenPluginsService.invalidate();
+ await DeckyPluginLoader.hiddenPluginsService.invalidate();
}}
strTitle={title}
strOKButtonText={buttonText}
diff --git a/frontend/src/components/modals/filepicker/index.tsx b/frontend/src/components/modals/filepicker/index.tsx
index 2dfa3ccd..2fbc800b 100644
--- a/frontend/src/components/modals/filepicker/index.tsx
+++ b/frontend/src/components/modals/filepicker/index.tsx
@@ -95,7 +95,7 @@ const sortOptions = [
},
];
-const getList = window.DeckyBackend.callable<
+const getList = DeckyBackend.callable<
[
path: string,
includeFiles?: boolean,
diff --git a/frontend/src/components/modals/filepicker/patches/library.ts b/frontend/src/components/modals/filepicker/patches/library.ts
index d398b83d..076e78f6 100644
--- a/frontend/src/components/modals/filepicker/patches/library.ts
+++ b/frontend/src/components/modals/filepicker/patches/library.ts
@@ -13,9 +13,7 @@ function rePatch() {
const details = window.appDetailsStore.GetAppDetails(appid);
logger.debug('game details', details);
// strShortcutStartDir
- const file = await window.DeckyPluginLoader.openFilePicker(
- details?.strShortcutStartDir.replaceAll('"', '') || '/',
- );
+ const file = await DeckyPluginLoader.openFilePicker(details?.strShortcutStartDir.replaceAll('"', '') || '/');
logger.debug('user selected', file);
window.SteamClient.Apps.SetShortcutExe(appid, JSON.stringify(file.path));
const pathArr = file.path.split('/');