fix(kingbase): compat V8 routine source and add extension details
This commit is contained in:
18 files changed
+315
-6
No files matched your search
@@ -29,6 +29,7 @@ import TreeItem from "./TreeItem.vue";
|
||||
import SidebarTreeRuntimeHost from "./SidebarTreeRuntimeHost.vue";
|
||||
import SidebarTreeItemDialogs from "./SidebarTreeItemDialogs.vue";
|
||||
import InstallExtensionDialog from "@/components/objects/InstallExtensionDialog.vue";
|
||||
import ExtensionDetailsDialog from "@/components/objects/ExtensionDetailsDialog.vue";
|
||||
import { RecycleScroller } from "vue-virtual-scroller";
|
||||
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
|
||||
import LightDropdown from "@/components/ui/LightDropdown.vue";
|
||||
@@ -79,6 +80,8 @@ const sidebarDangerDialogConfirming = ref(false);
|
||||
const sidebarTreeItemDialogController = ref<Record<string, any> | null>(null);
|
||||
const sidebarInstallExtensionTarget = ref<TreeNode | null>(null);
|
||||
const sidebarInstallExtensionDialogRef = ref<InstanceType<typeof InstallExtensionDialog> | null>(null);
|
||||
const sidebarExtensionDetailsTarget = ref<TreeNode | null>(null);
|
||||
const sidebarExtensionDetailsDialogRef = ref<InstanceType<typeof ExtensionDetailsDialog> | null>(null);
|
||||
const sidebarTreeRuntimeHostRef = ref<SidebarTreeRuntimeHostInstance | null>(null);
|
||||
const sidebarTreeRuntime = createSidebarTreeRuntime();
|
||||
const sidebarTreeRuntimeInitialNode: TreeNode = { id: "__sidebar-runtime__", label: "", type: "connection-group" };
|
||||
@@ -1284,6 +1287,12 @@ async function openSidebarInstallExtension(node: TreeNode) {
|
||||
sidebarInstallExtensionDialogRef.value?.show();
|
||||
}
|
||||
|
||||
async function openSidebarExtensionDetails(node: TreeNode) {
|
||||
sidebarExtensionDetailsTarget.value = createSidebarActionTarget(node);
|
||||
await nextTick();
|
||||
sidebarExtensionDetailsDialogRef.value?.show();
|
||||
}
|
||||
|
||||
function beginSidebarAction(): number {
|
||||
sidebarActionGeneration += 1;
|
||||
sidebarDdlOpen.value = false;
|
||||
@@ -1751,6 +1760,7 @@ defineExpose({ focusSearch, createNewGroup, collapseAllTreeNodes });
|
||||
@open-danger-dialog="openSidebarDangerDialog"
|
||||
@open-dialog-controller="updateSidebarTreeItemDialogController"
|
||||
@open-install-extension="openSidebarInstallExtension"
|
||||
@open-extension-details="openSidebarExtensionDetails"
|
||||
/>
|
||||
<div class="connection-tree-search sticky top-0 z-10 bg-background px-2 py-1">
|
||||
<div class="relative flex items-center gap-1">
|
||||
@@ -2056,6 +2066,7 @@ defineExpose({ focusSearch, createNewGroup, collapseAllTreeNodes });
|
||||
</SidebarDangerConfirmDialog>
|
||||
<SidebarTreeItemDialogs v-if="sidebarTreeItemDialogController" :key="sidebarTreeItemDialogController.node?.id" :controller="sidebarTreeItemDialogController" @closed="sidebarTreeItemDialogController = null" />
|
||||
<InstallExtensionDialog v-if="sidebarInstallExtensionTarget" ref="sidebarInstallExtensionDialogRef" :node="sidebarInstallExtensionTarget" @close="refreshSidebarActionTarget" @changed="refreshSidebarActionTarget" />
|
||||
<ExtensionDetailsDialog v-if="sidebarExtensionDetailsTarget" ref="sidebarExtensionDetailsDialogRef" :node="sidebarExtensionDetailsTarget" />
|
||||
<div v-if="store.treeNodes.length === 0" class="px-3 py-8 text-center text-muted-foreground text-xs">
|
||||
{{ t("sidebar.noConnections") }}
|
||||
</div>
|
||||
|
||||
@@ -342,6 +342,7 @@ const emit = defineEmits<{
|
||||
"open-danger-dialog": [request: SidebarDangerDialogRequest];
|
||||
"open-dialog-controller": [controller: Record<string, any> | null];
|
||||
"open-install-extension": [node: TreeNode];
|
||||
"open-extension-details": [node: TreeNode];
|
||||
}>();
|
||||
|
||||
const {
|
||||
@@ -760,6 +761,8 @@ function runRowClickAction(clickDetail: number) {
|
||||
scheduleOpenData(node);
|
||||
} else if (action === "open-source") {
|
||||
openObjectSourceDialog(false);
|
||||
} else if (action === "open-extension-details") {
|
||||
emit("open-extension-details", node);
|
||||
} else if (isDocumentBrowserTreeNode(node.type)) {
|
||||
openMongoTreeData(node);
|
||||
} else if (action === "toggle") {
|
||||
@@ -1067,6 +1070,8 @@ function onDoubleClick(event: MouseEvent) {
|
||||
activateDataTableFromDoubleClick();
|
||||
} else if (action === "open-source") {
|
||||
openObjectSourceDialog(false);
|
||||
} else if (action === "open-extension-details") {
|
||||
emit("open-extension-details", activeNode.value);
|
||||
} else if (action === "open-saved-sql") {
|
||||
openSavedSqlFile();
|
||||
} else if (action === "toggle" && (activeNode.value.type === "mongo-gridfs" || isDocumentBrowserTreeNode(activeNode.value.type))) {
|
||||
@@ -4395,6 +4400,8 @@ function buildSpecialSidebarMenu(context: SidebarMenuFactoryContext): boolean {
|
||||
|
||||
// 8.5 Extension
|
||||
if (node.type === "extension") {
|
||||
items.push({ label: t("extension.viewDetails"), action: () => emit("open-extension-details", node), icon: Info });
|
||||
items.push({ label: "", separator: true });
|
||||
items.push({ label: t("contextMenu.copyName"), action: copyName, icon: Copy, shortcut: shortcutCopyName.value });
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user