From d6202e09b855dfbf63348e899355f1c2eaec67bd Mon Sep 17 00:00:00 2001 From: myOmikron Date: Mon, 31 Jul 2023 14:44:24 +0200 Subject: [PATCH] Simplified structure --- kraken_frontend/src/svg/login_logo.tsx | 249 ++++++++++++++++++++++ kraken_frontend/src/views/login.tsx | 251 +---------------------- kraken_frontend/src/views/workspaces.tsx | 38 +--- 3 files changed, 252 insertions(+), 286 deletions(-) create mode 100644 kraken_frontend/src/svg/login_logo.tsx diff --git a/kraken_frontend/src/svg/login_logo.tsx b/kraken_frontend/src/svg/login_logo.tsx new file mode 100644 index 000000000..7817212e3 --- /dev/null +++ b/kraken_frontend/src/svg/login_logo.tsx @@ -0,0 +1,249 @@ +import React from "react"; + +export default function LoginLogoIcon() { + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +} diff --git a/kraken_frontend/src/views/login.tsx b/kraken_frontend/src/views/login.tsx index f309fd896..17315b4bd 100644 --- a/kraken_frontend/src/views/login.tsx +++ b/kraken_frontend/src/views/login.tsx @@ -5,6 +5,7 @@ import { toast } from "react-toastify"; import "../styling/login.css"; import Input from "../components/input"; import { handleApiError } from "../utils/helper"; +import LoginLogoIcon from "../svg/login_logo"; type LoginProps = { onLogin(): void; @@ -41,255 +42,7 @@ export default class Login extends React.Component { this.performLogin(); }} > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +

Login

; @@ -42,7 +38,6 @@ type WorkspacesState = { /** View to expose the `/api/v1/workspaces` endpoints */ export default class Workspaces extends React.Component { state: WorkspacesState = { - confirmDelete: null, createNew: false, newDesc: "", newName: "", @@ -66,19 +61,6 @@ export default class Workspaces extends React.Component { - toast.success("Deleted workspace"); - this.setState({ confirmDelete: null }); - this.fetchState(); - }) - ); - } - async createWorkspace() { const { newName, newDesc } = this.state; if (!check([[newName.length > 0, "Empty name"]])) return; @@ -141,7 +123,7 @@ export default class Workspaces extends React.Component
-

Ownership

+

Filter

Owner
- this.setState({ confirmDelete: null })} - > -
-

- Are you sure you want to delete {this.state.confirmDelete?.name || ""}? -

- - -
-
); }