From 79e8af8be66a27835611dec062bf85cac7b09468 Mon Sep 17 00:00:00 2001 From: AAGaming Date: Wed, 29 Jun 2022 12:17:25 -0400 Subject: update store for new format, awaiting cors to test --- frontend/src/components/store/PluginCard.tsx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 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 28989a88..20ffead6 100644 --- a/frontend/src/components/store/PluginCard.tsx +++ b/frontend/src/components/store/PluginCard.tsx @@ -10,7 +10,7 @@ import { } from 'decky-frontend-lib'; import { FC, useRef, useState } from 'react'; -import { StorePlugin, requestPluginInstall } from './Store'; +import { StorePlugin, StorePluginVersion, requestPluginInstall } from './Store'; interface PluginCardProps { plugin: StorePlugin; @@ -62,10 +62,9 @@ const PluginCard: FC = ({ plugin }) => { Router.NavigateToExternalWeb('https://github.com/' + plugin.artifact)} + // onClick={() => Router.NavigateToExternalWeb('https://github.com/' + plugin.artifact)} > - {plugin.artifact.split('/')[0]}/ - {plugin.artifact.split('/')[1]} + {plugin.name}
= ({ plugin }) => { width: 'auto', height: '160px', }} - src={`https://cdn.tzatzikiweeb.moe/file/steam-deck-homebrew/artifact_images/${plugin.artifact.replace( + src={`https://cdn.tzatzikiweeb.moe/file/steam-deck-homebrew/artifact_images/${plugin.name.replace( '/', '_', )}.png`} @@ -133,7 +132,7 @@ const PluginCard: FC = ({ plugin }) => { > requestPluginInstall(plugin, Object.keys(plugin.versions)[selectedOption])} + onClick={() => requestPluginInstall(plugin, plugin.versions[selectedOption])} > Install @@ -145,9 +144,9 @@ const PluginCard: FC = ({ plugin }) => { > ({ - data: k, - label: v, + plugin.versions.map((version: StorePluginVersion, index) => ({ + data: index, + label: version.name, })) as SingleDropdownOption[] } strDefaultLabel={'Select a version'} -- cgit v1.2.3