Skip to content

Commit a4ccc75

Browse files
committed
Fix resizing issue on query page when sidepanel is hidden
1 parent 460c1f7 commit a4ccc75

File tree

1 file changed

+18
-17
lines changed

1 file changed

+18
-17
lines changed

etc/js/components/pages/queries/page.vue

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div id="page-queries" class="page-content">
2+
<div id="page-queries" :class="page_class()">
33
<pane-query
44
v-model:app_params="app_params"
55
:conn="conn"
@@ -26,6 +26,16 @@ const props = defineProps({
2626
});
2727
2828
const app_params = defineModel("app_params");
29+
30+
function page_class() {
31+
let result = ["page-content"];
32+
if (!this.app_params.sidebar) {
33+
result.push("page-queries-no-sidebar");
34+
}
35+
36+
return result;
37+
}
38+
2939
</script>
3040

3141
<style scoped>
@@ -44,34 +54,25 @@ const app_params = defineModel("app_params");
4454
@media screen and (max-width: 800px) {
4555
#page-queries {
4656
grid-template-columns: calc(100%);
47-
grid-template-rows: calc(40vh - var(--header-height) - var(--gap)) calc(60vh - var(--footer-height) - var(--gap));
57+
grid-template-rows: calc(40vh - var(--header-height) - var(--gap)) calc(60vh - var(--footer-height) - 3 * var(--gap));
58+
}
59+
60+
div.page-queries-no-sidebar {
61+
grid-template-columns: calc(100%);
62+
grid-template-rows: calc(100vh - var(--header-height) - var(--footer-height) - 3 * var(--gap)) !important;
4863
}
4964
}
5065
</style>
5166

5267
<style>
5368
div.queries-left-pane {
5469
grid-column: 1;
55-
grid-row: 1;
56-
height: calc(100vh - var(--header-height) - var(--footer-height) - 3 * var(--gap));
57-
}
58-
59-
div.queries-right-pane {
60-
grid-row: 1;
61-
height: calc(100vh - var(--header-height) - var(--footer-height) - 3 * var(--gap));
6270
}
6371
6472
@media screen and (max-width: 800px) {
65-
div.queries-left-pane {
66-
grid-column: 1;
67-
grid-row: 1;
68-
height: calc(40vh - - var(--header-height) - var(--gap));
69-
}
70-
7173
div.queries-right-pane {
7274
grid-column: 1;
73-
grid-row: 2;
74-
height: calc(60vh - var(--footer-height) - 3 * var(--gap));
7575
}
7676
}
77+
7778
</style>

0 commit comments

Comments
 (0)