From 8b3f569a09db9daf7748426f916a66591159928f Mon Sep 17 00:00:00 2001 From: AAGaming Date: Sun, 21 Aug 2022 16:41:25 -0400 Subject: Add plugin updater, notification badge, fixes --- frontend/src/components/store/PluginCard.tsx | 18 +++++++++--------- 1 file changed, 9 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 5a0c34ec..a6e9458a 100644 --- a/frontend/src/components/store/PluginCard.tsx +++ b/frontend/src/components/store/PluginCard.tsx @@ -15,18 +15,15 @@ import { LegacyStorePlugin, StorePlugin, StorePluginVersion, + isLegacyPlugin, requestLegacyPluginInstall, requestPluginInstall, -} from './Store'; +} from '../../store'; interface PluginCardProps { plugin: StorePlugin | LegacyStorePlugin; } -function isLegacyPlugin(plugin: LegacyStorePlugin | StorePlugin): plugin is LegacyStorePlugin { - return 'artifact' in plugin; -} - const PluginCard: FC = ({ plugin }) => { const [selectedOption, setSelectedOption] = useState(0); const buttonRef = useRef(null); @@ -119,13 +116,16 @@ const PluginCard: FC = ({ plugin }) => {

Author: {plugin.author}

-

- Tags: + }} + > + Tags: {plugin.tags.map((tag: string) => ( = ({ plugin }) => { onClick={() => isLegacyPlugin(plugin) ? requestLegacyPluginInstall(plugin, Object.keys(plugin.versions)[selectedOption]) - : requestPluginInstall(plugin, plugin.versions[selectedOption]) + : requestPluginInstall(plugin.name, plugin.versions[selectedOption]) } > Install -- cgit v1.2.3