Remove header.
This commit is contained in:
@@ -16,7 +16,7 @@ asarUnpack:
|
||||
- resources/**
|
||||
win:
|
||||
executableName: ShopPartner
|
||||
icon: resources/diamond.png
|
||||
icon: resources/icon.png
|
||||
azureSignOptions:
|
||||
endpoint: https://eus.codesigning.azure.net
|
||||
certificateProfileName: ImEXRPS
|
||||
|
||||
@@ -16,7 +16,7 @@ asarUnpack:
|
||||
- resources/**
|
||||
win:
|
||||
executableName: ShopPartner
|
||||
icon: resources/diamond.png
|
||||
icon: resources/icon.png
|
||||
azureSignOptions:
|
||||
endpoint: https://eus.codesigning.azure.net
|
||||
certificateProfileName: ImEXRPS
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
import log from "electron-log/main";
|
||||
import { autoUpdater } from "electron-updater";
|
||||
import path, { join } from "path";
|
||||
import appIcon from "../../resources/diamond.png?asset";
|
||||
import appIcon from "../../resources/icon.png?asset";
|
||||
import {
|
||||
default as ErrorTypeCheck,
|
||||
default as errorTypeCheck,
|
||||
@@ -29,7 +29,8 @@ Sentry.init({
|
||||
});
|
||||
|
||||
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.
|
||||
// Initialize the server
|
||||
const localServer = new LocalServer();
|
||||
@@ -311,7 +312,7 @@ if (!gotTheLock) {
|
||||
// Some APIs can only be used after this event occurs.
|
||||
app.whenReady().then(async () => {
|
||||
// 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
|
||||
// and ignore CommandOrControl + R in production.
|
||||
@@ -320,10 +321,22 @@ app.whenReady().then(async () => {
|
||||
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
|
||||
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
|
||||
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.
|
||||
@@ -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
|
||||
// for applications and their menu bar to stay active until the user quits
|
||||
// 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 {
|
||||
selectWatcherError,
|
||||
selectWatcherStatus,
|
||||
@@ -104,11 +109,19 @@ const SettingsWatcher: React.FC = () => {
|
||||
<Row gutter={[16, 16]}>
|
||||
<Col {...colSpans}>
|
||||
{isWatcherStarted ? (
|
||||
<Button onClick={handleStop}>
|
||||
<Button
|
||||
danger
|
||||
icon={<PauseCircleOutlined />}
|
||||
onClick={handleStop}
|
||||
>
|
||||
{t("settings.actions.stopwatcher")}
|
||||
</Button>
|
||||
) : (
|
||||
<Button onClick={handleStart}>
|
||||
<Button
|
||||
type="primary"
|
||||
icon={<PlayCircleOutlined />}
|
||||
onClick={handleStart}
|
||||
>
|
||||
{t("settings.actions.startwatcher")}
|
||||
</Button>
|
||||
)}
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { LogoutOutlined } from "@ant-design/icons";
|
||||
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 { useTranslation } from "react-i18next";
|
||||
import ipcTypes from "../../../../util/ipcTypes.json";
|
||||
import _ from "lodash";
|
||||
const Welcome = (): JSX.Element => {
|
||||
const { t } = useTranslation();
|
||||
const [shopName, setShopName] = useState<string | null>(null);
|
||||
@@ -25,7 +26,19 @@ const Welcome = (): JSX.Element => {
|
||||
: `${auth.currentUser?.displayName} (${auth.currentUser?.email})`.trim(),
|
||||
})}
|
||||
</Typography.Title>
|
||||
<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