From 4ad15568cd2802f9499bd3961c5fe24391745502 Mon Sep 17 00:00:00 2001 From: TrainDoctor Date: Sun, 23 Oct 2022 13:04:00 -0700 Subject: Merge drop-legacy to main. --- frontend/src/components/store/PluginCard.tsx | 73 ++++++---------------------- 1 file changed, 14 insertions(+), 59 deletions(-) (limited to 'frontend/src/components/store/PluginCard.tsx') diff --git a/frontend/src/components/store/PluginCard.tsx b/frontend/src/components/store/PluginCard.tsx index 0155ff99..03f11b4a 100644 --- a/frontend/src/components/store/PluginCard.tsx +++ b/frontend/src/components/store/PluginCard.tsx @@ -11,17 +11,10 @@ import { } from 'decky-frontend-lib'; import { FC, useRef, useState } from 'react'; -import { - LegacyStorePlugin, - StorePlugin, - StorePluginVersion, - isLegacyPlugin, - requestLegacyPluginInstall, - requestPluginInstall, -} from '../../store'; +import { StorePlugin, StorePluginVersion, requestPluginInstall } from '../../store'; interface PluginCardProps { - plugin: StorePlugin | LegacyStorePlugin; + plugin: StorePlugin; } const PluginCard: FC = ({ plugin }) => { @@ -63,22 +56,13 @@ const PluginCard: FC = ({ plugin }) => { }} >
- Router.NavigateToExternalWeb('https://github.com/' + plugin.artifact)} > - {isLegacyPlugin(plugin) ? ( -
- - {plugin.artifact.split('/')[0]}/ - - {plugin.artifact.split('/')[1]} -
- ) : ( - plugin.name - )} -
+ {plugin.name} +
= ({ plugin }) => { width: 'auto', height: '160px', }} - src={ - isLegacyPlugin(plugin) - ? `https://cdn.tzatzikiweeb.moe/file/steam-deck-homebrew/artifact_images/${plugin.artifact.replace( - '/', - '_', - )}.png` - : `https://cdn.tzatzikiweeb.moe/file/steam-deck-homebrew/artifact_images/${plugin.name.replace( - '/', - '_', - )}.png` - } + src={`https://cdn.tzatzikiweeb.moe/file/steam-deck-homebrew/artifact_images/${plugin.name.replace( + '/', + '_', + )}.png`} />
= ({ plugin }) => { {tag == 'root' ? 'Requires root' : tag} ))} - {isLegacyPlugin(plugin) && ( - - legacy - - )}

@@ -194,11 +158,7 @@ const PluginCard: FC = ({ plugin }) => { - isLegacyPlugin(plugin) - ? requestLegacyPluginInstall(plugin, Object.keys(plugin.versions)[selectedOption]) - : requestPluginInstall(plugin.name, plugin.versions[selectedOption]) - } + onClick={() => requestPluginInstall(plugin.name, plugin.versions[selectedOption])} > Install @@ -211,15 +171,10 @@ const PluginCard: FC = ({ plugin }) => { > ({ - data: k, - label: v, - })) - : plugin.versions.map((version: StorePluginVersion, index) => ({ - data: index, - label: version.name, - }))) as SingleDropdownOption[] + plugin.versions.map((version: StorePluginVersion, index) => ({ + data: index, + label: version.name, + })) as SingleDropdownOption[] } strDefaultLabel={'Select a version'} selectedOption={selectedOption} -- cgit v1.2.3