portal view

This commit is contained in:
Brandon Fergerson 2022-04-30 11:52:56 +02:00
parent 6b0c20e2f5
commit 2a0a97e7d9
2 changed files with 7 additions and 18 deletions

View File

@ -33,6 +33,7 @@ let portalStyle = reactive({});
if (query["portal"] === "true") { if (query["portal"] === "true") {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
portalStyle = reactive({ portalStyle = reactive({
"height": "100%",
"max-height": "375px", "max-height": "375px",
"max-width": "800px", "max-width": "800px",
}); });
@ -49,7 +50,7 @@ if (!appStore.utc) {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.app-main { .app-main {
height: 100%; height: calc(100% - 40px);
background: #f7f9fa; background: #f7f9fa;
} }
</style> </style>

View File

@ -144,13 +144,10 @@ const dashboardStore = useDashboardStore();
const selectorStore = useSelectorStore(); const selectorStore = useSelectorStore();
const appStore = useAppStoreWithOut(); const appStore = useAppStoreWithOut();
const params = useRoute().params; const params = useRoute().params;
const path = useRoute();
const router = useRouter(); const { query } = useRoute();
if (!path.path.includes("fullview")) { dashboardStore.setViewMode(query["fullview"] === "true");
dashboardStore.setViewMode(false);
} else {
dashboardStore.setViewMode(true);
}
const toolIcons = ref<{ name: string; content: string; id: string }[]>( const toolIcons = ref<{ name: string; content: string; id: string }[]>(
EndpointRelationTools EndpointRelationTools
); );
@ -398,16 +395,7 @@ function changeDestPods(pod: any) {
selectorStore.setCurrentDestPod(null); 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() { function changeMode() {
if (dashboardStore.editMode) { if (dashboardStore.editMode) {
ElMessage.warning(t("editWarning")); ElMessage.warning(t("editWarning"));