Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions frontend/src/components/settings/pages/plugin_list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ import {
DialogBody,
DialogButton,
DialogControlsSection,
Focusable,
GamepadEvent,
Menu,
MenuItem,
NavEntryPositionPreferences,
ReorderableEntry,
ReorderableList,
showContextMenu,
Expand Down Expand Up @@ -98,7 +100,7 @@ function PluginInteractables(props: { entry: ReorderableEntry<PluginTableData> }
};

return (
<>
<Focusable navEntryPreferPosition={NavEntryPositionPreferences.MAINTAIN_X} style={{ display: 'flex' }}>
{update ? (
<DialogButton
style={{ height: '40px', minWidth: '60px', marginRight: '10px' }}
Expand Down Expand Up @@ -137,7 +139,7 @@ function PluginInteractables(props: { entry: ReorderableEntry<PluginTableData> }
>
<FaEllipsisH />
</DialogButton>
</>
</Focusable>
);
}

Expand All @@ -156,7 +158,7 @@ export default function PluginList({ isDeveloper }: { isDeveloper: boolean }) {

useEffect(() => {
DeckyPluginLoader.checkPluginUpdates();
}, []);
}, [updates]);

const [pluginEntries, setPluginEntries] = useState<ReorderableEntry<PluginTableData>[]>([]);
const hiddenPluginsService = DeckyPluginLoader.hiddenPluginsService;
Expand Down
6 changes: 5 additions & 1 deletion frontend/src/components/settings/pages/testing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {
DialogControlsSection,
Field,
Focusable,
NavEntryPositionPreferences,
Navigation,
ProgressBar,
SteamSpinner,
Expand Down Expand Up @@ -87,7 +88,10 @@ export default function TestingVersionList() {
</>
}
>
<Focusable style={{ height: '40px', marginLeft: 'auto', display: 'flex' }}>
<Focusable
style={{ height: '40px', marginLeft: 'auto', display: 'flex' }}
navEntryPreferPosition={NavEntryPositionPreferences.MAINTAIN_X}
>
<DialogButton
style={{ height: '40px', minWidth: '60px', marginRight: '10px' }}
onClick={async () => {
Expand Down
15 changes: 13 additions & 2 deletions frontend/src/components/store/PluginCard.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
import { ButtonItem, Dropdown, Focusable, PanelSectionRow, SingleDropdownOption, SuspensefulImage } from '@decky/ui';
import {
ButtonItem,
Dropdown,
Focusable,
NavEntryPositionPreferences,
PanelSectionRow,
SingleDropdownOption,
SuspensefulImage,
} from '@decky/ui';
import { CSSProperties, FC, useState } from 'react';
import { useTranslation } from 'react-i18next';
import { FaArrowDown, FaArrowUp, FaCheck, FaDownload, FaRecycle } from 'react-icons/fa';
Expand Down Expand Up @@ -139,7 +147,10 @@ const PluginCard: FC<PluginCardProps> = ({ storePlugin, installedPlugin }) => {
</div>
<div className="deckyStoreCardButtonRow">
<PanelSectionRow>
<Focusable style={{ display: 'flex', gap: '5px', padding: 0 }}>
<Focusable
style={{ display: 'flex', gap: '5px', padding: 0 }}
navEntryPreferPosition={NavEntryPositionPreferences.MAINTAIN_X}
>
<div
className="deckyStoreCardInstallContainer"
style={
Expand Down
7 changes: 5 additions & 2 deletions frontend/src/store.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { compare } from 'compare-versions';
import { compare, validate } from 'compare-versions';

import { InstallType, Plugin, installPlugin, installPlugins } from './plugin';
import { getSetting, setSetting } from './utils/settings';
Expand Down Expand Up @@ -120,11 +120,14 @@ export async function checkForPluginUpdates(plugins: Plugin[]): Promise<PluginUp
const remotePlugin = serverData?.find((x) => x.name == plugin.name);
//FIXME: Ugly hack since plugin.version might be null during evaluation,
//so this will set the older version possible
const curVer = plugin.version ? plugin.version : '0.0';
const curVer = plugin.version ? plugin.version : '0.0.0';

if (
remotePlugin &&
remotePlugin.versions?.length > 0 &&
plugin.version != remotePlugin?.versions?.[0]?.name &&
validate(remotePlugin.versions?.[0]?.name) &&
validate(curVer) &&
compare(remotePlugin?.versions?.[0]?.name, curVer, '>')
) {
updateMap.set(plugin.name, remotePlugin.versions[0]);
Expand Down