diff --git a/src/renderer/components/settings/setting-radio-array.component.tsx b/src/renderer/components/settings/setting-radio-array.component.tsx index 60eb44a1d..c6607760f 100644 --- a/src/renderer/components/settings/setting-radio-array.component.tsx +++ b/src/renderer/components/settings/setting-radio-array.component.tsx @@ -18,10 +18,15 @@ export function SettingRadioArray({ id, items, selectedItemId, selectedItemVa return item.id === selectedItemId || item.value === selectedItemValue; } + const selectItem = (item: RadioItem) => { + if(item.disabled){ return; } + onItemSelected?.(item); + } + return (
{items.map(i => ( -
onItemSelected(i)} key={i.id} className={`py-3 w-full flex cursor-pointer justify-between items-center rounded-md px-2 transition-colors duration-200 ${isSelected(i) ? "bg-light-main-color-3 dark:bg-main-color-3" : "bg-light-main-color-1 dark:bg-main-color-1"} ${i.className}`}> +
selectItem(i)} key={i.id} className={`py-3 w-full flex ${i.disabled ? "cursor-not-allowed" : "cursor-pointer"} ${i.disabled && "brightness-75"} justify-between items-center rounded-md px-2 transition-colors duration-200 ${isSelected(i) ? "bg-light-main-color-3 dark:bg-main-color-3" : "bg-light-main-color-1 dark:bg-main-color-1"} ${i.className}`}>
@@ -47,4 +52,5 @@ export interface RadioItem { textIcon?: string; className?: string; value?: T; + disabled?: boolean; } diff --git a/src/renderer/pages/settings-page.component.tsx b/src/renderer/pages/settings-page.component.tsx index bccd2bf6f..f813fd9a2 100644 --- a/src/renderer/pages/settings-page.component.tsx +++ b/src/renderer/pages/settings-page.component.tsx @@ -235,7 +235,7 @@ export function SettingsPage() { }, - { id: 2, text: "Oculus Store (PC)", value: BsStore.OCULUS, icon: }, + { id: 2, text: "Oculus Store (PC)", value: BsStore.OCULUS, icon: , disabled: true}, { id: 0, text: t("pages.settings.steam-and-oculus.download-platform.always-ask"), value: undefined, }, ]} selectedItemValue={downloadStore} onItemSelected={handleChangeBsStore}/> diff --git a/src/renderer/services/bs-version-download/bs-downloader.service.ts b/src/renderer/services/bs-version-download/bs-downloader.service.ts index 200a5df85..f36d18768 100644 --- a/src/renderer/services/bs-version-download/bs-downloader.service.ts +++ b/src/renderer/services/bs-version-download/bs-downloader.service.ts @@ -75,7 +75,7 @@ export class BsDownloaderService extends AbstractBsDownloaderService { public async downloadVersion(version: BSVersion, from?: BsStore): Promise { if(!from){ - from = this.defaultStore ?? await this.chooseStoreToDownloadFrom(); + from = this.defaultStore === BsStore.STEAM ? BsStore.STEAM : await this.chooseStoreToDownloadFrom(); } return this.getStoreDownloader(from).downloadBsVersion(version).then(() => {