Add cloud download icon and improve update UI handling
Update UI to use CloudDownload icon instead of RefreshCw Improve error handling for update checks Add better visual feedback for update states Change GitHub link to RealManual repository
This commit is contained in:
+6
-4
@@ -1,5 +1,5 @@
|
||||
import { useState } from "react";
|
||||
import { FolderGit2, PanelLeft, PanelRight, Search, Bell, Settings, ChevronDown, RefreshCw, Download } from "lucide-react";
|
||||
import { FolderGit2, PanelLeft, PanelRight, Search, Bell, Settings, ChevronDown, CloudDownload, Download } from "lucide-react";
|
||||
import { COLORS, FONT } from "./theme";
|
||||
import type { WorkspaceView } from "./layoutTypes";
|
||||
import { leafIds } from "./layoutTypes";
|
||||
@@ -51,7 +51,7 @@ function UpdateControl({ update, checking, onCheck }: { update: UpdateInfo | nul
|
||||
animation: hasUpdate ? "spaceshPulse 2s ease-in-out infinite" : "none",
|
||||
}}
|
||||
>
|
||||
<RefreshCw size={15} style={{ animation: checking ? "spaceshSpin 0.8s linear infinite" : "none" }} />
|
||||
<CloudDownload size={15} style={{ animation: checking ? "spaceshBlink 1s ease-in-out infinite" : "none" }} />
|
||||
</button>
|
||||
|
||||
{open && (
|
||||
@@ -83,8 +83,10 @@ function UpdateControl({ update, checking, onCheck }: { update: UpdateInfo | nul
|
||||
>
|
||||
<Download size={14} /> Скачать {update?.latest}
|
||||
</button>
|
||||
) : (
|
||||
) : update?.latest ? (
|
||||
<div style={{ marginTop: 10, fontSize: 12, color: COLORS.stDone }}>Установлена последняя версия</div>
|
||||
) : (
|
||||
<div style={{ marginTop: 10, fontSize: 12, color: COLORS.textMuted }}>Не удалось проверить сервер</div>
|
||||
)}
|
||||
|
||||
<button
|
||||
@@ -151,7 +153,7 @@ export function TopBar({
|
||||
<div style={{ flex: 1 }} />
|
||||
|
||||
<style>{`
|
||||
@keyframes spaceshSpin { to { transform: rotate(360deg); } }
|
||||
@keyframes spaceshBlink { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }
|
||||
@keyframes spaceshPulse { 0%,100% { box-shadow: 0 0 6px rgba(52,211,194,0.35); } 50% { box-shadow: 0 0 14px rgba(52,211,194,0.7); } }
|
||||
`}</style>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user