Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

style(plugins): format PluginFileManager component and spec

t8y2b5509d588368
diff --git a/apps/desktop/src/components/plugins/PluginFileManager.spec.ts b/apps/desktop/src/components/plugins/PluginFileManager.spec.ts
index edacfa1811..0324a5082a 100644
--- a/apps/desktop/src/components/plugins/PluginFileManager.spec.ts
+++ b/apps/desktop/src/components/plugins/PluginFileManager.spec.ts
@@ -16,7 +16,12 @@ vi.mock("vue-virtual-scroller", () => ({
inheritAttrs: false,
props: { items: { type: Array, default: () => [] } },
setup(props, { attrs, slots }) {
- return () => h("div", attrs, (props.items as unknown[]).flatMap((item) => slots.default?.({ item }) ?? []));
+ return () =>
+ h(
+ "div",
+ attrs,
+ (props.items as unknown[]).flatMap((item) => slots.default?.({ item }) ?? []),
+ );
},
}),
}));
diff --git a/apps/desktop/src/components/plugins/PluginFileManager.vue b/apps/desktop/src/components/plugins/PluginFileManager.vue
index b5aa313bc2..3d7bb7313f 100644
--- a/apps/desktop/src/components/plugins/PluginFileManager.vue
+++ b/apps/desktop/src/components/plugins/PluginFileManager.vue
@@ -305,14 +305,7 @@ defineExpose({ refresh: () => load(currentUri.value) });
<div v-else-if="!sortedEntries.length" class="flex h-full items-center justify-center text-sm text-muted-foreground">{{ t("pluginPlatform.emptyDirectory") }}</div>
<RecycleScroller v-else data-file-list class="plugin-file-list min-h-0 min-w-0 flex-1 overflow-x-hidden text-sm" :items="sortedEntries" :item-size="46" :buffer="300" key-field="uri">
<template #default="{ item: entry }">
- <button
- type="button"
- class="plugin-file-row grid h-[46px] w-full min-w-0 items-center gap-3 border-b px-3 text-left hover:bg-muted/50"
- :class="selected?.uri === entry.uri ? 'bg-muted' : ''"
- :data-file-entry-uri="entry.uri"
- @click="selected = entry"
- @dblclick="activateEntry(entry)"
- >
+ <button type="button" class="plugin-file-row grid h-[46px] w-full min-w-0 items-center gap-3 border-b px-3 text-left hover:bg-muted/50" :class="selected?.uri === entry.uri ? 'bg-muted' : ''" :data-file-entry-uri="entry.uri" @click="selected = entry" @dblclick="activateEntry(entry)">
<span class="flex min-w-0 items-center gap-2">
<Folder v-if="entry.kind === 'directory'" class="size-4 shrink-0 text-amber-500" />
<FileCode2 v-else-if="entry.contentType?.startsWith('text/')" class="size-4 shrink-0 text-sky-500" />