Remove header.
This commit is contained in:
@@ -16,7 +16,7 @@ asarUnpack:
|
|||||||
- resources/**
|
- resources/**
|
||||||
win:
|
win:
|
||||||
executableName: ShopPartner
|
executableName: ShopPartner
|
||||||
icon: resources/diamond.png
|
icon: resources/icon.png
|
||||||
azureSignOptions:
|
azureSignOptions:
|
||||||
endpoint: https://eus.codesigning.azure.net
|
endpoint: https://eus.codesigning.azure.net
|
||||||
certificateProfileName: ImEXRPS
|
certificateProfileName: ImEXRPS
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ asarUnpack:
|
|||||||
- resources/**
|
- resources/**
|
||||||
win:
|
win:
|
||||||
executableName: ShopPartner
|
executableName: ShopPartner
|
||||||
icon: resources/diamond.png
|
icon: resources/icon.png
|
||||||
azureSignOptions:
|
azureSignOptions:
|
||||||
endpoint: https://eus.codesigning.azure.net
|
endpoint: https://eus.codesigning.azure.net
|
||||||
certificateProfileName: ImEXRPS
|
certificateProfileName: ImEXRPS
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import {
|
|||||||
import log from "electron-log/main";
|
import log from "electron-log/main";
|
||||||
import { autoUpdater } from "electron-updater";
|
import { autoUpdater } from "electron-updater";
|
||||||
import path, { join } from "path";
|
import path, { join } from "path";
|
||||||
import appIcon from "../../resources/diamond.png?asset";
|
import appIcon from "../../resources/icon.png?asset";
|
||||||
import {
|
import {
|
||||||
default as ErrorTypeCheck,
|
default as ErrorTypeCheck,
|
||||||
default as errorTypeCheck,
|
default as errorTypeCheck,
|
||||||
@@ -29,7 +29,8 @@ Sentry.init({
|
|||||||
});
|
});
|
||||||
|
|
||||||
log.initialize();
|
log.initialize();
|
||||||
const isMac = process.platform === "darwin";
|
const isMac: boolean = process.platform === "darwin";
|
||||||
|
const protocol: string = "shopprt";
|
||||||
let isAppQuitting = false; //Needed on Mac as an override to allow us to fully quit the app.
|
let isAppQuitting = false; //Needed on Mac as an override to allow us to fully quit the app.
|
||||||
// Initialize the server
|
// Initialize the server
|
||||||
const localServer = new LocalServer();
|
const localServer = new LocalServer();
|
||||||
@@ -311,7 +312,7 @@ if (!gotTheLock) {
|
|||||||
// Some APIs can only be used after this event occurs.
|
// Some APIs can only be used after this event occurs.
|
||||||
app.whenReady().then(async () => {
|
app.whenReady().then(async () => {
|
||||||
// Set app user model id for windows
|
// Set app user model id for windows
|
||||||
electronApp.setAppUserModelId("com.electron");
|
electronApp.setAppUserModelId("com.convenient-brands.partner");
|
||||||
|
|
||||||
// Default open or close DevTools by F12 in development
|
// Default open or close DevTools by F12 in development
|
||||||
// and ignore CommandOrControl + R in production.
|
// and ignore CommandOrControl + R in production.
|
||||||
@@ -320,10 +321,22 @@ app.whenReady().then(async () => {
|
|||||||
optimizer.watchWindowShortcuts(window);
|
optimizer.watchWindowShortcuts(window);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const isDefaultProtocolClient = app.setAsDefaultProtocolClient(protocol);
|
||||||
|
if (isDefaultProtocolClient) {
|
||||||
|
log.info("Protocol handler registered successfully.");
|
||||||
|
} else {
|
||||||
|
log.warn("Failed to register protocol handler.");
|
||||||
|
}
|
||||||
|
|
||||||
// Add this event handler for second instance
|
// Add this event handler for second instance
|
||||||
app.on("second-instance", () => {
|
app.on("second-instance", (_event: Electron.Event, argv: string[]) => {
|
||||||
// Someone tried to run a second instance, we should focus our window
|
// Someone tried to run a second instance, we should focus our window
|
||||||
openMainWindow();
|
openMainWindow();
|
||||||
|
const url = argv.find((arg) => arg.startsWith(`${protocol}://`));
|
||||||
|
if (url) {
|
||||||
|
console.log("App launched with URL:", url);
|
||||||
|
// Handle the URL. Not doing anything for now.
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
//Dynamically load ipcMain handlers once ready.
|
//Dynamically load ipcMain handlers once ready.
|
||||||
@@ -406,6 +419,16 @@ app.whenReady().then(async () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
app.on(
|
||||||
|
"open-url",
|
||||||
|
(
|
||||||
|
event: Electron.Event, //, _url: string
|
||||||
|
) => {
|
||||||
|
event.preventDefault();
|
||||||
|
//Don't do anythign for now. We just want to open the app.
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
// Quit when all windows are closed, except on macOS. There, it's common
|
// Quit when all windows are closed, except on macOS. There, it's common
|
||||||
// for applications and their menu bar to stay active until the user quits
|
// for applications and their menu bar to stay active until the user quits
|
||||||
// explicitly with Cmd + Q.
|
// explicitly with Cmd + Q.
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
import { CheckCircleFilled, ExclamationCircleFilled } from "@ant-design/icons";
|
import {
|
||||||
|
CheckCircleFilled,
|
||||||
|
ExclamationCircleFilled,
|
||||||
|
PlayCircleOutlined,
|
||||||
|
PauseCircleOutlined,
|
||||||
|
} from "@ant-design/icons";
|
||||||
import {
|
import {
|
||||||
selectWatcherError,
|
selectWatcherError,
|
||||||
selectWatcherStatus,
|
selectWatcherStatus,
|
||||||
@@ -104,11 +109,19 @@ const SettingsWatcher: React.FC = () => {
|
|||||||
<Row gutter={[16, 16]}>
|
<Row gutter={[16, 16]}>
|
||||||
<Col {...colSpans}>
|
<Col {...colSpans}>
|
||||||
{isWatcherStarted ? (
|
{isWatcherStarted ? (
|
||||||
<Button onClick={handleStop}>
|
<Button
|
||||||
|
danger
|
||||||
|
icon={<PauseCircleOutlined />}
|
||||||
|
onClick={handleStop}
|
||||||
|
>
|
||||||
{t("settings.actions.stopwatcher")}
|
{t("settings.actions.stopwatcher")}
|
||||||
</Button>
|
</Button>
|
||||||
) : (
|
) : (
|
||||||
<Button onClick={handleStart}>
|
<Button
|
||||||
|
type="primary"
|
||||||
|
icon={<PlayCircleOutlined />}
|
||||||
|
onClick={handleStart}
|
||||||
|
>
|
||||||
{t("settings.actions.startwatcher")}
|
{t("settings.actions.startwatcher")}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
|
import { LogoutOutlined } from "@ant-design/icons";
|
||||||
import { auth } from "@renderer/util/firebase";
|
import { auth } from "@renderer/util/firebase";
|
||||||
import { Card, Typography } from "antd";
|
import { Button, Space, Typography } from "antd";
|
||||||
|
import _ from "lodash";
|
||||||
import { JSX, useEffect, useState } from "react";
|
import { JSX, useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import ipcTypes from "../../../../util/ipcTypes.json";
|
import ipcTypes from "../../../../util/ipcTypes.json";
|
||||||
import _ from "lodash";
|
|
||||||
const Welcome = (): JSX.Element => {
|
const Welcome = (): JSX.Element => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [shopName, setShopName] = useState<string | null>(null);
|
const [shopName, setShopName] = useState<string | null>(null);
|
||||||
@@ -25,7 +26,19 @@ const Welcome = (): JSX.Element => {
|
|||||||
: `${auth.currentUser?.displayName} (${auth.currentUser?.email})`.trim(),
|
: `${auth.currentUser?.displayName} (${auth.currentUser?.email})`.trim(),
|
||||||
})}
|
})}
|
||||||
</Typography.Title>
|
</Typography.Title>
|
||||||
<Typography.Paragraph>{shopName || ""}</Typography.Paragraph>
|
<Space align="baseline">
|
||||||
|
<Typography.Paragraph>{shopName || ""}</Typography.Paragraph>
|
||||||
|
<Button
|
||||||
|
size="small"
|
||||||
|
danger
|
||||||
|
icon={<LogoutOutlined />}
|
||||||
|
onClick={(): void => {
|
||||||
|
auth.signOut();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("navigation.signout")}
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user