Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
660dee70
Commit
660dee70
authored
Jul 08, 2023
by
Jeffrey Morgan
Browse files
hourly heartbeat
parent
a678a723
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
app/src/index.ts
app/src/index.ts
+4
-7
No files found.
app/src/index.ts
View file @
660dee70
...
@@ -8,8 +8,7 @@ import { analytics, id } from './telemetry'
...
@@ -8,8 +8,7 @@ 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
const
SingleInstanceLock
=
app
.
requestSingleInstanceLock
()
const
SingleInstanceLock
=
app
.
requestSingleInstanceLock
()
...
@@ -26,9 +25,7 @@ const createSystemtray = () => {
...
@@ -26,9 +25,7 @@ const createSystemtray = () => {
tray
=
new
Tray
(
iconPath
)
tray
=
new
Tray
(
iconPath
)
const
contextMenu
=
Menu
.
buildFromTemplate
([
const
contextMenu
=
Menu
.
buildFromTemplate
([{
role
:
'
quit
'
,
label
:
'
Quit Ollama
'
,
accelerator
:
'
Command+Q
'
}])
{
role
:
'
quit
'
,
label
:
'
Quit Ollama
'
,
accelerator
:
'
Command+Q
'
}
])
tray
.
setContextMenu
(
contextMenu
)
tray
.
setContextMenu
(
contextMenu
)
tray
.
setToolTip
(
'
Ollama
'
)
tray
.
setToolTip
(
'
Ollama
'
)
...
@@ -115,7 +112,7 @@ app.on('ready', () => {
...
@@ -115,7 +112,7 @@ app.on('ready', () => {
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
})
store
.
set
(
'
first-time-run
'
,
false
)
;
store
.
set
(
'
first-time-run
'
,
false
)
}
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
})
...
@@ -194,7 +191,7 @@ if (app.isPackaged) {
...
@@ -194,7 +191,7 @@ if (app.isPackaged) {
setInterval
(()
=>
{
setInterval
(()
=>
{
heartbeat
()
heartbeat
()
autoUpdater
.
checkForUpdates
()
autoUpdater
.
checkForUpdates
()
},
60000
)
},
60
*
60
*
1
000
)
}
}
autoUpdater
.
on
(
'
error
'
,
e
=>
{
autoUpdater
.
on
(
'
error
'
,
e
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment