summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorAAGaming <aagaming@riseup.net>2026-10-17 20:31:17 -0400
committerAAGaming <aagaming@riseup.net>2026-10-17 20:31:17 -0400
commitdae497ef949d4b36b2bdc3537f4f52b1cfdafa2e (patch)
treec81f31754729e16c244d457618c262a01cb4c9dd /frontend
parent7611e381a8e3717d3b8a77b299c22042b9c97ea6 (diff)
downloaddecky-loader-dae497ef949d4b36b2bdc3537f4f52b1cfdafa2e.tar.gz
decky-loader-dae497ef949d4b36b2bdc3537f4f52b1cfdafa2e.zip
unsupported installation warning
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/components/DeckyErrorBoundary.tsx2
-rw-r--r--frontend/src/plugin-loader.tsx18
-rw-r--r--frontend/src/updater.ts1
3 files changed, 19 insertions, 2 deletions
diff --git a/frontend/src/components/DeckyErrorBoundary.tsx b/frontend/src/components/DeckyErrorBoundary.tsx
index 0846d765..f9032a2b 100644
--- a/frontend/src/components/DeckyErrorBoundary.tsx
+++ b/frontend/src/components/DeckyErrorBoundary.tsx
@@ -202,7 +202,7 @@ const DeckyErrorBoundary: FunctionComponent<DeckyErrorBoundaryProps> = ({ error,
<pre className={joinClassNames(classes.marginBottom)} style={{ marginTop: '0px' }}>
<code>
{identifier && `Error Reference: ${identifier}`}
- {versionInfo?.current && `\nDecky Version: ${versionInfo.current}`}
+ {versionInfo?.current && `\nDecky Version: ${versionInfo.current}${versionInfo.supported ? '' : '[U]'}`}
</code>
</pre>
<div className={joinClassNames(classes.likelyOccurred, classes.marginBottom)}>
diff --git a/frontend/src/plugin-loader.tsx b/frontend/src/plugin-loader.tsx
index 31f4ec7e..7f0f0160 100644
--- a/frontend/src/plugin-loader.tsx
+++ b/frontend/src/plugin-loader.tsx
@@ -12,7 +12,7 @@ import {
sleep,
} from '@decky/ui';
import { FC, lazy } from 'react';
-import { FaDownload, FaExclamationCircle, FaPlug } from 'react-icons/fa';
+import { FaDownload, FaExclamationCircle, FaExclamationTriangle, FaPlug } from 'react-icons/fa';
import DeckyIcon from './components/DeckyIcon';
import { DeckyState, DeckyStateContextProvider, UserInfo, useDeckyState } from './components/DeckyState';
@@ -153,6 +153,9 @@ class PluginLoader extends Logger {
Promise.all([this.getUserInfo(), this.updateVersion()])
.then(() => this.loadPlugins())
.then(() => this.log('Initialized'))
+ .then(() => {
+ this.notifySupportStatus();
+ }) // TODO safeguard this
.then(() => sleep(30000)) // Internet might not immediately be up
.then(() => this.checkPluginUpdates());
}
@@ -219,6 +222,19 @@ class PluginLoader extends Logger {
this.checkPluginUpdates();
}
+ private async notifySupportStatus() {
+ await this.routerHook.waitForUnlock();
+ if (this.deckyState.publicState().versionInfo?.supported) {
+ this.toaster.toast({
+ title: <TranslationHelper transClass={TranslationClass.PLUGIN_LOADER} transText="decky_unsupported" />,
+ body: <TranslationHelper transClass={TranslationClass.PLUGIN_LOADER} transText="decky_unsupported_body" />,
+ logo: <DeckyIcon />,
+ icon: <FaExclamationTriangle />,
+ onClick: () => Navigation.Navigate('/decky/settings'),
+ });
+ }
+ }
+
public async getUserInfo() {
const userInfo = await DeckyBackend.call<[], UserInfo>('utilities/get_user_info');
setSetting('user_info.user_name', userInfo.username);
diff --git a/frontend/src/updater.ts b/frontend/src/updater.ts
index 7f997b7a..c4b9034f 100644
--- a/frontend/src/updater.ts
+++ b/frontend/src/updater.ts
@@ -23,6 +23,7 @@ export interface VerInfo {
remote: RemoteVerInfo | null;
all: RemoteVerInfo[] | null;
updatable: boolean;
+ supported: boolean;
}
export const doUpdate = DeckyBackend.callable('updater/do_update');