From a7669799bca3ff4089ab81fde924b2d2f787cf0f Mon Sep 17 00:00:00 2001 From: TrainDoctor Date: Wed, 25 Oct 2023 19:47:33 -0700 Subject: Merge aa/type-cleanup-py (work by marios, aa, wolv) --- frontend/src/components/modals/filepicker/index.tsx | 9 +++++++-- frontend/src/components/settings/pages/general/BranchSelect.tsx | 6 +++--- frontend/src/components/settings/pages/general/StoreSelect.tsx | 6 +++--- frontend/src/store.tsx | 3 ++- 4 files changed, 15 insertions(+), 9 deletions(-) (limited to 'frontend/src') diff --git a/frontend/src/components/modals/filepicker/index.tsx b/frontend/src/components/modals/filepicker/index.tsx index ae745c9c..c4e72d95 100644 --- a/frontend/src/components/modals/filepicker/index.tsx +++ b/frontend/src/components/modals/filepicker/index.tsx @@ -13,7 +13,7 @@ import { } from 'decky-frontend-lib'; import { filesize } from 'filesize'; import { FunctionComponent, useCallback, useEffect, useMemo, useState } from 'react'; -import { FileIcon, defaultStyles } from 'react-file-icon'; +import { DefaultExtensionType, FileIcon, defaultStyles } from 'react-file-icon'; import { useTranslation } from 'react-i18next'; import { FaArrowUp, FaFolder } from 'react-icons/fa'; @@ -316,7 +316,12 @@ const FilePicker: FunctionComponent = ({ ) : (
{file.realpath.includes('.') ? ( - + ) : ( )} diff --git a/frontend/src/components/settings/pages/general/BranchSelect.tsx b/frontend/src/components/settings/pages/general/BranchSelect.tsx index 9b304f3a..1af06823 100644 --- a/frontend/src/components/settings/pages/general/BranchSelect.tsx +++ b/frontend/src/components/settings/pages/general/BranchSelect.tsx @@ -29,10 +29,10 @@ const BranchSelect: FunctionComponent<{}> = () => { typeof branch == 'string') + .filter((branch) => typeof branch == 'number') .map((branch) => ({ - label: tBranches[UpdateBranch[branch]], - data: UpdateBranch[branch], + label: tBranches[branch as number], + data: branch, }))} selectedOption={selectedBranch} onChange={async (newVal) => { diff --git a/frontend/src/components/settings/pages/general/StoreSelect.tsx b/frontend/src/components/settings/pages/general/StoreSelect.tsx index ebf1bd81..3cb80303 100644 --- a/frontend/src/components/settings/pages/general/StoreSelect.tsx +++ b/frontend/src/components/settings/pages/general/StoreSelect.tsx @@ -26,10 +26,10 @@ const StoreSelect: FunctionComponent<{}> = () => { typeof store == 'string') + .filter((store) => typeof store == 'number') .map((store) => ({ - label: tStores[Store[store]], - data: Store[store], + label: tStores[store as number], + data: store, }))} selectedOption={selectedStore} onChange={async (newVal) => { diff --git a/frontend/src/store.tsx b/frontend/src/store.tsx index 846c4766..fd458bef 100644 --- a/frontend/src/store.tsx +++ b/frontend/src/store.tsx @@ -38,7 +38,8 @@ export async function getStore(): Promise { export async function getPluginList(): Promise { let version = await window.DeckyPluginLoader.updateVersion(); - let store = await getSetting('store', null); + let store = await getSetting('store', null); + let customURL = await getSetting('store-url', 'https://plugins.deckbrew.xyz/plugins'); let storeURL; if (store === null) { -- cgit v1.2.3