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), { diff --git a/web/screens/LocalServer/LocalServerRightPanel/index.tsx b/web/screens/LocalServer/LocalServerRightPanel/index.tsx index 0d2fe0f7c..fd7f19f5f 100644 --- a/web/screens/LocalServer/LocalServerRightPanel/index.tsx +++ b/web/screens/LocalServer/LocalServerRightPanel/index.tsx @@ -1,7 +1,7 @@ import { useCallback, useEffect, useMemo, useState } from 'react' import { extractInferenceParams, extractModelLoadParams } from '@janhq/core' -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' @@ -95,7 +95,7 @@ const LocalServerRightPanel = () => {