From 6e89710ec74dea696c9216635132b4f311ed64d9 Mon Sep 17 00:00:00 2001 From: Stijnus <72551117+Stijnus@users.noreply.github.com> Date: Sat, 15 Feb 2025 17:28:17 +0100 Subject: [PATCH] Several UI fixes --- .../shared/components/TabManagement.tsx | 257 ++++++++++++------ .../@settings/tabs/debug/DebugTab.tsx | 153 ++++++----- .../providers/local/LocalProvidersTab.tsx | 68 ++++- .../providers/local/OllamaModelInstaller.tsx | 13 +- .../@settings/tabs/settings/SettingsTab.tsx | 61 +---- app/lib/stores/settings.ts | 2 +- 6 files changed, 345 insertions(+), 209 deletions(-) diff --git a/app/components/@settings/shared/components/TabManagement.tsx b/app/components/@settings/shared/components/TabManagement.tsx index ec6acece..67311c43 100644 --- a/app/components/@settings/shared/components/TabManagement.tsx +++ b/app/components/@settings/shared/components/TabManagement.tsx @@ -1,7 +1,7 @@ import { useState } from 'react'; import { motion } from 'framer-motion'; import { useStore } from '@nanostores/react'; -import { Switch } from '@radix-ui/react-switch'; +import { Switch } from '~/components/ui/Switch'; import { classNames } from '~/utils/classNames'; import { tabConfigurationStore } from '~/lib/stores/settings'; import { TAB_LABELS } from '~/components/@settings/core/constants'; @@ -177,92 +177,193 @@ export const TabManagement = () => { {/* Tab Grid */}
- {tab.visible ? 'Visible in user mode' : 'Hidden in user mode'} -
++ {tab.visible ? 'Visible in user mode' : 'Hidden in user mode'} +
++ {tab.visible ? 'Visible in user mode' : 'Hidden in user mode'} +
+No models installed yet
-Install your first model below
++ Browse models at{' '} + + ollama.com/library + + {' '} + and copy model names to install +
+
Browse models at{' '} ollama.com/library - + {' '} and copy model names to install
@@ -448,10 +448,11 @@ export default function OllamaModelInstaller({ onModelInstalled }: OllamaModelIn onClick={() => handleInstallModel(modelString)} disabled={!modelString || isInstalling} className={classNames( - 'rounded-xl px-6 py-3', - 'bg-purple-500 text-white', + 'rounded-lg px-4 py-2', + 'bg-purple-500 text-white text-sm', 'hover:bg-purple-600', 'transition-all duration-200', + 'flex items-center gap-2', { 'opacity-50 cursor-not-allowed': !modelString || isInstalling }, )} whileHover={{ scale: 1.02 }} @@ -459,7 +460,7 @@ export default function OllamaModelInstaller({ onModelInstalled }: OllamaModelIn > {isInstalling ? (