From 2a0a97e7d995b3725a2ed1322da0d3f3d63506ab Mon Sep 17 00:00:00 2001 From: Brandon Fergerson Date: Sat, 30 Apr 2022 11:52:56 +0200 Subject: [PATCH] portal view --- src/layout/components/AppMain.vue | 3 ++- src/views/dashboard/panel/Tool.vue | 22 +++++----------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue index 4cd1f243..98aab484 100644 --- a/src/layout/components/AppMain.vue +++ b/src/layout/components/AppMain.vue @@ -33,6 +33,7 @@ let portalStyle = reactive({}); if (query["portal"] === "true") { // eslint-disable-next-line no-undef portalStyle = reactive({ + "height": "100%", "max-height": "375px", "max-width": "800px", }); @@ -49,7 +50,7 @@ if (!appStore.utc) { diff --git a/src/views/dashboard/panel/Tool.vue b/src/views/dashboard/panel/Tool.vue index e80f034d..f0fbecad 100644 --- a/src/views/dashboard/panel/Tool.vue +++ b/src/views/dashboard/panel/Tool.vue @@ -144,13 +144,10 @@ const dashboardStore = useDashboardStore(); const selectorStore = useSelectorStore(); const appStore = useAppStoreWithOut(); const params = useRoute().params; -const path = useRoute(); -const router = useRouter(); -if (!path.path.includes("fullview")) { - dashboardStore.setViewMode(false); -} else { - dashboardStore.setViewMode(true); -} + +const { query } = useRoute(); +dashboardStore.setViewMode(query["fullview"] === "true"); + const toolIcons = ref<{ name: string; content: string; id: string }[]>( EndpointRelationTools ); @@ -398,16 +395,7 @@ function changeDestPods(pod: any) { selectorStore.setCurrentDestPod(null); } } -function toggleFullView(e) { - dashboardStore.setViewMode(e); - if (dashboardStore.fullView) { - const newPath = path.path.replace("dashboard", "fullview"); - router.push(newPath); - } else { - const newPath = path.path.replace("fullview", "dashboard"); - router.push(newPath); - } -} + function changeMode() { if (dashboardStore.editMode) { ElMessage.warning(t("editWarning"));