@@ -24,7 +24,7 @@ const loaded = ref(false);
2424const loading = ref (false );
2525const killIframe = ref (false );
2626const siteNotCompatibleSnack = ref (false );
27- const hoveringEditor = ref (false );
27+ const expanded = ref (false );
2828const { layoutSize, windowHeight, layoutPx } = useLayout ();
2929const { reloading, siteCompatible, sendMessageToIframe, getPathsFromSectionKey, listenIframeMessage, sendUserDataToIframe } = useIframe ();
3030const { userDataLoading } = useUserData ();
@@ -33,7 +33,7 @@ const iframeErrorMsg = ref('This site is not JSONms compatible');
3333const editorHeight = computed ((): number => {
3434 const padding = (globalStore .userSettings .data .layoutSitePreviewPadding ? 96 : 63 );
3535 const result = windowHeight .value - padding ;
36- if (hoveringEditor .value ) {
36+ if (expanded .value ) {
3737 return result + 32 ;
3838 }
3939 return result - layoutSize .value .preview .height ;
@@ -153,6 +153,7 @@ defineExpose({
153153 :width =" layoutSize.preview.width"
154154 :location =" globalStore.userSettings.data.layoutSitePreviewLocation"
155155 scrim
156+ class =" site-preview-drawer"
156157 color =" transparent"
157158 border =" 0"
158159 permanent
@@ -228,8 +229,6 @@ defineExpose({
228229 flat
229230 class =" editor-card"
230231 theme =" dark"
231- @mouseover =" hoveringEditor = true"
232- @mouseleave =" hoveringEditor = false"
233232 >
234233 <StructureEditor
235234 ref =" structureEditor"
@@ -241,7 +240,19 @@ defineExpose({
241240 @save =" onSaveStructureContent"
242241 @create =" onCreateStructure"
243242 @change =" onStructureContentChange"
244- />
243+ >
244+ <template #header .end >
245+ <v-btn
246+ size =" small"
247+ @click =" expanded = !expanded"
248+ >
249+ <span v-if =" expanded" >Collapse</span >
250+ <span v-else >Expand</span >
251+ <v-icon v-if =" expanded" icon =" mdi-unfold-less-horizontal" end />
252+ <v-icon v-else icon =" mdi-unfold-more-horizontal" end />
253+ </v-btn >
254+ </template >
255+ </StructureEditor >
245256 </v-card >
246257 </div >
247258 </v-expand-transition >
@@ -259,4 +270,7 @@ defineExpose({
259270.editor-card {
260271 transition : height 300ms ease ;
261272}
273+ .site-preview-drawer ::v-deep .v-navigation-drawer__content {
274+ overflow : hidden !important ;
275+ }
262276 </style >
0 commit comments