Merge 8deb849fa7fd1f661aaa706a05a32bc6569723e9 into d7eb05b9361febead29a74e71ddffc2ebeff5302

This commit is contained in:
Hichem Fantar 2024-11-14 13:54:51 +08:00 committed by GitHub
commit c2eecfc8c2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 5 deletions

View File

@ -6,6 +6,7 @@ import { getCurrentWindow, app } from '@electron/remote'
import { install } from './install'
import OllamaIcon from './ollama.svg'
import { APP_DISPLAY_NAME } from './utils'
const store = new Store()
@ -27,7 +28,7 @@ export default function () {
{step === Step.WELCOME && (
<>
<div className='mx-auto text-center'>
<h1 className='mb-6 mt-4 text-2xl tracking-tight text-gray-900'>Welcome to Ollama</h1>
<h1 className='mb-6 mt-4 text-2xl tracking-tight text-gray-900'>Welcome to {APP_DISPLAY_NAME}</h1>
<p className='mx-auto w-[65%] text-sm text-gray-400'>
Let's get you up and running with your own large language models.
</p>

View File

@ -7,6 +7,7 @@ import * as path from 'path'
import { v4 as uuidv4 } from 'uuid'
import { installed } from './install'
import { APP_DISPLAY_NAME } from './utils'
require('@electron/remote/main').initialize()
@ -123,7 +124,7 @@ function updateTray() {
tray = new Tray(trayIconPath())
}
tray.setToolTip(updateAvailable ? 'An update is available' : 'Ollama')
tray.setToolTip(updateAvailable ? 'An update is available' : APP_DISPLAY_NAME)
tray.setContextMenu(menu)
tray.setImage(trayIconPath())
@ -223,7 +224,7 @@ function init() {
const chosen = dialog.showMessageBoxSync({
type: 'question',
buttons: ['Move to Applications', 'Do Not Move'],
message: 'Ollama works best when run from the Applications directory.',
message: `${APP_DISPLAY_NAME} works best when run from the Applications directory.`,
defaultId: 0,
cancelId: 1,
})
@ -236,8 +237,7 @@ function init() {
dialog.showMessageBoxSync({
type: 'info',
message: 'Cannot move to Applications directory',
detail:
'Another version of Ollama is currently running from your Applications directory. Close it first and try again.',
detail: `Another version of ${APP_DISPLAY_NAME} is currently running from your Applications directory. Close it first and try again.`,
})
}
return true

3
macapp/src/utils.ts Normal file
View File

@ -0,0 +1,3 @@
const APP_DISPLAY_NAME = 'Ollama'
export { APP_DISPLAY_NAME }