fix: 标签页栏协议图标换为 lucide SVG(清理最后一批 emoji)
This commit is contained in:
1 parent
dec66db5aa
commit
90d6353871
1 file changed
+8
-8
@@ -5,14 +5,14 @@ import { KIND_LABELS, findNode } from "@opsxapi/core";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { useWorkspace } from "../workspaceStore";
|
import { useWorkspace } from "../workspaceStore";
|
||||||
import { ContextMenu, cx, type MenuItem } from "./common";
|
import { ContextMenu, cx, type MenuItem } from "./common";
|
||||||
|
import { Icon, type IconName } from "./icons";
|
||||||
|
|
||||||
const KIND_TAB_ICON: Record<string, string> = {
|
const KIND_TAB_ICON: Record<string, IconName> = {
|
||||||
http: "",
|
graphql: "hexagon",
|
||||||
graphql: "◈",
|
websocket: "zap",
|
||||||
websocket: "⚡",
|
sse: "radio",
|
||||||
sse: "📡",
|
socketio: "plug-zap",
|
||||||
socketio: "🔌",
|
mqtt: "mailbox",
|
||||||
mqtt: "📮",
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export function TabBar() {
|
export function TabBar() {
|
||||||
@@ -77,7 +77,7 @@ export function TabBar() {
|
|||||||
{node.type === "request" && node.kind === "http" ? (
|
{node.type === "request" && node.kind === "http" ? (
|
||||||
<span className={`ops-method-${node.data.method} font-bold`}>{node.data.method}</span>
|
<span className={`ops-method-${node.data.method} font-bold`}>{node.data.method}</span>
|
||||||
) : node.type === "request" ? (
|
) : node.type === "request" ? (
|
||||||
<span title={KIND_LABELS[node.kind]}>{KIND_TAB_ICON[node.kind]}</span>
|
<Icon name={KIND_TAB_ICON[node.kind]} size={13} className="ops-dim shrink-0" title={KIND_LABELS[node.kind]} />
|
||||||
) : null}
|
) : null}
|
||||||
<span className="max-w-48 truncate">{node.name}</span>
|
<span className="max-w-48 truncate">{node.name}</span>
|
||||||
{busy && <span className="ops-dot ops-dot-connecting" />}
|
{busy && <span className="ops-dot ops-dot-connecting" />}
|
||||||
|
|||||||
Reference in new issue
Block a user