mirror of
https://github.com/SteamDeckHomebrew/decky-frontend-lib.git
synced 2026-05-22 19:08:46 +02:00
Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
23af4c0bb4 | ||
|
|
a074277bb5 | ||
|
|
fb49d64fd3 | ||
|
|
cfef1dc320 | ||
|
|
f6b4d6b254 | ||
|
|
0010a1fcee |
21
CHANGELOG.md
21
CHANGELOG.md
@@ -1,3 +1,24 @@
|
|||||||
|
## [3.7.9](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.8...v3.7.9) (2022-10-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **tabs:** fix on stable for real this time i think ([a074277](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/a074277bb58428a64295154ebf96aceb96e654a7))
|
||||||
|
|
||||||
|
## [3.7.8](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.7...v3.7.8) (2022-10-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Field:** fix this time for real ([#44](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/44)) ([cfef1dc](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/cfef1dc320a5f649d66c3af365cd6aa2d88e46ea))
|
||||||
|
|
||||||
|
## [3.7.7](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.6...v3.7.7) (2022-10-26)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **Field:** remove incompatible properties ([#42](https://github.com/SteamDeckHomebrew/decky-frontend-lib/issues/42)) ([0010a1f](https://github.com/SteamDeckHomebrew/decky-frontend-lib/commit/0010a1fceedc417aa25b709d066341da97d42444))
|
||||||
|
|
||||||
## [3.7.6](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.5...v3.7.6) (2022-10-26)
|
## [3.7.6](https://github.com/SteamDeckHomebrew/decky-frontend-lib/compare/v3.7.5...v3.7.6) (2022-10-26)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "decky-frontend-lib",
|
"name": "decky-frontend-lib",
|
||||||
"version": "3.7.6",
|
"version": "3.7.9",
|
||||||
"description": "A library for building decky plugins",
|
"description": "A library for building decky plugins",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
"types": "dist/index.d.ts",
|
"types": "dist/index.d.ts",
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { FC, HTMLAttributes, ReactNode, RefAttributes } from 'react';
|
import { FC, ReactNode, RefAttributes } from 'react';
|
||||||
|
|
||||||
import { findModuleChild } from '../webpack';
|
import { findModuleChild } from '../webpack';
|
||||||
import { FooterLegendProps } from './FooterLegend';
|
import { FooterLegendProps } from './FooterLegend';
|
||||||
|
|
||||||
export interface FieldProps extends HTMLAttributes<HTMLDivElement>, FooterLegendProps {
|
export interface FieldProps extends FooterLegendProps {
|
||||||
label?: ReactNode;
|
label?: ReactNode;
|
||||||
bottomSeparator?: 'standard' | 'thick' | 'none';
|
bottomSeparator?: 'standard' | 'thick' | 'none';
|
||||||
description?: ReactNode;
|
description?: ReactNode;
|
||||||
@@ -20,7 +20,7 @@ export interface FieldProps extends HTMLAttributes<HTMLDivElement>, FooterLegend
|
|||||||
verticalAlignment?: 'center' | 'none'; // Alligns inline label with children
|
verticalAlignment?: 'center' | 'none'; // Alligns inline label with children
|
||||||
focusable?: boolean; // Allows to get focus without any focusable children or on* callbacks
|
focusable?: boolean; // Allows to get focus without any focusable children or on* callbacks
|
||||||
onActivate?: (e: CustomEvent | MouseEvent) => void;
|
onActivate?: (e: CustomEvent | MouseEvent) => void;
|
||||||
override onClick?: (e: CustomEvent | MouseEvent) => void;
|
onClick?: (e: CustomEvent | MouseEvent) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Field = findModuleChild((m) => {
|
export const Field = findModuleChild((m) => {
|
||||||
|
|||||||
@@ -109,27 +109,30 @@ try {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
if (oldTabsModule) oldTabs = Object.values(oldTabsModule).find((x: any) => x?.type?.toString()?.includes("((function(") && x?.type?.toString()?.includes("[\"tabs\""));
|
if (oldTabsModule)
|
||||||
|
oldTabs = Object.values(oldTabsModule).find((x: any) => x?.type?.toString()?.includes('((function(){'));
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Error finding oldTabs:", e)
|
console.error('Error finding oldTabs:', e);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tabs component as used in the library and media tabs. See {@link TabsProps}
|
* Tabs component as used in the library and media tabs. See {@link TabsProps}
|
||||||
* Unlike other components in `decky-frontend-lib`, this requires Decky Loader to be running.
|
* Unlike other components in `decky-frontend-lib`, this requires Decky Loader to be running.
|
||||||
*/
|
*/
|
||||||
export const Tabs = oldTabs || ((props: TabsProps) => {
|
export const Tabs =
|
||||||
const found = tabsComponent;
|
oldTabs ||
|
||||||
const [tc, setTC] = useState<FC<TabsProps>>(found);
|
(((props: TabsProps) => {
|
||||||
useEffect(() => {
|
const found = tabsComponent;
|
||||||
if (found) return;
|
const [tc, setTC] = useState<FC<TabsProps>>(found);
|
||||||
(async () => {
|
useEffect(() => {
|
||||||
console.debug('[DFL:Tabs]: Finding component...');
|
if (found) return;
|
||||||
const t = await getTabs();
|
(async () => {
|
||||||
console.debug('[DFL:Tabs]: Found!');
|
console.debug('[DFL:Tabs]: Finding component...');
|
||||||
setTC(t);
|
const t = await getTabs();
|
||||||
})();
|
console.debug('[DFL:Tabs]: Found!');
|
||||||
}, []);
|
setTC(t);
|
||||||
console.log('tc', tc);
|
})();
|
||||||
return tc ? createElement(tc, props) : <SteamSpinner />;
|
}, []);
|
||||||
}) as FC<TabsProps>;
|
console.log('tc', tc);
|
||||||
|
return tc ? createElement(tc, props) : <SteamSpinner />;
|
||||||
|
}) as FC<TabsProps>);
|
||||||
|
|||||||
Reference in New Issue
Block a user