summaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorBeebles <102569435+beebls@users.noreply.github.com>2023-07-27 07:58:21 -0600
committerGitHub <noreply@github.com>2023-07-27 14:58:21 +0100
commitc7e4eb1b3fc5dcf62919a8f2fa2fbe277edd4ad7 (patch)
treefc726ad238f55bc5ce0aa753da6a0266919c7bf7 /frontend
parent5460f95eac227d14108c5885679587289a7be599 (diff)
downloaddecky-loader-c7e4eb1b3fc5dcf62919a8f2fa2fbe277edd4ad7.tar.gz
decky-loader-c7e4eb1b3fc5dcf62919a8f2fa2fbe277edd4ad7.zip
Add Custom `TitleView` (#512)
* feat(titleView): Add Custom TitleView support * fix: wrap TitleView in Focusable * fix: remove root div on TitleView
Diffstat (limited to 'frontend')
-rw-r--r--frontend/src/components/TitleView.tsx6
-rw-r--r--frontend/src/plugin.ts1
2 files changed, 4 insertions, 3 deletions
diff --git a/frontend/src/components/TitleView.tsx b/frontend/src/components/TitleView.tsx
index 6ae6b2ae..111f8c80 100644
--- a/frontend/src/components/TitleView.tsx
+++ b/frontend/src/components/TitleView.tsx
@@ -49,15 +49,15 @@ const TitleView: VFC = () => {
}
return (
- <div className={staticClasses.Title} style={titleStyles}>
+ <Focusable className={staticClasses.Title} style={titleStyles}>
<DialogButton
style={{ height: '28px', width: '40px', minWidth: 0, padding: '10px 12px' }}
onClick={closeActivePlugin}
>
<FaArrowLeft style={{ marginTop: '-4px', display: 'block' }} />
</DialogButton>
- <div style={{ flex: 0.9 }}>{activePlugin.name}</div>
- </div>
+ {activePlugin?.titleView || <div style={{ flex: 0.9 }}>{activePlugin.name}</div>}
+ </Focusable>
);
};
diff --git a/frontend/src/plugin.ts b/frontend/src/plugin.ts
index c8467580..fa1bb28a 100644
--- a/frontend/src/plugin.ts
+++ b/frontend/src/plugin.ts
@@ -5,6 +5,7 @@ export interface Plugin {
content?: JSX.Element;
onDismount?(): void;
alwaysRender?: boolean;
+ titleView?: JSX.Element;
}
export enum InstallType {