Skip to content

Commit 8fbf0d6

Browse files
committed
add cloudflare icon for _cf_kv
1 parent 7e6176c commit 8fbf0d6

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

src/components/gui/schema-sidebar-list.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@ import { scc } from "@/core/command";
55
import { DatabaseSchemaItem } from "@/drivers/base-driver";
66
import { triggerEditorExtensionTab } from "@/extensions/trigger-editor";
77
import { ExportFormat, exportTableData } from "@/lib/export-helper";
8-
import { Table } from "@phosphor-icons/react";
8+
import { Icon, Table } from "@phosphor-icons/react";
99
import { LucideCog, LucideDatabase, LucideView } from "lucide-react";
1010
import { useCallback, useEffect, useMemo, useState } from "react";
1111
import { ListView, ListViewItem } from "../listview";
12+
import { CloudflareIcon } from "../resource-card/icon";
1213
import SchemaCreateDialog from "./schema-editor/schema-create";
1314

1415
interface SchemaListProps {
@@ -39,12 +40,17 @@ function prepareListViewItem(
3940
let icon = Table;
4041
let iconClassName = "";
4142

43+
console.log("ss", s);
44+
4245
if (s.type === "trigger") {
4346
icon = LucideCog;
4447
iconClassName = "text-purple-500";
4548
} else if (s.type === "view") {
4649
icon = LucideView;
4750
iconClassName = "text-green-600 dark:text-green-300";
51+
} else if (s.type === "table" && s.name === "_cf_KV") {
52+
icon = CloudflareIcon as Icon;
53+
iconClassName = "text-orange-500";
4854
}
4955

5056
return {

src/components/listview/index.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ import {
66
} from "@/components/ui/context-menu";
77
import { OpenContextMenuList } from "@/core/channel-builtin";
88
import { cn } from "@/lib/utils";
9-
import {
10-
LucideChevronDown,
11-
LucideChevronRight,
12-
LucideIcon,
13-
} from "lucide-react";
9+
import { Icon } from "@phosphor-icons/react";
10+
import { LucideChevronDown, LucideChevronRight } from "lucide-react";
1411
import React, {
1512
Dispatch,
1613
Fragment,
@@ -24,7 +21,7 @@ import HighlightText from "../ui/highlight-text";
2421
export interface ListViewItem<T = unknown> {
2522
key: string;
2623
name: string;
27-
icon: LucideIcon;
24+
icon: Icon;
2825
iconColor?: string;
2926
iconBadgeColor?: string;
3027
data: T;

0 commit comments

Comments
 (0)