mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 22:01:59 +00:00
Revert "Disable store selection until PRs actually deploy to testing"
This reverts commit d389b403b5.
This commit is contained in:
@@ -5,7 +5,7 @@ import { FaShapes, FaTools } from 'react-icons/fa';
|
|||||||
import { installFromURL } from '../../../../store';
|
import { installFromURL } from '../../../../store';
|
||||||
import BranchSelect from './BranchSelect';
|
import BranchSelect from './BranchSelect';
|
||||||
import RemoteDebuggingSettings from './RemoteDebugging';
|
import RemoteDebuggingSettings from './RemoteDebugging';
|
||||||
// import StoreSelect from './StoreSelect';
|
import StoreSelect from './StoreSelect';
|
||||||
import UpdaterSettings from './Updater';
|
import UpdaterSettings from './Updater';
|
||||||
|
|
||||||
export default function GeneralSettings({
|
export default function GeneralSettings({
|
||||||
@@ -21,7 +21,7 @@ export default function GeneralSettings({
|
|||||||
<div>
|
<div>
|
||||||
<UpdaterSettings />
|
<UpdaterSettings />
|
||||||
<BranchSelect />
|
<BranchSelect />
|
||||||
{/* <StoreSelect /> */}
|
<StoreSelect />
|
||||||
<RemoteDebuggingSettings />
|
<RemoteDebuggingSettings />
|
||||||
<Field
|
<Field
|
||||||
label="Developer mode"
|
label="Developer mode"
|
||||||
|
|||||||
+29
-35
@@ -26,47 +26,41 @@ export type PluginUpdateMapping = Map<string, StorePluginVersion>;
|
|||||||
|
|
||||||
export async function getPluginList(): Promise<StorePlugin[]> {
|
export async function getPluginList(): Promise<StorePlugin[]> {
|
||||||
let version = await window.DeckyPluginLoader.updateVersion();
|
let version = await window.DeckyPluginLoader.updateVersion();
|
||||||
|
let store = await getSetting<Store>('store', Store.Default);
|
||||||
|
let customURL = await getSetting<string>('store-url', 'https://plugins.deckbrew.xyz/plugins');
|
||||||
|
let storeURL;
|
||||||
|
if (!store) {
|
||||||
|
console.log('Could not get a default store, using Default.');
|
||||||
|
await setSetting('store-url', Store.Default);
|
||||||
return fetch('https://plugins.deckbrew.xyz/plugins', {
|
return fetch('https://plugins.deckbrew.xyz/plugins', {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers: {
|
headers: {
|
||||||
'X-Decky-Version': version.current,
|
'X-Decky-Version': version.current,
|
||||||
},
|
},
|
||||||
}).then((r) => r.json());
|
}).then((r) => r.json());
|
||||||
// let store = await getSetting<Store>('store', Store.Default);
|
} else {
|
||||||
// let customURL = await getSetting<string>('store-url', 'https://plugins.deckbrew.xyz/plugins');
|
switch (+store) {
|
||||||
// let storeURL;
|
case Store.Default:
|
||||||
// if (!store) {
|
storeURL = 'https://plugins.deckbrew.xyz/plugins';
|
||||||
// console.log('Could not get a default store, using Default.');
|
break;
|
||||||
// await setSetting('store-url', Store.Default);
|
case Store.Testing:
|
||||||
// return fetch('https://plugins.deckbrew.xyz/plugins', {
|
storeURL = 'https://testing.deckbrew.xyz/plugins';
|
||||||
// method: 'GET',
|
break;
|
||||||
// headers: {
|
case Store.Custom:
|
||||||
// 'X-Decky-Version': version.current,
|
storeURL = customURL;
|
||||||
// },
|
break;
|
||||||
// }).then((r) => r.json());
|
default:
|
||||||
// } else {
|
console.error('Somehow you ended up without a standard URL, using the default URL.');
|
||||||
// switch (+store) {
|
storeURL = 'https://plugins.deckbrew.xyz/plugins';
|
||||||
// case Store.Default:
|
break;
|
||||||
// storeURL = 'https://plugins.deckbrew.xyz/plugins';
|
}
|
||||||
// break;
|
return fetch(storeURL, {
|
||||||
// case Store.Testing:
|
method: 'GET',
|
||||||
// storeURL = 'https://testing.deckbrew.xyz/plugins';
|
headers: {
|
||||||
// break;
|
'X-Decky-Version': version.current,
|
||||||
// case Store.Custom:
|
},
|
||||||
// storeURL = customURL;
|
}).then((r) => r.json());
|
||||||
// break;
|
}
|
||||||
// default:
|
|
||||||
// console.error('Somehow you ended up without a standard URL, using the default URL.');
|
|
||||||
// storeURL = 'https://plugins.deckbrew.xyz/plugins';
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// return fetch(storeURL, {
|
|
||||||
// method: 'GET',
|
|
||||||
// headers: {
|
|
||||||
// 'X-Decky-Version': version.current,
|
|
||||||
// },
|
|
||||||
// }).then((r) => r.json());
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function installFromURL(url: string) {
|
export async function installFromURL(url: string) {
|
||||||
|
|||||||
Reference in New Issue
Block a user