mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-11 16:26:59 +00:00
app: set first-time-run to true instead of false
This commit is contained in:
@@ -9,7 +9,6 @@ import { analytics, id } from './telemetry'
|
|||||||
|
|
||||||
require('@electron/remote/main').initialize()
|
require('@electron/remote/main').initialize()
|
||||||
|
|
||||||
|
|
||||||
const store = new Store()
|
const store = new Store()
|
||||||
let tray: Tray | null = null
|
let tray: Tray | null = null
|
||||||
let welcomeWindow: BrowserWindow | null = null
|
let welcomeWindow: BrowserWindow | null = null
|
||||||
@@ -33,7 +32,6 @@ if (!SingleInstanceLock) {
|
|||||||
app.quit()
|
app.quit()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function firstRunWindow() {
|
function firstRunWindow() {
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
welcomeWindow = new BrowserWindow({
|
welcomeWindow = new BrowserWindow({
|
||||||
@@ -60,7 +58,7 @@ function firstRunWindow() {
|
|||||||
|
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
app.dock.hide()
|
app.dock.hide()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function createSystemtray() {
|
function createSystemtray() {
|
||||||
@@ -154,12 +152,12 @@ app.on('ready', () => {
|
|||||||
|
|
||||||
createSystemtray()
|
createSystemtray()
|
||||||
server()
|
server()
|
||||||
|
|
||||||
if (!store.has('first-time-run')) {
|
if (!store.has('first-time-run')) {
|
||||||
// This is the first run
|
// This is the first run
|
||||||
app.setLoginItemSettings({ openAtLogin: true })
|
app.setLoginItemSettings({ openAtLogin: true })
|
||||||
firstRunWindow()
|
firstRunWindow()
|
||||||
store.set('first-time-run', false)
|
store.set('first-time-run', true)
|
||||||
} else {
|
} else {
|
||||||
// The app has been run before
|
// The app has been run before
|
||||||
app.setLoginItemSettings({ openAtLogin: app.getLoginItemSettings().openAtLogin })
|
app.setLoginItemSettings({ openAtLogin: app.getLoginItemSettings().openAtLogin })
|
||||||
|
|||||||
Reference in New Issue
Block a user