summaryrefslogtreecommitdiff
path: root/frontend/src/store.tsx
diff options
context:
space:
mode:
authorTrainDoctor <traindoctor@protonmail.com>2022-10-23 13:04:00 -0700
committerTrainDoctor <traindoctor@protonmail.com>2022-10-23 13:04:00 -0700
commit4ad15568cd2802f9499bd3961c5fe24391745502 (patch)
treec66db7a36e8ae219cfbe1b236d0168f28594e115 /frontend/src/store.tsx
parent58849b30024d816f374e11c5489fd5adbcd9a22d (diff)
downloaddecky-loader-4ad15568cd2802f9499bd3961c5fe24391745502.tar.gz
decky-loader-4ad15568cd2802f9499bd3961c5fe24391745502.zip
Merge drop-legacy to main.
Diffstat (limited to 'frontend/src/store.tsx')
-rw-r--r--frontend/src/store.tsx49
1 files changed, 1 insertions, 48 deletions
diff --git a/frontend/src/store.tsx b/frontend/src/store.tsx
index 10c35406..cc0e4cf0 100644
--- a/frontend/src/store.tsx
+++ b/frontend/src/store.tsx
@@ -1,5 +1,3 @@
-import { ConfirmModal, showModal, staticClasses } from 'decky-frontend-lib';
-
import { Plugin } from './plugin';
export interface StorePluginVersion {
@@ -17,22 +15,12 @@ export interface StorePlugin {
image_url: string;
}
-export interface LegacyStorePlugin {
- artifact: string;
- versions: {
- [version: string]: string;
- };
- author: string;
- description: string;
- tags: string[];
-}
-
// name: version
export type PluginUpdateMapping = Map<string, StorePluginVersion>;
export async function getPluginList(): Promise<StorePlugin[]> {
let version = await window.DeckyPluginLoader.updateVersion();
- return fetch('https://beta.deckbrew.xyz/plugins', {
+ return fetch('https://plugins.deckbrew.xyz/plugins', {
method: 'GET',
headers: {
'X-Decky-Version': version.current,
@@ -40,12 +28,6 @@ export async function getPluginList(): Promise<StorePlugin[]> {
}).then((r) => r.json());
}
-export function getLegacyPluginList(): Promise<LegacyStorePlugin[]> {
- return fetch('https://plugins.deckbrew.xyz/get_plugins', {
- method: 'GET',
- }).then((r) => r.json());
-}
-
export async function installFromURL(url: string) {
const splitURL = url.split('/');
await window.DeckyPluginLoader.callServerMethod('install_plugin', {
@@ -54,31 +36,6 @@ export async function installFromURL(url: string) {
});
}
-export function requestLegacyPluginInstall(plugin: LegacyStorePlugin, selectedVer: string) {
- showModal(
- <ConfirmModal
- onOK={() => {
- window.DeckyPluginLoader.callServerMethod('install_plugin', {
- name: plugin.artifact,
- artifact: `https://github.com/${plugin.artifact}/archive/refs/tags/${selectedVer}.zip`,
- version: selectedVer,
- hash: plugin.versions[selectedVer],
- });
- }}
- onCancel={() => {
- // do nothing
- }}
- >
- <div className={staticClasses.Title} style={{ flexDirection: 'column', boxShadow: 'unset' }}>
- 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.
- </ConfirmModal>,
- );
-}
-
export async function requestPluginInstall(plugin: string, selectedVer: StorePluginVersion) {
await window.DeckyPluginLoader.callServerMethod('install_plugin', {
name: plugin,
@@ -99,7 +56,3 @@ export async function checkForUpdates(plugins: Plugin[]): Promise<PluginUpdateMa
}
return updateMap;
}
-
-export function isLegacyPlugin(plugin: LegacyStorePlugin | StorePlugin): plugin is LegacyStorePlugin {
- return 'artifact' in plugin;
-}