Add auto login only on production build.

This commit is contained in:
Patrick Fic
2025-04-02 13:40:50 -07:00
parent dbaa88a19b
commit 15f8733280
3 changed files with 14 additions and 10 deletions

View File

@@ -59,7 +59,7 @@ jobs:
workflows:
deploy_and_build:
jobs:
- partner-win-build
- partner-win-build:
filters:
branches:
only: main

View File

@@ -1,2 +1,2 @@
VITE_FIREBASE_CONFIG={"apiKey":"AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU","authDomain":"imex-prod.firebaseapp.com","databaseURL":"https://imex-prod.firebaseio.com","projectId":"imex-prod","storageBucket":"imex-prod.appspot.com","messagingSenderId":"253497221485","appId":"1:253497221485:web:3c81c483b94db84b227a64","measurementId":"G-NTWBKG2L0M"}
VITE_GRAPHQL_ENDPOINT=https://db.dev.imex.online/v1/graphql
VITE_GRAPHQL_ENDPOINT=https://db.imex.online/v1/graphql

View File

@@ -130,10 +130,12 @@ function createWindow(): void {
const currentSetting = store.get("app.openOnStartup") as boolean;
store.set("app.openOnStartup", !currentSetting);
log.info("Open on startup set to", !currentSetting);
app.setLoginItemSettings({
enabled: true, //This is a windows only command. Updates the task manager and registry.
openAtLogin: !currentSetting,
});
if (!import.meta.env.DEV) {
app.setLoginItemSettings({
enabled: true, //This is a windows only command. Updates the task manager and registry.
openAtLogin: !currentSetting,
});
}
},
},
],
@@ -380,10 +382,12 @@ app.on("before-quit", () => {
const currentSetting = store.get("app.openOnStartup") as boolean;
store.set("app.openOnStartup", !currentSetting);
log.info("Open on startup set to", !currentSetting);
app.setLoginItemSettings({
enabled: true, //This is a windows only command. Updates the task manager and registry.
openAtLogin: !currentSetting,
});
if (!import.meta.env.DEV) {
app.setLoginItemSettings({
enabled: true, //This is a windows only command. Updates the task manager and registry.
openAtLogin: !currentSetting,
});
}
isAppQuitting = true;
});