diff options
| author | AAGaming <aa@mail.catvibers.me> | 2022-08-15 13:22:38 -0400 |
|---|---|---|
| committer | AAGaming <aa@mail.catvibers.me> | 2022-08-15 13:22:38 -0400 |
| commit | 3b1b6d28d608ea0a7e082418bd89d2f2a540b40c (patch) | |
| tree | 2a932ce8770fe3ceb33980458f154fe7b6f4a054 | |
| parent | 0a735886c9d3e91a7e8140f05a3d309ff8ed17b1 (diff) | |
| download | decky-loader-2.0.5-pre10.tar.gz decky-loader-2.0.5-pre10.zip | |
add some classes for nicer scrolling, update libv2.0.5-pre10
| -rw-r--r-- | frontend/package.json | 2 | ||||
| -rw-r--r-- | frontend/pnpm-lock.yaml | 8 | ||||
| -rw-r--r-- | frontend/src/components/PluginView.tsx | 48 | ||||
| -rw-r--r-- | frontend/src/components/TitleView.tsx | 1 |
4 files changed, 37 insertions, 22 deletions
diff --git a/frontend/package.json b/frontend/package.json index fed4370d..bea4d8b8 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -37,7 +37,7 @@ } }, "dependencies": { - "decky-frontend-lib": "^1.5.1", + "decky-frontend-lib": "^1.6.2", "react-icons": "^4.4.0" } } diff --git a/frontend/pnpm-lock.yaml b/frontend/pnpm-lock.yaml index a756b957..587ca4aa 100644 --- a/frontend/pnpm-lock.yaml +++ b/frontend/pnpm-lock.yaml @@ -9,7 +9,7 @@ specifiers: '@types/react': 16.14.0 '@types/react-router': 5.1.18 '@types/webpack': ^5.28.0 - decky-frontend-lib: ^1.5.1 + decky-frontend-lib: ^1.6.2 husky: ^8.0.1 import-sort-style-module: ^6.0.0 inquirer: ^8.2.4 @@ -23,7 +23,7 @@ specifiers: typescript: ^4.7.4 dependencies: - decky-frontend-lib: 1.5.1 + decky-frontend-lib: 1.6.2 react-icons: 4.4.0_react@16.14.0 devDependencies: @@ -806,8 +806,8 @@ packages: ms: 2.1.2 dev: true - /decky-frontend-lib/1.5.1: - resolution: {integrity: sha512-XrcMNxqdXJFyuJYJX4Wmo7DvFVkwBsl8aWU5wfLdPQmcPz3drafyEgqIdO4AxpFuTsHTf1qaHBiYYw349vYpgw==} + /decky-frontend-lib/1.6.2: + resolution: {integrity: sha512-O34rHg6BWYP99jxlosAl0hUfo+SmOyjN+TtcyutdIjvPkg/FgHwahTd+SMujTpZemV31c4JX8hdGnN/Z7tjL9g==} dependencies: minimist: 1.2.6 dev: false diff --git a/frontend/src/components/PluginView.tsx b/frontend/src/components/PluginView.tsx index cc6dbefc..28a1540e 100644 --- a/frontend/src/components/PluginView.tsx +++ b/frontend/src/components/PluginView.tsx @@ -1,4 +1,11 @@ -import { ButtonItem, PanelSection, PanelSectionRow } from 'decky-frontend-lib'; +import { + ButtonItem, + PanelSection, + PanelSectionRow, + joinClassNames, + scrollClasses, + staticClasses, +} from 'decky-frontend-lib'; import { VFC } from 'react'; import { useDeckyState } from './DeckyState'; @@ -7,24 +14,33 @@ const PluginView: VFC = () => { const { plugins, activePlugin, setActivePlugin } = useDeckyState(); if (activePlugin) { - return <div style={{ height: '100%' }}>{activePlugin.content}</div>; + return ( + <div + className={joinClassNames(staticClasses.TabGroupPanel, scrollClasses.ScrollPanel, scrollClasses.ScrollY)} + style={{ height: '100%' }} + > + {activePlugin.content} + </div> + ); } return ( - <PanelSection> - {plugins - .filter((p) => p.content) - .map(({ name, icon }) => ( - <PanelSectionRow key={name}> - <ButtonItem layout="below" onClick={() => setActivePlugin(name)}> - <div style={{ display: 'flex', justifyContent: 'space-between' }}> - <div>{icon}</div> - <div>{name}</div> - </div> - </ButtonItem> - </PanelSectionRow> - ))} - </PanelSection> + <div className={joinClassNames(staticClasses.TabGroupPanel, scrollClasses.ScrollPanel, scrollClasses.ScrollY)}> + <PanelSection> + {plugins + .filter((p) => p.content) + .map(({ name, icon }) => ( + <PanelSectionRow key={name}> + <ButtonItem layout="below" onClick={() => setActivePlugin(name)}> + <div style={{ display: 'flex', justifyContent: 'space-between' }}> + <div>{icon}</div> + <div>{name}</div> + </div> + </ButtonItem> + </PanelSectionRow> + ))} + </PanelSection> + </div> ); }; diff --git a/frontend/src/components/TitleView.tsx b/frontend/src/components/TitleView.tsx index babcd316..d0a3de0b 100644 --- a/frontend/src/components/TitleView.tsx +++ b/frontend/src/components/TitleView.tsx @@ -7,7 +7,6 @@ import { useDeckyState } from './DeckyState'; const titleStyles: CSSProperties = { display: 'flex', paddingTop: '3px', - paddingBottom: '14px', paddingRight: '16px', boxShadow: 'unset', }; |
