From 47f9af5f6c6f5f612cde24a0becdc958696c5d1a Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Sat, 24 Feb 2024 08:35:22 +0100 Subject: [PATCH] fix: generator hide --- .../src/js/ui/components/view-layout/sidebar-print-page.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/js/ui/components/view-layout/sidebar-print-page.ts b/frontend/src/js/ui/components/view-layout/sidebar-print-page.ts index ea53c9e..4872aa2 100644 --- a/frontend/src/js/ui/components/view-layout/sidebar-print-page.ts +++ b/frontend/src/js/ui/components/view-layout/sidebar-print-page.ts @@ -53,7 +53,7 @@ export default (): m.Component => { : null, // // @ts-ignore m(Flex, { className: '.bg-white.ba.b--black-10.br2.flex-grow-1.overflow-auto', direction: 'column' }, vnode.attrs.content[selectedTab]()), - (vnode.attrs.template || vnode.attrs.generator) && !vnode.attrs.hidePreview + vnode.attrs.template || vnode.attrs.generator ? m(PrintPreviewTemplate, { template: vnode.attrs.template, generator: vnode.attrs.generator, @@ -61,7 +61,8 @@ export default (): m.Component => { entry: vnode.attrs.entry, config: vnode.attrs.config, width: 380, - className: '.bg-black-05.ph1.ba.b--black-10', + className: `.bg-black-05.ph1.ba.b--black-10${!vnode.attrs.hidePreview ? '' : '.o-0'}`, + onRendered: vnode.attrs.onRendered, }) : m('div'),