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。
TypeScript aicliclickhousedatabasedatabase-clientdatabase-managementdockerguimcpmongodbmysqlpostgresqlredisrustsql-serversqlitetaurivue
import { ref } from "vue";
import * as api from "@/lib/backend/api";
/** Whether the current backend allows the UI to reveal stored connection secrets. */
export const passwordViewerEnabled = ref(true);
let initialization: Promise<boolean> | null = null;
export function initializePasswordViewerCapability(): Promise<boolean> {
if (!initialization) {
initialization = api
.loadWebCapabilities()
.then((capabilities) => {
passwordViewerEnabled.value = capabilities.passwordViewerEnabled !== false;
return passwordViewerEnabled.value;
})
.catch(() => {
passwordViewerEnabled.value = false;
initialization = null;
return false;
});
}
return initialization;
}
export function isSavedCredential(value: unknown): value is string {
return typeof value === "string" && value.startsWith("__DBX_SAVED_CREDENTIAL__:");
}