From 8c8cf180fad2ad6951ad7ce6b74e6c163fa01d18 Mon Sep 17 00:00:00 2001
From: AAGaming <aa@mail.catvibers.me>
Date: Thu, 14 Jul 2022 22:51:55 -0400
Subject: Updater for decky-loader (#117)

* Add an updater in settings for decky-loader

* add chmod

* remove junk comments
---
 .../components/settings/pages/general/index.tsx    | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 frontend/src/components/settings/pages/general/index.tsx

(limited to 'frontend/src/components/settings/pages/general/index.tsx')

diff --git a/frontend/src/components/settings/pages/general/index.tsx b/frontend/src/components/settings/pages/general/index.tsx
new file mode 100644
index 00000000..7dc5cfa4
--- /dev/null
+++ b/frontend/src/components/settings/pages/general/index.tsx
@@ -0,0 +1,34 @@
+import { DialogButton, Field, TextField } from 'decky-frontend-lib';
+import { useState } from 'react';
+import { FaShapes } from 'react-icons/fa';
+
+import { installFromURL } from '../../../store/Store';
+import UpdaterSettings from './Updater';
+
+export default function GeneralSettings() {
+  const [pluginURL, setPluginURL] = useState('');
+  // const [checked, setChecked] = useState(false); // store these in some kind of State instead
+  return (
+    <div>
+      {/* <Field
+        label="A Toggle with an icon"
+        icon={<FaShapes style={{ display: 'block' }} />}
+      >
+        <Toggle
+          value={checked}
+          onChange={(e) => setChecked(e)}
+        />
+      </Field> */}
+      <UpdaterSettings />
+      <Field
+        label="Manual plugin install"
+        description={<TextField label={'URL'} value={pluginURL} onChange={(e) => setPluginURL(e?.target.value)} />}
+        icon={<FaShapes style={{ display: 'block' }} />}
+      >
+        <DialogButton disabled={pluginURL.length == 0} onClick={() => installFromURL(pluginURL)}>
+          Install
+        </DialogButton>
+      </Field>
+    </div>
+  );
+}
-- 
cgit v1.2.3

