Minor cleanup and add sentry.
This commit is contained in:
47
.circleci/config.yml
Normal file
47
.circleci/config.yml
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
version: 2.1
|
||||||
|
orbs:
|
||||||
|
#snyk: snyk/snyk@0.0.8
|
||||||
|
#cypress: cypress-io/cypress@1.23.0
|
||||||
|
aws-s3: circleci/aws-s3@4.0.0
|
||||||
|
aws-cli: circleci/aws-cli@4.0
|
||||||
|
eb: circleci/aws-elastic-beanstalk@2.0.1
|
||||||
|
jira: circleci/jira@2.1.0
|
||||||
|
jobs:
|
||||||
|
partner-win-build:
|
||||||
|
docker:
|
||||||
|
- image: electronuserland/builder:wine
|
||||||
|
parameters:
|
||||||
|
secret:
|
||||||
|
type: string
|
||||||
|
default: $HASURA_TEST_SECRET
|
||||||
|
working_directory: ~/repo/hasura
|
||||||
|
steps:
|
||||||
|
- checkout:
|
||||||
|
path: ~/repo
|
||||||
|
- run:
|
||||||
|
name: Execute migration
|
||||||
|
command: |
|
||||||
|
curl -L https://github.com/hasura/graphql-engine/raw/stable/cli/get.sh | bash
|
||||||
|
hasura migrate apply --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >>
|
||||||
|
sleep 15
|
||||||
|
hasura metadata apply --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >>
|
||||||
|
sleep 30
|
||||||
|
hasura metadata reload --endpoint https://db.test.bodyshop.app/ --admin-secret << parameters.secret >>
|
||||||
|
- jira/notify:
|
||||||
|
environment: Test (ImEX) - Hasura
|
||||||
|
environment_type: testing
|
||||||
|
pipeline_id: << pipeline.id >>
|
||||||
|
job_type: deployment
|
||||||
|
pipeline_number: << pipeline.number >>
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
deploy_and_build:
|
||||||
|
jobs:
|
||||||
|
- partner-win-build:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: main
|
||||||
|
- partner-mac-build:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
only: main
|
||||||
3896
package-lock.json
generated
3896
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -24,6 +24,7 @@
|
|||||||
"@apollo/client": "^3.13.5",
|
"@apollo/client": "^3.13.5",
|
||||||
"@electron-toolkit/preload": "^3.0.1",
|
"@electron-toolkit/preload": "^3.0.1",
|
||||||
"@electron-toolkit/utils": "^4.0.0",
|
"@electron-toolkit/utils": "^4.0.0",
|
||||||
|
"@sentry/electron": "^6.3.0",
|
||||||
"electron-log": "^5.3.2",
|
"electron-log": "^5.3.2",
|
||||||
"electron-store": "^8.2.0",
|
"electron-store": "^8.2.0",
|
||||||
"electron-updater": "^6.3.9",
|
"electron-updater": "^6.3.9",
|
||||||
@@ -39,7 +40,7 @@
|
|||||||
"@types/express": "^5.0.1",
|
"@types/express": "^5.0.1",
|
||||||
"@types/lodash": "^4.17.16",
|
"@types/lodash": "^4.17.16",
|
||||||
"@types/node": "^22.13.10",
|
"@types/node": "^22.13.10",
|
||||||
"@types/react": "^19.0.10",
|
"@types/react": "^19.0.12",
|
||||||
"@types/react-dom": "^19.0.4",
|
"@types/react-dom": "^19.0.4",
|
||||||
"@vitejs/plugin-react": "^4.3.4",
|
"@vitejs/plugin-react": "^4.3.4",
|
||||||
"antd": "^5.24.3",
|
"antd": "^5.24.3",
|
||||||
|
|||||||
@@ -15,6 +15,11 @@ import LocalServer from "./http-server/http-server";
|
|||||||
import { TestQB } from "./quickbooks-desktop/quickbooks-desktop";
|
import { TestQB } from "./quickbooks-desktop/quickbooks-desktop";
|
||||||
import store from "./store/store";
|
import store from "./store/store";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
|
import Sentry from "@sentry/electron/main";
|
||||||
|
|
||||||
|
Sentry.init({
|
||||||
|
dsn: "https://ba41d22656999a8c1fd63bcb7df98650@o492140.ingest.us.sentry.io/4509074139447296",
|
||||||
|
});
|
||||||
|
|
||||||
log.initialize();
|
log.initialize();
|
||||||
const isMac = process.platform === "darwin";
|
const isMac = process.platform === "darwin";
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import { app, ipcMain } from "electron";
|
import { app, ipcMain } from "electron";
|
||||||
import log from "electron-log/main";
|
import log from "electron-log/main";
|
||||||
|
import { autoUpdater } from "electron-updater";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import ipcTypes from "../../util/ipcTypes.json";
|
import ipcTypes from "../../util/ipcTypes.json";
|
||||||
import ImportJob from "../decoder/decoder";
|
import ImportJob from "../decoder/decoder";
|
||||||
|
import store from "../store/store";
|
||||||
import { StartWatcher, StopWatcher } from "../watcher/watcher";
|
import { StartWatcher, StopWatcher } from "../watcher/watcher";
|
||||||
import {
|
import {
|
||||||
SettingsWatchedFilePathsAdd,
|
SettingsWatchedFilePathsAdd,
|
||||||
@@ -12,7 +14,6 @@ import {
|
|||||||
SettingsWatcherPollingSet,
|
SettingsWatcherPollingSet,
|
||||||
} from "./ipcMainHandler.settings";
|
} from "./ipcMainHandler.settings";
|
||||||
import { ipcMainHandleAuthStateChanged } from "./ipcMainHandler.user";
|
import { ipcMainHandleAuthStateChanged } from "./ipcMainHandler.user";
|
||||||
import { autoUpdater } from "electron-updater";
|
|
||||||
|
|
||||||
// Log all IPC messages and their payloads
|
// Log all IPC messages and their payloads
|
||||||
const logIpcMessages = (): void => {
|
const logIpcMessages = (): void => {
|
||||||
@@ -88,6 +89,9 @@ ipcMain.handle(
|
|||||||
ipcTypes.toMain.settings.watcher.setpolling,
|
ipcTypes.toMain.settings.watcher.setpolling,
|
||||||
SettingsWatcherPollingSet,
|
SettingsWatcherPollingSet,
|
||||||
);
|
);
|
||||||
|
ipcMain.handle(ipcTypes.toMain.user.getActiveShop, () => {
|
||||||
|
return store.get("app.bodyshop.shopname");
|
||||||
|
});
|
||||||
|
|
||||||
//Watcher Handlers
|
//Watcher Handlers
|
||||||
ipcMain.on(ipcTypes.toMain.watcher.start, () => {
|
ipcMain.on(ipcTypes.toMain.watcher.start, () => {
|
||||||
|
|||||||
@@ -100,13 +100,16 @@ const SettingsWatcher: React.FC = () => {
|
|||||||
checkedChildren={t("settings.labels.watchermoderealtime")}
|
checkedChildren={t("settings.labels.watchermoderealtime")}
|
||||||
unCheckedChildren={t("settings.labels.watchermodepolling")}
|
unCheckedChildren={t("settings.labels.watchermodepolling")}
|
||||||
/>
|
/>
|
||||||
<InputNumber
|
<Space size="small">
|
||||||
title={t("settings.labels.pollinginterval")}
|
<span>{t("settings.labels.pollinginterval")}</span>
|
||||||
disabled={!pollingState.enabled}
|
<InputNumber
|
||||||
min={1000}
|
title={t("settings.labels.pollinginterval")}
|
||||||
value={pollingState.interval}
|
disabled={!pollingState.enabled}
|
||||||
onChange={handlePollingIntervalChange}
|
min={1000}
|
||||||
/>
|
value={pollingState.interval}
|
||||||
|
onChange={handlePollingIntervalChange}
|
||||||
|
/>
|
||||||
|
</Space>
|
||||||
{watcherError && <Alert message={watcherError} />}
|
{watcherError && <Alert message={watcherError} />}
|
||||||
</Space>
|
</Space>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
import { Col, Row } from "antd";
|
import { Col, Row } from "antd";
|
||||||
import SettingsWatchedPaths from "./Settings.WatchedPaths";
|
import SettingsWatchedPaths from "./Settings.WatchedPaths";
|
||||||
import SettingsWatcher from "./Settings.Watcher";
|
import SettingsWatcher from "./Settings.Watcher";
|
||||||
|
import Welcome from "../Welcome/Welcome";
|
||||||
|
|
||||||
const Settings: React.FC = () => {
|
const Settings: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<Row gutter={[32, 32]}>
|
<Row gutter={[32, 32]}>
|
||||||
|
<Col span={24}>
|
||||||
|
<Welcome />
|
||||||
|
</Col>
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
<SettingsWatchedPaths />
|
<SettingsWatchedPaths />
|
||||||
</Col>
|
</Col>
|
||||||
|
|||||||
31
src/renderer/src/components/Welcome/Welcome.tsx
Normal file
31
src/renderer/src/components/Welcome/Welcome.tsx
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
import { auth } from "@renderer/util/firebase";
|
||||||
|
import { Card, Typography } from "antd";
|
||||||
|
import { JSX, useEffect, useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import ipcTypes from "../../../../util/ipcTypes.json";
|
||||||
|
|
||||||
|
const Welcome = (): JSX.Element => {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const [shopName, setShopName] = useState<string | null>(null);
|
||||||
|
useEffect(() => {
|
||||||
|
window.electron.ipcRenderer
|
||||||
|
.invoke(ipcTypes.toMain.user.getActiveShop)
|
||||||
|
.then((shopName: string) => {
|
||||||
|
console.log("Active shop name:", shopName);
|
||||||
|
setShopName(shopName);
|
||||||
|
});
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Card>
|
||||||
|
<Typography.Title level={3}>
|
||||||
|
{t("auth.labels.welcome", { name: auth.currentUser?.displayName })}
|
||||||
|
</Typography.Title>
|
||||||
|
<Typography.Paragraph>{shopName || ""}</Typography.Paragraph>
|
||||||
|
</Card>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Welcome;
|
||||||
@@ -3,6 +3,11 @@ import ReactDOM from "react-dom/client";
|
|||||||
import App from "./App";
|
import App from "./App";
|
||||||
import "./util/i18n";
|
import "./util/i18n";
|
||||||
import "./util/ipcRendererHandler";
|
import "./util/ipcRendererHandler";
|
||||||
|
import * as Sentry from "@sentry/electron/renderer";
|
||||||
|
|
||||||
|
Sentry.init({
|
||||||
|
dsn: "https://ba41d22656999a8c1fd63bcb7df98650@o492140.ingest.us.sentry.io/4509074139447296",
|
||||||
|
});
|
||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
|
|||||||
@@ -26,7 +26,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"user": {
|
"user": {
|
||||||
"getTokenResponse": "toMain_user_getTokenResponse"
|
"getTokenResponse": "toMain_user_getTokenResponse",
|
||||||
|
"getActiveShop": "toMain_user_getActiveShopify"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"toRenderer": {
|
"toRenderer": {
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
{
|
{
|
||||||
"translation": {
|
"translation": {
|
||||||
"auth": {
|
"auth": {
|
||||||
|
"labels": {
|
||||||
|
"welcome": "Welcome {{name}}"
|
||||||
|
},
|
||||||
"login": {
|
"login": {
|
||||||
"error": "The username and password combination provided is not valid.",
|
"error": "The username and password combination provided is not valid.",
|
||||||
"login": "Log In",
|
"login": "Log In",
|
||||||
@@ -19,6 +22,7 @@
|
|||||||
"stopwatcher": "Stop Watcher\n"
|
"stopwatcher": "Stop Watcher\n"
|
||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
|
"pollinginterval": "Polling Interval (ms)",
|
||||||
"started": "Started",
|
"started": "Started",
|
||||||
"stopped": "Stopped",
|
"stopped": "Stopped",
|
||||||
"watchedpaths": "Watched Paths",
|
"watchedpaths": "Watched Paths",
|
||||||
|
|||||||
@@ -48,6 +48,24 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>auth</name>
|
<name>auth</name>
|
||||||
<children>
|
<children>
|
||||||
|
<folder_node>
|
||||||
|
<name>labels</name>
|
||||||
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>welcome</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
|
</children>
|
||||||
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
<name>login</name>
|
<name>login</name>
|
||||||
<children>
|
<children>
|
||||||
@@ -188,6 +206,19 @@
|
|||||||
<folder_node>
|
<folder_node>
|
||||||
<name>labels</name>
|
<name>labels</name>
|
||||||
<children>
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>pollinginterval</name>
|
||||||
|
<definition_loaded>false</definition_loaded>
|
||||||
|
<description></description>
|
||||||
|
<comment></comment>
|
||||||
|
<default_text></default_text>
|
||||||
|
<translations>
|
||||||
|
<translation>
|
||||||
|
<language>en-US</language>
|
||||||
|
<approved>false</approved>
|
||||||
|
</translation>
|
||||||
|
</translations>
|
||||||
|
</concept_node>
|
||||||
<concept_node>
|
<concept_node>
|
||||||
<name>started</name>
|
<name>started</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
Reference in New Issue
Block a user