summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormarios <marios8543@gmail.com>2022-05-26 21:14:32 +0300
committermarios <marios8543@gmail.com>2022-05-26 21:14:32 +0300
commit44776b393e984e5968c8b092fade56644c39a4a7 (patch)
tree8f5b620ccbeebafd51369c6ae687a982b9924c1f
parentad1f57795eba57b43579ea5f290278b6de531f90 (diff)
downloaddecky-loader-44776b393e984e5968c8b092fade56644c39a4a7.tar.gz
decky-loader-44776b393e984e5968c8b092fade56644c39a4a7.zip
added open store button
-rw-r--r--frontend/src/components/PluginView.tsx2
-rw-r--r--frontend/src/components/TitleView.tsx14
2 files changed, 13 insertions, 3 deletions
diff --git a/frontend/src/components/PluginView.tsx b/frontend/src/components/PluginView.tsx
index b3640395..65288c05 100644
--- a/frontend/src/components/PluginView.tsx
+++ b/frontend/src/components/PluginView.tsx
@@ -9,7 +9,7 @@ const PluginView: VFC = () => {
if (activePlugin) {
return (
- <div>
+ <div style={{height: '100%'}}>
<div style={{ position: 'absolute', top: '3px', left: '16px', zIndex: 20 }}>
<DialogButton style={{ minWidth: 0, padding: '10px 12px' }} onClick={closeActivePlugin}>
<FaArrowLeft style={{ display: 'block' }} />
diff --git a/frontend/src/components/TitleView.tsx b/frontend/src/components/TitleView.tsx
index 4b4a6825..a9e1017a 100644
--- a/frontend/src/components/TitleView.tsx
+++ b/frontend/src/components/TitleView.tsx
@@ -1,13 +1,23 @@
-import { staticClasses } from 'decky-frontend-lib';
+import { staticClasses, DialogButton } from 'decky-frontend-lib';
import { VFC } from 'react';
+import { FaShoppingBag } from "react-icons/fa";
import { useDeckyState } from './DeckyState';
const TitleView: VFC = () => {
const { activePlugin } = useDeckyState();
+ const openPluginStore = () => fetch("http://127.0.0.1:1337/methods/open_plugin_store", {method: "POST"});
+
if (activePlugin === null) {
- return <div className={staticClasses.Title}>Decky</div>;
+ return <div className={staticClasses.Title}>
+ Decky
+ <div style={{ position: 'absolute', top: '3px', right: '16px', zIndex: 20 }}>
+ <DialogButton style={{ minWidth: 0, padding: '10px 12px' }} onClick={openPluginStore}>
+ <FaShoppingBag style={{ display: 'block' }} />
+ </DialogButton>
+ </div>
+ </div>;
}
return (