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
a88576e5
Commit
a88576e5
authored
Jul 07, 2023
by
Eva Ho
Browse files
add Template to icon file name to handle bright and dark modes better on MacOS
parent
962cc9ca
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
7 additions
and
15 deletions
+7
-15
app/assets/ollama_icon_16x16Template.png
app/assets/ollama_icon_16x16Template.png
+0
-0
app/assets/ollama_icon_16x16Template@2x.png
app/assets/ollama_icon_16x16Template@2x.png
+0
-0
app/assets/ollama_icon_dark_16x16.png
app/assets/ollama_icon_dark_16x16.png
+0
-0
app/assets/ollama_icon_dark_16x16@2x.png
app/assets/ollama_icon_dark_16x16@2x.png
+0
-0
app/forge.config.ts
app/forge.config.ts
+2
-2
app/src/index.ts
app/src/index.ts
+5
-13
No files found.
app/assets/ollama_icon_
birhgt_16x16
.png
→
app/assets/ollama_icon_
16x16Template
.png
View file @
a88576e5
File moved
app/assets/ollama_icon_
bright_16x16
@2x.png
→
app/assets/ollama_icon_
16x16Template
@2x.png
View file @
a88576e5
File moved
app/assets/ollama_icon_dark_16x16.png
deleted
100644 → 0
View file @
962cc9ca
407 Bytes
app/assets/ollama_icon_dark_16x16@2x.png
deleted
100644 → 0
View file @
962cc9ca
810 Bytes
app/forge.config.ts
View file @
a88576e5
...
...
@@ -19,8 +19,8 @@ const config: ForgeConfig = {
icon
:
'
./assets/icon.icns
'
,
extraResource
:
[
'
../ollama
'
,
path
.
join
(
__dirname
,
'
./assets/ollama_icon_
dark_16x16@2x
.png
'
),
path
.
join
(
__dirname
,
'
./assets/ollama_icon_
bright_16x16
@2x.png
'
),
path
.
join
(
__dirname
,
'
./assets/ollama_icon_
16x16Template
.png
'
),
path
.
join
(
__dirname
,
'
./assets/ollama_icon_
16x16Template
@2x.png
'
),
...(
process
.
platform
===
'
darwin
'
?
[
'
../ggml-metal.metal
'
]
:
[]),
],
...(
process
.
env
.
SIGN
...
...
app/src/index.ts
View file @
a88576e5
import
{
spawn
,
exec
}
from
'
child_process
'
import
{
app
,
autoUpdater
,
dialog
,
Tray
,
Menu
,
nativeTheme
}
from
'
electron
'
import
{
app
,
autoUpdater
,
dialog
,
Tray
,
Menu
}
from
'
electron
'
import
*
as
path
from
'
path
'
import
*
as
fs
from
'
fs
'
...
...
@@ -15,22 +15,14 @@ if (!SingleInstanceLock) {
}
const
createSystemtray
=
()
=>
{
let
brightModeIconPath
=
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
,
'
assets
'
,
'
ollama_icon_dark_16x16.png
'
)
let
darkModeI
conPath
=
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
,
'
assets
'
,
'
ollama_icon_
bright_16x16
.png
'
)
let
i
conPath
=
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
,
'
assets
'
,
'
ollama_icon_
16x16Template
.png
'
)
if
(
app
.
isPackaged
)
{
brightModeIconPath
=
path
.
join
(
process
.
resourcesPath
,
'
ollama_icon_dark_16x16@2x.png
'
)
darkModeIconPath
=
path
.
join
(
process
.
resourcesPath
,
'
ollama_icon_bright_16x16@2x.png
'
)
iconPath
=
path
.
join
(
process
.
resourcesPath
,
'
ollama_icon_16x16Template.png
'
)
}
tray
=
new
Tray
(
brightModeIconPath
)
if
(
process
.
platform
===
'
darwin
'
)
{
tray
.
setImage
(
nativeTheme
.
shouldUseDarkColors
?
darkModeIconPath
:
brightModeIconPath
)
nativeTheme
.
on
(
'
updated
'
,
()
=>
{
tray
.
setImage
(
nativeTheme
.
shouldUseDarkColors
?
darkModeIconPath
:
brightModeIconPath
)
})
}
tray
=
new
Tray
(
iconPath
)
const
contextMenu
=
Menu
.
buildFromTemplate
([{
role
:
'
quit
'
,
label
:
'
Quit Ollama
'
,
accelerator
:
'
Command+Q
'
}])
...
...
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