From 4445abfa05860ba08aff4039e69b13f59a43229b Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Wed, 6 Nov 2024 13:34:01 +0700 Subject: [PATCH 1/3] fix: update themes migrations (#3957) --- electron/utils/migration.ts | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/electron/utils/migration.ts b/electron/utils/migration.ts index 52ee45ed0..7295fa15d 100644 --- a/electron/utils/migration.ts +++ b/electron/utils/migration.ts @@ -47,9 +47,6 @@ async function migrateThemes() { const themes = readdirSync(join(appResourcePath(), 'themes')) for (const theme of themes) { const themePath = join(appResourcePath(), 'themes', theme) - if (existsSync(themePath) && !lstatSync(themePath).isDirectory()) { - continue - } await checkAndMigrateTheme(theme, themePath) } } @@ -64,21 +61,11 @@ async function checkAndMigrateTheme( ) if (existingTheme) { const desTheme = join(janDataThemesFolder, existingTheme) - if (!existsSync(desTheme) || !lstatSync(desTheme).isDirectory()) return - - const desThemeData = JSON.parse( - readFileSync(join(desTheme, 'theme.json'), 'utf-8') - ) - const sourceThemeData = JSON.parse( - readFileSync(join(sourceThemePath, 'theme.json'), 'utf-8') - ) - if (desThemeData.version !== sourceThemeData.version) { - console.debug('Updating theme', existingTheme) - rmdirSync(desTheme, { recursive: true }) - cpSync(sourceThemePath, join(janDataThemesFolder, sourceThemeName), { - recursive: true, - }) - } + console.debug('Updating theme', existingTheme) + rmdirSync(desTheme, { recursive: true }) + cpSync(sourceThemePath, join(janDataThemesFolder, sourceThemeName), { + recursive: true, + }) } else { console.debug('Adding new theme', sourceThemeName) cpSync(sourceThemePath, join(janDataThemesFolder, sourceThemeName), { From 1f46c82ff7caa63ec88df9b4d1b89305b8204bc9 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Wed, 6 Nov 2024 13:41:16 +0700 Subject: [PATCH 2/3] fix: remove tooltip and update text color modelid API server page (#3959) --- .../LocalServerRightPanel/index.tsx | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/web/screens/LocalServer/LocalServerRightPanel/index.tsx b/web/screens/LocalServer/LocalServerRightPanel/index.tsx index 628a61512..60c64eafb 100644 --- a/web/screens/LocalServer/LocalServerRightPanel/index.tsx +++ b/web/screens/LocalServer/LocalServerRightPanel/index.tsx @@ -1,6 +1,6 @@ import { useCallback, useEffect, useMemo, useState } from 'react' -import { Accordion, AccordionItem, Input, Tooltip } from '@janhq/joi' +import { Accordion, AccordionItem, Input } from '@janhq/joi' import { useAtomValue, useSetAtom } from 'jotai' import { AlertTriangleIcon, CheckIcon, CopyIcon, InfoIcon } from 'lucide-react' @@ -99,7 +99,7 @@ const LocalServerRightPanel = () => {
{ className="text-[hsla(var(--success-bg))]" /> ) : ( - { - clipboard.copy(selectedModel?.id) - }} - /> - } - content="Copy Model ID" + { + clipboard.copy(selectedModel?.id) + }} /> ) } From 0154199161e5fa56e4d421af76e8842904146903 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Wed, 6 Nov 2024 13:41:49 +0700 Subject: [PATCH 3/3] fix: text alignment on import model dialog (#3958) --- .../ModelDownloadRow/index.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/web/screens/Settings/HuggingFaceRepoDetailModal/ModelDownloadRow/index.tsx b/web/screens/Settings/HuggingFaceRepoDetailModal/ModelDownloadRow/index.tsx index 9c2ff14a5..5d679913e 100644 --- a/web/screens/Settings/HuggingFaceRepoDetailModal/ModelDownloadRow/index.tsx +++ b/web/screens/Settings/HuggingFaceRepoDetailModal/ModelDownloadRow/index.tsx @@ -118,7 +118,7 @@ const ModelDownloadRow: React.FC = ({ return (
-
+
{quantization && ( {quantization} @@ -133,9 +133,11 @@ const ModelDownloadRow: React.FC = ({ {fileName}
- - {toGibibytes(fileSize)} - +
+ + {toGibibytes(fileSize)} + +
{downloadedModel ? (