From 6b82d443ebe48f3a2ce1f86cb4fb1c0a29484da7 Mon Sep 17 00:00:00 2001 From: Patrick Fic Date: Tue, 1 Apr 2025 13:08:31 -0700 Subject: [PATCH] Minor UI fixes & CI. --- .circleci/config.yml | 22 +++-- .../NavigationHeader/Navigationheader.tsx | 46 ++++----- .../components/Settings/Settings.Watcher.tsx | 99 +++++++++++-------- .../src/components/Settings/Settings.tsx | 6 +- 4 files changed, 98 insertions(+), 75 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 040e67f..b7f8e45 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,6 +5,16 @@ jobs: partner-win-build: executor: name: win/default + parameters: + tenantID: + type: string + default: $AZURE_TENANT_ID + clientID: + type: string + default: $AZURE_CLIENT_ID + clientSecret: + type: string + default: $AZURE_CLIENT_SECRET steps: - checkout - run: @@ -23,13 +33,13 @@ jobs: - run: name: Build Electron App for Windows - # environment: - # AZURE_TENANT_ID: <<>> - # AZURE_CLIENT_ID: <<>> - # AZURE_CLIENT_SECRET: <<>> + environment: + AZURE_TENANT_ID: << parameters.tenantID >> + AZURE_CLIENT_ID: << parameters.clientID >> + AZURE_CLIENT_SECRET: << parameters.clientSecret >> command: npm run build:win - - store_artifacts: - path: .\dist + # - store_artifacts: + # path: .\dist workflows: deploy_and_build: diff --git a/src/renderer/src/components/NavigationHeader/Navigationheader.tsx b/src/renderer/src/components/NavigationHeader/Navigationheader.tsx index fb49990..ddea3de 100644 --- a/src/renderer/src/components/NavigationHeader/Navigationheader.tsx +++ b/src/renderer/src/components/NavigationHeader/Navigationheader.tsx @@ -1,7 +1,5 @@ -import { selectWatcherStatus } from "@renderer/redux/app.slice"; -import { useAppSelector } from "@renderer/redux/reduxHooks"; import { auth } from "@renderer/util/firebase"; -import { Badge, Layout, Menu } from "antd"; +import { Layout, Menu } from "antd"; import { MenuItemType } from "antd/es/menu/interface"; import { signOut } from "firebase/auth"; import { useTranslation } from "react-i18next"; @@ -9,7 +7,7 @@ import { NavLink } from "react-router"; const NavigationHeader: React.FC = () => { const { t } = useTranslation(); - const isWatcherStarted = useAppSelector(selectWatcherStatus); + //const isWatcherStarted = useAppSelector(selectWatcherStatus); const menuItems: MenuItemType[] = [ { label: {t("navigation.home")}, key: "home" }, { @@ -19,30 +17,26 @@ const NavigationHeader: React.FC = () => { signOut(auth); }, }, - // { - // label: {t("navigation.settings")}, - // key: "settings", - // }, ]; return ( - - - - - + // + + + + // ); }; diff --git a/src/renderer/src/components/Settings/Settings.Watcher.tsx b/src/renderer/src/components/Settings/Settings.Watcher.tsx index 644daa5..b00981e 100644 --- a/src/renderer/src/components/Settings/Settings.Watcher.tsx +++ b/src/renderer/src/components/Settings/Settings.Watcher.tsx @@ -1,16 +1,23 @@ -import { - CheckCircleOutlined, - ExclamationCircleOutlined, -} from "@ant-design/icons"; +import { CheckCircleFilled, ExclamationCircleFilled } from "@ant-design/icons"; import { selectWatcherError, selectWatcherStatus, } from "@renderer/redux/app.slice"; import { useAppSelector } from "@renderer/redux/reduxHooks"; -import { Alert, Button, Card, InputNumber, Space, Switch } from "antd"; +import { + Alert, + Badge, + Button, + Card, + Col, + InputNumber, + Row, + Space, + Switch, +} from "antd"; +import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; import ipcTypes from "../../../../util/ipcTypes.json"; -import { useEffect, useState } from "react"; const SettingsWatcher: React.FC = () => { const { t } = useTranslation(); @@ -72,47 +79,59 @@ const SettingsWatcher: React.FC = () => { }; return ( - - - {isWatcherStarted ? ( - - ) : ( - - )} - {isWatcherStarted ? ( + - + {t("settings.labels.started")} ) : ( - + {t("settings.labels.stopped")} - )} - - - {t("settings.labels.pollinginterval")} - - - {watcherError && } - - + ) + } + color={isWatcherStarted ? "green" : "red"} + > + + + + {isWatcherStarted ? ( + + ) : ( + + )} + + + + + + {t("settings.labels.pollinginterval")} + + + {watcherError && } + + + + + ); }; export default SettingsWatcher; diff --git a/src/renderer/src/components/Settings/Settings.tsx b/src/renderer/src/components/Settings/Settings.tsx index 32bb5fa..059bbe1 100644 --- a/src/renderer/src/components/Settings/Settings.tsx +++ b/src/renderer/src/components/Settings/Settings.tsx @@ -5,14 +5,14 @@ import Welcome from "../Welcome/Welcome"; const Settings: React.FC = () => { return ( - + - + - +