Skip to content

Commit

Permalink
feat: add PowerBoot
Browse files Browse the repository at this point in the history
  • Loading branch information
Shxuuer committed Feb 2, 2025
1 parent ef2d7a7 commit d1a1512
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ import { AccountManager } from "./mail/AccountManager";

export let accountManager: AccountManager | null = null;

if (app.isPackaged) {
const ex = process.execPath;
app.setLoginItemSettings({
openAtLogin: true,
path: ex,
args: [],
});
}

if (require("electron-squirrel-startup")) {
app.quit();
}
Expand Down
2 changes: 1 addition & 1 deletion src/mail/AccountManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class AccountManager {
// registered accounts list
private accounts: MailService[] = [];
// path to store account information
private readonly configPath = path.join(__dirname, "../../config/mails");
private readonly configPath = path.join(__dirname, "../config/mails");

constructor() {
// create config path if not exists
Expand Down

0 comments on commit d1a1512

Please sign in to comment.