From 44776b393e984e5968c8b092fade56644c39a4a7 Mon Sep 17 00:00:00 2001
From: marios <marios8543@gmail.com>
Date: Thu, 26 May 2022 21:14:32 +0300
Subject: added open store button

---
 frontend/src/components/TitleView.tsx | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

(limited to 'frontend/src/components/TitleView.tsx')

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 (
-- 
cgit v1.2.3

