Addition of proper branch slection (#168)

* This is a bit better, but branch selection still isn't working -_-

* I'm the king of oversight

* Selecting different branch checks for updates

* Stable doesn't detect old versions, which indicates it doesn't work

* Start adding deckyState for plugin updating

* Few tweaks

* Disable nightly selection

* Update decky-frontend-lib and move useSetting set setting to async
This commit is contained in:
TrainDoctor
2022-09-01 13:46:49 -07:00
committed by GitHub
parent 16a6e9b6a9
commit eb439574be
9 changed files with 80 additions and 49 deletions
@@ -55,20 +55,12 @@ function PatchNotesModal({ versionInfo, closeModal }: { versionInfo: VerInfo | n
}
export default function UpdaterSettings() {
const { isLoaderUpdating, setIsLoaderUpdating } = useDeckyState();
const { isLoaderUpdating, setIsLoaderUpdating, versionInfo, setVersionInfo } = useDeckyState();
const [versionInfo, setVersionInfo] = useState<VerInfo | null>(null);
const [checkingForUpdates, setCheckingForUpdates] = useState<boolean>(false);
const [updateProgress, setUpdateProgress] = useState<number>(-1);
const [reloading, setReloading] = useState<boolean>(false);
useEffect(() => {
(async () => {
const res = (await callUpdaterMethod('get_version')) as { result: VerInfo };
setVersionInfo(res.result);
})();
}, []);
useEffect(() => {
window.DeckyUpdater = {
updateProgress: (i) => {