mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-11-24 20:55:53 +00:00
unsupported installation warning
This commit is contained in:
@@ -224,7 +224,7 @@ class PluginBrowser:
|
||||
async with ClientSession() as client:
|
||||
res = await client.post(storeUrl+f"/{name}/versions/{version}/increment?isUpdate={isInstalled}", headers={
|
||||
"X-Decky-Version": get_loader_version()
|
||||
} ssl=get_ssl_context())
|
||||
}, ssl=get_ssl_context())
|
||||
if res.status != 200:
|
||||
logger.error(f"Server did not accept install count increment request. code: {res.status}")
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ class Updater:
|
||||
self.remoteVer: RemoteVer | None = None
|
||||
self.allRemoteVers: List[RemoteVer] = []
|
||||
self.localVer = helpers.get_loader_version()
|
||||
self.isSupported: bool = ON_LINUX
|
||||
self.repo = getenv('DECKY_REPO', 'SteamDeckHomebrew/decky-loader')
|
||||
self.git_branch = getenv('DECKY_BRANCH', 'dirty')
|
||||
|
||||
@@ -99,7 +100,8 @@ class Updater:
|
||||
"gitBranch": self.git_branch,
|
||||
"remote": self.remoteVer,
|
||||
"all": self.allRemoteVers,
|
||||
"updatable": self.localVer != "unknown" and self.localVer != "dev"
|
||||
"updatable": self.localVer != "unknown" and self.localVer != "dev",
|
||||
"supported": self.isSupported
|
||||
}
|
||||
|
||||
async def check_for_updates(self):
|
||||
|
||||
@@ -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)}>
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user