diff --git a/src/ui/App.css b/src/ui/App.css
index d0d8950..925fdb8 100644
--- a/src/ui/App.css
+++ b/src/ui/App.css
@@ -70,19 +70,6 @@ body {
--color-scrollbar-track: #00000022;
}
-.upload {
- visibility: hidden;
- padding: 0;
-}
-
-.upload::before {
- content: "UPLOAD PGN FILE";
- visibility: visible;
- display: inline-block;
- text-align: center;
- box-sizing: border-box;
-}
-
button,
.upload::before {
padding: 1rem;
diff --git a/src/ui/components/Load.tsx b/src/ui/components/Load.tsx
index 548f79f..18972f8 100644
--- a/src/ui/components/Load.tsx
+++ b/src/ui/components/Load.tsx
@@ -1,6 +1,7 @@
-import { Component, createSignal } from "solid-js";
+import { Component, createSignal, Show } from "solid-js";
import { Handlers } from "../../types";
import readFile from "../../utils/readFile";
+import { state } from "../../state";
import "./Load.css";
const Load: Component<{ handlers: Handlers }> = (props) => {
@@ -8,6 +9,8 @@ const Load: Component<{ handlers: Handlers }> = (props) => {
const [pgn, setPGN] = createSignal("");
const [link, setLink] = createSignal("");
+ let filePicker: HTMLInputElement | undefined = undefined;
+
return (
= (props) => {
{
const target = e.target as HTMLInputElement;
if (target?.files && target.files.length > 0) {
@@ -84,10 +88,23 @@ const Load: Component<{ handlers: Handlers }> = (props) => {
}
}}
>
-
-
or
-
drop the PGN file anywhere on the page
-
+
+
+
+
+
or
+
drop the PGN file anywhere on the page
+
+
);
};
diff --git a/src/ui/components/Share.tsx b/src/ui/components/Share.tsx
index 07ff037..c2a6f01 100644
--- a/src/ui/components/Share.tsx
+++ b/src/ui/components/Share.tsx
@@ -123,66 +123,64 @@ const Share: Component<{ handlers: Handlers }> = (props) => {
{copyId() === "fen-link" ? "Copied!" : "Copy link"}
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -244,97 +242,95 @@ const Share: Component<{ handlers: Handlers }> = (props) => {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
);