summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAAGaming <aa@mail.catvibers.me>2022-07-17 16:09:42 -0400
committerAAGaming <aa@mail.catvibers.me>2022-07-17 16:09:42 -0400
commit6e88c7c9ac1bf2b4cd21947724508d75caab439b (patch)
treeaa1f3c80455229e7cfdeb29a26f15a2532181ef2
parentf015e00561636a3b45369eb2127b73b7393b9291 (diff)
downloaddecky-loader-6e88c7c9ac1bf2b4cd21947724508d75caab439b.tar.gz
decky-loader-6e88c7c9ac1bf2b4cd21947724508d75caab439b.zip
Show warning when installing legacy pluginsv2.0.4-6e88c7c-pre
-rw-r--r--frontend/src/components/store/Store.tsx38
1 files changed, 27 insertions, 11 deletions
diff --git a/frontend/src/components/store/Store.tsx b/frontend/src/components/store/Store.tsx
index 01cf383d..ffad5426 100644
--- a/frontend/src/components/store/Store.tsx
+++ b/frontend/src/components/store/Store.tsx
@@ -1,4 +1,4 @@
-import { SteamSpinner } from 'decky-frontend-lib';
+import { ModalRoot, SteamSpinner, showModal, staticClasses } from 'decky-frontend-lib';
import { FC, useEffect, useState } from 'react';
import PluginCard from './PluginCard';
@@ -38,16 +38,32 @@ export async function installFromURL(url: string) {
});
}
-export async function requestLegacyPluginInstall(plugin: LegacyStorePlugin, selectedVer: string) {
- const formData = new FormData();
- formData.append('name', plugin.artifact);
- formData.append('artifact', `https://github.com/${plugin.artifact}/archive/refs/tags/${selectedVer}.zip`);
- formData.append('version', selectedVer);
- formData.append('hash', plugin.versions[selectedVer]);
- await fetch('http://localhost:1337/browser/install_plugin', {
- method: 'POST',
- body: formData,
- });
+export function requestLegacyPluginInstall(plugin: LegacyStorePlugin, selectedVer: string) {
+ showModal(
+ <ModalRoot
+ onOK={() => {
+ const formData = new FormData();
+ formData.append('name', plugin.artifact);
+ formData.append('artifact', `https://github.com/${plugin.artifact}/archive/refs/tags/${selectedVer}.zip`);
+ formData.append('version', selectedVer);
+ formData.append('hash', plugin.versions[selectedVer]);
+ fetch('http://localhost:1337/browser/install_plugin', {
+ method: 'POST',
+ body: formData,
+ });
+ }}
+ onCancel={() => {
+ // do nothing
+ }}
+ >
+ <div className={staticClasses.Title} style={{ flexDirection: 'column' }}>
+ Using legacy plugins
+ </div>
+ You are currently installing a <b>legacy</b> plugin. Legacy plugins are no longer supported and may have issues.
+ Legacy plugins do not support gamepad input. To interact with a legacy plugin, you will need to use the
+ touchscreen.
+ </ModalRoot>,
+ );
}
export async function requestPluginInstall(plugin: StorePlugin, selectedVer: StorePluginVersion) {