From 52d401445cec9abd5ccbdc3777228878b8874a43 Mon Sep 17 00:00:00 2001 From: ceddybi Date: Tue, 30 Jan 2024 21:45:28 -0500 Subject: [PATCH] icons and update --- forge.config.ts | 14 +++ package.json | 8 +- src/app/dashboard/index.tsx | 22 ++--- src/app/layout.tsx | 8 +- src/app/questions/list.tsx | 56 +++++++----- src/assets/AIJ.icns | Bin 0 -> 24862 bytes src/assets/AIJ.png | Bin 0 -> 6633 bytes src/assets/icon.icns | Bin 0 -> 24862 bytes src/assets/icon.png | Bin 0 -> 6633 bytes src/index.ts | 5 +- yarn.lock | 172 +++++++++++++++++++++++++++++++++++- 11 files changed, 248 insertions(+), 37 deletions(-) create mode 100644 src/assets/AIJ.icns create mode 100644 src/assets/AIJ.png create mode 100644 src/assets/icon.icns create mode 100644 src/assets/icon.png diff --git a/forge.config.ts b/forge.config.ts index ad476ab..e0cad6b 100644 --- a/forge.config.ts +++ b/forge.config.ts @@ -11,6 +11,8 @@ import { rendererConfig } from './webpack.renderer.config'; const config: ForgeConfig = { packagerConfig: { + name: packageJson.productName, + icon: './src/assets/icon', asar: true, protocols: [ { @@ -47,6 +49,18 @@ const config: ForgeConfig = { }, }), ], + publishers: [ + { + name: '@electron-forge/publisher-github', + config: { + repository: { + owner: 'ceddybi', + name: 'AIJ' + }, + prerelease: true + } + } + ] }; export default config; diff --git a/package.json b/package.json index 3b669bd..0110147 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,10 @@ "name": "ceddybi", "email": "ceddymuhoza@gmail.com" }, + "repository": { + "type": "git", + "url": "git@github.com:ceddybi/AIJ.git" + }, "license": "MIT", "devDependencies": { "@electron-forge/cli": "^7.2.0", @@ -45,6 +49,7 @@ "typescript": "~4.5.4" }, "dependencies": { + "@electron-forge/publisher-github": "^7.2.0", "@headlessui/tailwindcss": "^0.2.0", "@heroicons/react": "^2.1.1", "@tremor/react": "^3.13.3", @@ -56,6 +61,7 @@ "puppeteer": "^21.9.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "tailwindcss": "^3.4.1" + "tailwindcss": "^3.4.1", + "update-electron-app": "^3.0.0" } } diff --git a/src/app/dashboard/index.tsx b/src/app/dashboard/index.tsx index 033af97..32829d2 100644 --- a/src/app/dashboard/index.tsx +++ b/src/app/dashboard/index.tsx @@ -47,15 +47,15 @@ export const Dashboard = ({ state }: LayoutPageProps) => { return ( -
+
- Jobs + Jobs
- {jobs.length} + {jobs.length}
-
+
{ loading={isListRunning} > {" "} - {!isListRunning ? "Run" : "Running"}{" "} + {!isListRunning ? "Fetch jobs" : "Fetching jobs ...."}{" "}
@@ -84,18 +84,18 @@ export const Dashboard = ({ state }: LayoutPageProps) => { onClick={() => invokeEvent("list:stop", search)} > {" "} - Stop{" "} + Stop fetching{" "} )}
-
+
- Applications + Applications
- {applied.length} + {applied.length}
@@ -106,7 +106,7 @@ export const Dashboard = ({ state }: LayoutPageProps) => { loading={isAppRunning} > {" "} - {!isAppRunning ? "Run" : "Running"}{" "} + {!isAppRunning ? "Apply with AI" : "AI Applying ..."}{" "}
@@ -116,7 +116,7 @@ export const Dashboard = ({ state }: LayoutPageProps) => { onClick={() => invokeEvent("app:stop", searchUrl)} > {" "} - Stop{" "} + Stop AI{" "} )}
diff --git a/src/app/layout.tsx b/src/app/layout.tsx index a67f421..d056415 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -54,14 +54,18 @@ export const Layout = () => { const isAuth = _get(state, "auth.res.success"); + if (!state) { + return null; + } + if (!isAuth) { return (
); - }; - + } + return (
diff --git a/src/app/questions/list.tsx b/src/app/questions/list.tsx index a9dd0e7..f1666a6 100644 --- a/src/app/questions/list.tsx +++ b/src/app/questions/list.tsx @@ -70,7 +70,7 @@ const RenderCheckbox = ({