style(ui): família visual de IA local
This commit is contained in:
1 parent
f0b7db8c12
commit
07b0eaadca
62 files changed
+918
-853
No files matched your search
@@ -11,7 +11,7 @@ import {
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
|
||||
import { Button } from "@/components/ui/button"
|
||||
import { Progress } from "@/components/ui/progress"
|
||||
import { Download, Loader2, AlertCircle, CheckCircle2, Play } from "lucide-react"
|
||||
import { Download, Loader2, AlertCircle, CheckCircle2, Play, Lightbulb } from "lucide-react"
|
||||
import { useOllamaDownload } from "@/hooks/use-ollama-download"
|
||||
import { useToast } from "@/hooks/use-toast"
|
||||
import { useOperatingSystem } from "@/hooks/use-operating-system"
|
||||
@@ -163,13 +163,13 @@ export function InstallModal({ open, onCheckAgain }: InstallModalProps) {
|
||||
</>
|
||||
)}
|
||||
{hasDownloaded && !isDownloading && (
|
||||
<div className="flex items-start gap-2 p-3 bg-green-50 dark:bg-green-950/20 rounded-md">
|
||||
<CheckCircle2 className="h-4 w-4 mt-0.5 text-green-600 dark:text-green-400" />
|
||||
<div className="flex items-start gap-2 p-3 border border-success/30 bg-success/10 rounded-md">
|
||||
<CheckCircle2 className="h-4 w-4 mt-0.5 shrink-0 text-success" />
|
||||
<div className="text-sm flex-1">
|
||||
<p className="font-medium text-green-900 dark:text-green-100">
|
||||
<p className="font-medium text-foreground">
|
||||
Download concluído
|
||||
</p>
|
||||
<p className="text-green-700 dark:text-green-300">
|
||||
<p className="text-muted-foreground">
|
||||
Clique em "Instalar Ollama" para iniciar a instalação.
|
||||
</p>
|
||||
</div>
|
||||
@@ -203,20 +203,21 @@ export function InstallModal({ open, onCheckAgain }: InstallModalProps) {
|
||||
<DownloadProgress os="mac" />
|
||||
</div>
|
||||
{downloadState.downloadError && activeTab === 'mac' && (
|
||||
<div className="flex items-start gap-2 p-3 bg-red-50 dark:bg-red-950/20 rounded-md">
|
||||
<AlertCircle className="h-4 w-4 mt-0.5 text-red-600 dark:text-red-400" />
|
||||
<div className="flex items-start gap-2 p-3 border border-destructive/30 bg-destructive/10 rounded-md">
|
||||
<AlertCircle className="h-4 w-4 mt-0.5 shrink-0 text-destructive" />
|
||||
<div className="text-sm">
|
||||
<p className="font-medium text-red-900 dark:text-red-100">Erro no download</p>
|
||||
<p className="text-red-700 dark:text-red-300">
|
||||
<p className="font-medium text-foreground">Erro no download</p>
|
||||
<p className="text-muted-foreground">
|
||||
{downloadState.downloadError}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
<div className="space-y-2 text-sm text-muted-foreground">
|
||||
<p>Após instalar, o Ollama será iniciado automaticamente. Se necessário, abra o terminal e digite <code className="bg-muted px-1 rounded">ollama serve</code>.</p>
|
||||
<p className="font-medium text-foreground">
|
||||
💡 Dica: Após concluir a instalação, você pode fechar qualquer janela de chat aberta pelo Ollama e continuar aqui no OllaHub.
|
||||
<p>Após instalar, o Ollama será iniciado automaticamente. Se necessário, abra o terminal e digite <code className="font-mono bg-surface border px-1 rounded-sm">ollama serve</code>.</p>
|
||||
<p className="flex gap-2 font-medium text-foreground">
|
||||
<Lightbulb className="h-4 w-4 mt-0.5 shrink-0 text-muted-foreground" aria-hidden="true" />
|
||||
<span>Dica: Após concluir a instalação, você pode fechar qualquer janela de chat aberta pelo Ollama e continuar aqui no OllaHub.</span>
|
||||
</p>
|
||||
</div>
|
||||
</TabsContent>
|
||||
@@ -224,8 +225,8 @@ export function InstallModal({ open, onCheckAgain }: InstallModalProps) {
|
||||
<TabsContent value="linux" className="space-y-4 py-4">
|
||||
<div className="space-y-2">
|
||||
<h3 className="font-medium">Instalação via Terminal</h3>
|
||||
<div className="bg-muted p-4 rounded-md relative group">
|
||||
<code className="text-sm break-all">curl -fsSL https://ollama.com/install.sh | sh</code>
|
||||
<div className="bg-surface border p-4 rounded-md relative group">
|
||||
<code className="font-mono text-sm break-all">curl -fsSL https://ollama.com/install.sh | sh</code>
|
||||
</div>
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
@@ -234,11 +235,11 @@ export function InstallModal({ open, onCheckAgain }: InstallModalProps) {
|
||||
<DownloadProgress os="linux" />
|
||||
</div>
|
||||
{downloadState.downloadError && activeTab === 'linux' && (
|
||||
<div className="flex items-start gap-2 p-3 bg-red-50 dark:bg-red-950/20 rounded-md">
|
||||
<AlertCircle className="h-4 w-4 mt-0.5 text-red-600 dark:text-red-400" />
|
||||
<div className="flex items-start gap-2 p-3 border border-destructive/30 bg-destructive/10 rounded-md">
|
||||
<AlertCircle className="h-4 w-4 mt-0.5 shrink-0 text-destructive" />
|
||||
<div className="text-sm">
|
||||
<p className="font-medium text-red-900 dark:text-red-100">Erro no download</p>
|
||||
<p className="text-red-700 dark:text-red-300">
|
||||
<p className="font-medium text-foreground">Erro no download</p>
|
||||
<p className="text-muted-foreground">
|
||||
{downloadState.downloadError}
|
||||
</p>
|
||||
</div>
|
||||
@@ -247,10 +248,11 @@ export function InstallModal({ open, onCheckAgain }: InstallModalProps) {
|
||||
<div className="space-y-2">
|
||||
<h3 className="font-medium">Comando Manual</h3>
|
||||
<div className="text-sm text-muted-foreground">
|
||||
Ou consulte <a href="https://ollama.com/download/linux" className="underline text-primary" target="_blank" rel="noopener noreferrer">ollama.com/download/linux</a> para instruções manuais.
|
||||
Ou consulte <a href="https://ollama.com/download/linux" className="underline underline-offset-2 text-foreground" target="_blank" rel="noopener noreferrer">ollama.com/download/linux</a> para instruções manuais.
|
||||
</div>
|
||||
<p className="text-sm font-medium text-foreground">
|
||||
💡 Dica: Após concluir a instalação, você pode fechar qualquer janela de chat aberta pelo Ollama e continuar aqui no OllaHub.
|
||||
<p className="flex gap-2 text-sm font-medium text-foreground">
|
||||
<Lightbulb className="h-4 w-4 mt-0.5 shrink-0 text-muted-foreground" aria-hidden="true" />
|
||||
<span>Dica: Após concluir a instalação, você pode fechar qualquer janela de chat aberta pelo Ollama e continuar aqui no OllaHub.</span>
|
||||
</p>
|
||||
</div>
|
||||
</TabsContent>
|
||||
@@ -262,11 +264,11 @@ export function InstallModal({ open, onCheckAgain }: InstallModalProps) {
|
||||
<DownloadProgress os="windows" />
|
||||
</div>
|
||||
{downloadState.downloadError && activeTab === 'windows' && (
|
||||
<div className="flex items-start gap-2 p-3 bg-red-50 dark:bg-red-950/20 rounded-md">
|
||||
<AlertCircle className="h-4 w-4 mt-0.5 text-red-600 dark:text-red-400" />
|
||||
<div className="flex items-start gap-2 p-3 border border-destructive/30 bg-destructive/10 rounded-md">
|
||||
<AlertCircle className="h-4 w-4 mt-0.5 shrink-0 text-destructive" />
|
||||
<div className="text-sm">
|
||||
<p className="font-medium text-red-900 dark:text-red-100">Erro no download</p>
|
||||
<p className="text-red-700 dark:text-red-300">
|
||||
<p className="font-medium text-foreground">Erro no download</p>
|
||||
<p className="text-muted-foreground">
|
||||
{downloadState.downloadError}
|
||||
</p>
|
||||
</div>
|
||||
@@ -274,8 +276,9 @@ export function InstallModal({ open, onCheckAgain }: InstallModalProps) {
|
||||
)}
|
||||
<div className="space-y-2 text-sm text-muted-foreground">
|
||||
<p>Após clicar em "Instalar Ollama", o instalador será aberto. Siga as instruções na tela para completar a instalação.</p>
|
||||
<p className="font-medium text-foreground">
|
||||
💡 Dica: Após concluir a instalação, você pode fechar qualquer janela de chat aberta pelo Ollama e continuar aqui no OllaHub.
|
||||
<p className="flex gap-2 font-medium text-foreground">
|
||||
<Lightbulb className="h-4 w-4 mt-0.5 shrink-0 text-muted-foreground" aria-hidden="true" />
|
||||
<span>Dica: Após concluir a instalação, você pode fechar qualquer janela de chat aberta pelo Ollama e continuar aqui no OllaHub.</span>
|
||||
</p>
|
||||
</div>
|
||||
</TabsContent>
|
||||
@@ -283,16 +286,16 @@ export function InstallModal({ open, onCheckAgain }: InstallModalProps) {
|
||||
|
||||
{/* Status de verificação automática */}
|
||||
{downloadState.isChecking && (
|
||||
<div className="flex items-start gap-2 p-3 bg-blue-50 dark:bg-blue-950/20 rounded-md mt-4">
|
||||
<Loader2 className="h-4 w-4 mt-0.5 text-blue-600 dark:text-blue-400 animate-spin" />
|
||||
<div className="flex items-start gap-2 p-3 border bg-surface rounded-md mt-4">
|
||||
<Loader2 className="h-4 w-4 mt-0.5 shrink-0 text-primary animate-spin" />
|
||||
<div className="text-sm flex-1">
|
||||
<p className="font-medium text-blue-900 dark:text-blue-100">
|
||||
<p className="font-medium text-foreground">
|
||||
Verificando instalação do Ollama...
|
||||
</p>
|
||||
<p className="text-blue-700 dark:text-blue-300">
|
||||
<p className="text-muted-foreground">
|
||||
{downloadState.checkStatus || 'Aguardando instalação ser concluída...'}
|
||||
</p>
|
||||
<p className="text-xs text-blue-600 dark:text-blue-400 mt-1">
|
||||
<p className="text-xs text-muted-foreground mt-1">
|
||||
Esta verificação continuará em segundo plano até encontrar o Ollama.
|
||||
</p>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user