Merge aa/type-cleanup-py (work by marios, aa, wolv)

This commit is contained in:
TrainDoctor
2023-10-25 19:47:33 -07:00
parent dacd2c19eb
commit a7669799bc
27 changed files with 571 additions and 439 deletions
@@ -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<FilePickerProps> = ({
) : (
<div style={iconStyles}>
{file.realpath.includes('.') ? (
<FileIcon {...defaultStyles[extension]} {...styleDefObj[extension]} extension={''} />
<FileIcon
{...defaultStyles[extension as DefaultExtensionType]}
// @ts-expect-error
{...styleDefObj[extension]}
extension={''}
/>
) : (
<FileIcon />
)}
@@ -29,10 +29,10 @@ const BranchSelect: FunctionComponent<{}> = () => {
<Field label={t('BranchSelect.update_channel.label')} childrenContainerWidth={'fixed'}>
<Dropdown
rgOptions={Object.values(UpdateBranch)
.filter((branch) => 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) => {
@@ -26,10 +26,10 @@ const StoreSelect: FunctionComponent<{}> = () => {
<Field label={t('StoreSelect.store_channel.label')} childrenContainerWidth={'fixed'}>
<Dropdown
rgOptions={Object.values(Store)
.filter((store) => 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) => {
+2 -1
View File
@@ -38,7 +38,8 @@ export async function getStore(): Promise<Store> {
export async function getPluginList(): Promise<StorePlugin[]> {
let version = await window.DeckyPluginLoader.updateVersion();
let store = await getSetting<Store>('store', null);
let store = await getSetting<Store | null>('store', null);
let customURL = await getSetting<string>('store-url', 'https://plugins.deckbrew.xyz/plugins');
let storeURL;
if (store === null) {