updata:icon替换

This commit is contained in:
xiaozhu
2026-09-02 10:10:41 +08:00
committed by tao.chen
parent 3a5cc12782
commit af2f035d03
17 changed files with 159 additions and 304 deletions
@@ -1,5 +1,5 @@
import { type ChangeEvent, type MouseEvent as ReactMouseEvent, type RefObject, useMemo } from "react";
import Icon from "../../components/common/Icon";
import { FileText, Plus, RefreshCw, Search, Upload } from "lucide-react";
import { WorkspaceTreeGroup } from "~/features/platform/WorkspaceTree";
import { useScriptWorkspaceStore } from "~/features/platform/state/scriptWorkspaceStore";
import type { ScriptItem, WorkspaceDirectory } from "~/services/api";
@@ -175,7 +175,7 @@ export function ScriptExplorer({
disabled={uploading}
onClick={onUpload}
>
<Icon name="upload" size={15} />
<Upload size={15} />
{uploading ? "上传中…" : "上传"}
</button>
<input
@@ -191,14 +191,14 @@ export function ScriptExplorer({
type="button"
onClick={() => onOpenCreateDialog()}
>
<Icon name="plus" size={16} />
<Plus size={16} />
</button>
</div>
</div>
<div className="mx-3 mt-[11px] mb-[7px] flex h-[38px] items-center gap-[7px] rounded-md border border-[#dce5ed] bg-[#fbfcfd] px-[9px] text-[#95a2b1] focus-within:border-[#6aa9e9] focus-within:shadow-[0_0_0_3px_rgb(31_119_207/8%)]">
<Icon name="search" size={17} />
<Search size={17} />
<input
className="min-w-0 flex-1 border-0 bg-transparent text-xs text-[#26384d] outline-none placeholder:text-[#a7b2bf]"
aria-label="搜索脚本"
@@ -213,7 +213,7 @@ export function ScriptExplorer({
onClick={onRefresh}
>
<span className={refreshing ? "inline-flex animate-spin" : "inline-flex"}>
<Icon name="refresh" size={16} />
<RefreshCw size={16} />
</span>
</button>
</div>
@@ -257,7 +257,7 @@ export function ScriptExplorer({
{filteredScripts.length === 0 && directories.length === 0 && (
<div className="flex flex-col items-center px-[18px] py-[34px] text-center text-[#97a4b4]">
<span className="mb-3 grid size-[46px] place-items-center rounded-[13px] bg-[#eff6fd] text-[#6796c5]">
<Icon name="script" size={24} />
<FileText size={24} />
</span>
<strong className="text-xs text-[#637286]">
{keyword ? "没有匹配脚本" : "还没有构建脚本"}
@@ -273,7 +273,7 @@ export function ScriptExplorer({
className="inline-flex cursor-pointer items-center gap-1 rounded-md border border-[#bcd6ee] bg-white px-[11px] py-[7px] text-[11px] text-[#176cc1]"
onClick={() => onOpenCreateDialog()}
>
<Icon name="plus" size={15} />
<Plus size={15} />
</button>
)}