diff --git a/README.md b/README.md index abfcade..b33f348 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,12 @@ A plugin based on [rclone](https://rclone.org/), which allows users to back-up g Support: **[SteamDeckHomebrew Discord](https://discord.gg/ZU74G2NJzk)**. +## Known Issues + +* The file picker does not work after a fresh installation. [Issue tracker](https://github.com/GedasFX/decky-cloud-save/issues/7). + +> Workaround: restart Steam and or Steam Deck. + ## Features * Ability to sync game saves or arbitrary files to the cloud. diff --git a/package.json b/package.json index 661afc3..9a0a782 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "decky-cloud-save", - "version": "1.1.1", + "version": "1.1.2", "description": "Manage cloud saves for games that do not support it in [current year].", "scripts": { "build": "shx rm -rf dist && rollup -c", diff --git a/plugin.json b/plugin.json index a085496..637e361 100644 --- a/plugin.json +++ b/plugin.json @@ -1,7 +1,7 @@ { "name": "Decky Cloud Save", "author": "GedasFX", - "flags": [], + "flags": ["debug"], "publish": { "tags": ["backup", "cloud", "rclone"], "description": "Manage cloud saves for games that do not support it in [current year].", diff --git a/src/components/Container.tsx b/src/components/Container.tsx index a95a9b6..9f6eeac 100644 --- a/src/components/Container.tsx +++ b/src/components/Container.tsx @@ -1,9 +1,12 @@ import { PropsWithChildren } from "react"; -export default function Container({ title, children }: PropsWithChildren<{ title: string }>) { +export default function Container({ title, children, help }: PropsWithChildren<{ title: string; help?: JSX.Element }>) { return ( -
-

{title}

+
+

+ {title} + {help} +

{children}
); diff --git a/src/components/HelpAssistant.tsx b/src/components/HelpAssistant.tsx new file mode 100644 index 0000000..efab02c --- /dev/null +++ b/src/components/HelpAssistant.tsx @@ -0,0 +1,32 @@ +import { ConfirmModal, Menu, MenuItem, Navigation, showContextMenu, showModal } from "decky-frontend-lib"; + +export function HelpAssistant({ entries }: { entries: { label: string; description: string; issueId?: string }[] }) { + const openModal = (title: string, description: string, issueId?: string) => { + showModal( + {description}} + bOKDisabled={!issueId} + strOKButtonText="Go to Issue" + strCancelButtonText="Close" + onOK={() => Navigation.NavigateToExternalWeb(`https://github.com/GedasFX/decky-cloud-save/issues/${issueId}`)} + /> + ); + }; + + const onClick = () => { + showContextMenu( + + {entries.map((e) => ( + openModal(e.label, e.description, e.issueId)}>{e.label} + ))} + + ); + }; + + return ( + + Help? + + ); +} diff --git a/src/pages/ConfigurePathsPage.tsx b/src/pages/ConfigurePathsPage.tsx index f9bd9cc..30be120 100644 --- a/src/pages/ConfigurePathsPage.tsx +++ b/src/pages/ConfigurePathsPage.tsx @@ -5,6 +5,7 @@ import AddNewPathButton from "../components/AddNewPathButton"; import { toastError } from "../utils"; import { RenderExistingPathButton } from "../components/RenderExistingPathButton"; import Container from "../components/Container"; +import { HelpAssistant } from "../components/HelpAssistant"; export default function ConfigurePathsPage({ serverApi }: PageProps<{}>) { const [paths, setPaths] = useState(undefined); @@ -32,7 +33,20 @@ export default function ConfigurePathsPage({ serverApi }: PageProps<{}>) { useEffect(() => onPathsUpdated(), []); return ( - + + } + >