mirror of
https://github.com/SteamDeckHomebrew/decky-loader.git
synced 2026-07-11 21:31:56 +00:00
spice up js-side logs from store and branch select
This commit is contained in:
@@ -1,9 +1,12 @@
|
|||||||
import { Dropdown, Field } from 'decky-frontend-lib';
|
import { Dropdown, Field } from 'decky-frontend-lib';
|
||||||
import { FunctionComponent } from 'react';
|
import { FunctionComponent } from 'react';
|
||||||
|
|
||||||
|
import Logger from '../../../../logger';
|
||||||
import { callUpdaterMethod } from '../../../../updater';
|
import { callUpdaterMethod } from '../../../../updater';
|
||||||
import { useSetting } from '../../../../utils/hooks/useSetting';
|
import { useSetting } from '../../../../utils/hooks/useSetting';
|
||||||
|
|
||||||
|
const logger = new Logger('BranchSelect');
|
||||||
|
|
||||||
enum UpdateBranch {
|
enum UpdateBranch {
|
||||||
Stable,
|
Stable,
|
||||||
Prerelease,
|
Prerelease,
|
||||||
@@ -28,7 +31,7 @@ const BranchSelect: FunctionComponent<{}> = () => {
|
|||||||
onChange={async (newVal) => {
|
onChange={async (newVal) => {
|
||||||
await setSelectedBranch(newVal.data);
|
await setSelectedBranch(newVal.data);
|
||||||
callUpdaterMethod('check_for_updates');
|
callUpdaterMethod('check_for_updates');
|
||||||
console.log('switching branches!');
|
logger.log('switching branches!');
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Field>
|
</Field>
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
import { SteamSpinner } from 'decky-frontend-lib';
|
import { SteamSpinner } from 'decky-frontend-lib';
|
||||||
import { FC, useEffect, useState } from 'react';
|
import { FC, useEffect, useState } from 'react';
|
||||||
|
|
||||||
|
import Logger from '../../logger';
|
||||||
import { LegacyStorePlugin, StorePlugin, getLegacyPluginList, getPluginList } from '../../store';
|
import { LegacyStorePlugin, StorePlugin, getLegacyPluginList, getPluginList } from '../../store';
|
||||||
import PluginCard from './PluginCard';
|
import PluginCard from './PluginCard';
|
||||||
|
|
||||||
|
const logger = new Logger('FilePicker');
|
||||||
|
|
||||||
const StorePage: FC<{}> = () => {
|
const StorePage: FC<{}> = () => {
|
||||||
const [data, setData] = useState<StorePlugin[] | null>(null);
|
const [data, setData] = useState<StorePlugin[] | null>(null);
|
||||||
const [legacyData, setLegacyData] = useState<LegacyStorePlugin[] | null>(null);
|
const [legacyData, setLegacyData] = useState<LegacyStorePlugin[] | null>(null);
|
||||||
@@ -11,12 +14,12 @@ const StorePage: FC<{}> = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
(async () => {
|
(async () => {
|
||||||
const res = await getPluginList();
|
const res = await getPluginList();
|
||||||
console.log(res);
|
logger.log('got data!', res);
|
||||||
setData(res);
|
setData(res);
|
||||||
})();
|
})();
|
||||||
(async () => {
|
(async () => {
|
||||||
const res = await getLegacyPluginList();
|
const res = await getLegacyPluginList();
|
||||||
console.log(res);
|
logger.log('got legacy data!', res);
|
||||||
setLegacyData(res);
|
setLegacyData(res);
|
||||||
})();
|
})();
|
||||||
}, []);
|
}, []);
|
||||||
|
|||||||
Reference in New Issue
Block a user