From f3c0b80e3e5b33734fa5e42574b9ab1c20a8a28c Mon Sep 17 00:00:00 2001 From: bunsenstraat Date: Sat, 24 Aug 2024 12:13:50 +0200 Subject: [PATCH] refactor --- libs/remix-ui/git/src/components/gitui.tsx | 65 +++++++++++----------- 1 file changed, 32 insertions(+), 33 deletions(-) diff --git a/libs/remix-ui/git/src/components/gitui.tsx b/libs/remix-ui/git/src/components/gitui.tsx index a0067a2b6a..98fa99616f 100644 --- a/libs/remix-ui/git/src/components/gitui.tsx +++ b/libs/remix-ui/git/src/components/gitui.tsx @@ -5,7 +5,7 @@ import { openDiff, openFile, saveToken, sendToMatomo, setModifiedDecorator, setP import { gitActionsContext, pluginActionsContext } from '../state/context' import { gitReducer } from '../state/gitreducer' import { defaultGitState, defaultLoaderState, gitMatomoEventTypes, gitState, gitUIPanels, loaderState } from '../types' -import { Accordion } from "react-bootstrap"; +import { Accordion, Button } from "react-bootstrap"; import { CommitMessage } from './buttons/commitmessage' import { Commits } from './panels/commits' import { Branches } from './panels/branches' @@ -52,8 +52,8 @@ export const GitUI = (props: IGitUi) => { type: 'info', title: 'Loading Git Plugin' }) - setTimeout(() => { - setAppLoaded(true) + setTimeout(() => { + setAppLoaded(true) }, 2000) }, []) @@ -72,6 +72,7 @@ export const GitUI = (props: IGitUi) => { const username = await plugin.call('settings', 'get', 'settings/github-user-name') const email = await plugin.call('settings', 'get', 'settings/github-email') const token = await plugin.call('settings', 'get', 'settings/gist-access-token') + console.log('token', token, username, email) setSetup(!(username && email)) } @@ -174,12 +175,8 @@ export const GitUI = (props: IGitUi) => { - {setup ? : null} - {needsInit ? : null} - {setup || needsInit ? <>
CLONE
- : null} - {!setup && !needsInit ? - + + {!setup && !needsInit ? <>
@@ -216,30 +213,32 @@ export const GitUI = (props: IGitUi) => {

- - -
-
-
-
- - -
- -
- -
-
-
- - -
- -
-
- -
- : null} + : null} + {needsInit ? <> + : null} + + +
+
+
+
+ + + +
+ +
+ +
+
+
+ + +
+ +
+
+