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
dfceca48
Commit
dfceca48
authored
Jul 19, 2023
by
Eva Ho
Browse files
update icons to have different images for bright and dark mode
parent
0294216e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
3 deletions
+21
-3
app/assets/ollama_outline_icon_16x16Template.png
app/assets/ollama_outline_icon_16x16Template.png
+0
-0
app/assets/ollama_outline_icon_16x16Template@2x.png
app/assets/ollama_outline_icon_16x16Template@2x.png
+0
-0
app/forge.config.ts
app/forge.config.ts
+2
-0
app/src/index.ts
app/src/index.ts
+19
-3
No files found.
app/assets/ollama_outline_icon_16x16Template.png
0 → 100644
View file @
dfceca48
445 Bytes
app/assets/ollama_outline_icon_16x16Template@2x.png
0 → 100644
View file @
dfceca48
891 Bytes
app/forge.config.ts
View file @
dfceca48
...
@@ -21,6 +21,8 @@ const config: ForgeConfig = {
...
@@ -21,6 +21,8 @@ const config: ForgeConfig = {
'
../ollama
'
,
'
../ollama
'
,
path
.
join
(
__dirname
,
'
./assets/ollama_icon_16x16Template.png
'
),
path
.
join
(
__dirname
,
'
./assets/ollama_icon_16x16Template.png
'
),
path
.
join
(
__dirname
,
'
./assets/ollama_icon_16x16Template@2x.png
'
),
path
.
join
(
__dirname
,
'
./assets/ollama_icon_16x16Template@2x.png
'
),
path
.
join
(
__dirname
,
'
./assets/ollama_outline_icon_16x16Template.png
'
),
path
.
join
(
__dirname
,
'
./assets/ollama_outline_icon_16x16Template@2x.png
'
),
...(
process
.
platform
===
'
darwin
'
?
[
'
../llama/ggml-metal.metal
'
]
:
[]),
...(
process
.
platform
===
'
darwin
'
?
[
'
../llama/ggml-metal.metal
'
]
:
[]),
],
],
...(
process
.
env
.
SIGN
...(
process
.
env
.
SIGN
...
...
app/src/index.ts
View file @
dfceca48
import
{
spawn
}
from
'
child_process
'
import
{
spawn
}
from
'
child_process
'
import
{
app
,
autoUpdater
,
dialog
,
Tray
,
Menu
,
BrowserWindow
}
from
'
electron
'
import
{
app
,
autoUpdater
,
dialog
,
Tray
,
Menu
,
BrowserWindow
,
nativeTheme
}
from
'
electron
'
import
Store
from
'
electron-store
'
import
Store
from
'
electron-store
'
import
winston
from
'
winston
'
import
winston
from
'
winston
'
import
'
winston-daily-rotate-file
'
import
'
winston-daily-rotate-file
'
...
@@ -66,14 +66,30 @@ function firstRunWindow() {
...
@@ -66,14 +66,30 @@ function firstRunWindow() {
}
}
function
createSystemtray
()
{
function
createSystemtray
()
{
let
iconPath
=
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
,
'
assets
'
,
'
ollama_icon_16x16Template.png
'
)
let
iconPath
=
nativeTheme
.
shouldUseDarkColors
?
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
,
'
assets
'
,
'
ollama_icon_16x16Template.png
'
)
:
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
,
'
assets
'
,
'
ollama_outline_icon_16x16Template.png
'
)
if
(
app
.
isPackaged
)
{
if
(
app
.
isPackaged
)
{
iconPath
=
path
.
join
(
process
.
resourcesPath
,
'
ollama_icon_16x16Template.png
'
)
iconPath
=
nativeTheme
.
shouldUseDarkColors
?
path
.
join
(
process
.
resourcesPath
,
'
ollama_icon_16x16Template.png
'
)
:
path
.
join
(
process
.
resourcesPath
,
'
ollama_outline_icon_16x16Template.png
'
)
}
}
tray
=
new
Tray
(
iconPath
)
tray
=
new
Tray
(
iconPath
)
nativeTheme
.
on
(
'
updated
'
,
function
theThemeHasChanged
()
{
if
(
nativeTheme
.
shouldUseDarkColors
)
{
app
.
isPackaged
?
tray
.
setImage
(
path
.
join
(
process
.
resourcesPath
,
'
ollama_icon_16x16Template.png
'
))
:
tray
.
setImage
(
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
,
'
assets
'
,
'
ollama_icon_16x16Template.png
'
))
}
else
{
app
.
isPackaged
?
tray
.
setImage
(
path
.
join
(
process
.
resourcesPath
,
'
ollama_outline_icon_16x16Template.png
'
))
:
tray
.
setImage
(
path
.
join
(
__dirname
,
'
..
'
,
'
..
'
,
'
assets
'
,
'
ollama_outline_icon_16x16Template.png
'
))
}
})
const
contextMenu
=
Menu
.
buildFromTemplate
([{
role
:
'
quit
'
,
label
:
'
Quit Ollama
'
,
accelerator
:
'
Command+Q
'
}])
const
contextMenu
=
Menu
.
buildFromTemplate
([{
role
:
'
quit
'
,
label
:
'
Quit Ollama
'
,
accelerator
:
'
Command+Q
'
}])
tray
.
setContextMenu
(
contextMenu
)
tray
.
setContextMenu
(
contextMenu
)
...
...
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