From 36683555f558fb141403b1937537203a6e20d8bd Mon Sep 17 00:00:00 2001 From: Daniel Schmidt Date: Tue, 24 Sep 2024 20:52:11 +0200 Subject: [PATCH] fix: problem with minimal / play mode --- frontend/src/js/ui/views/session-grid.ts | 43 +++++++++++++----------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/frontend/src/js/ui/views/session-grid.ts b/frontend/src/js/ui/views/session-grid.ts index 5fe8a76..95bd237 100644 --- a/frontend/src/js/ui/views/session-grid.ts +++ b/frontend/src/js/ui/views/session-grid.ts @@ -318,27 +318,29 @@ export default (): m.Component => { }); }), - m( - 'div.flex.items-center.justify-center.o-50', - { - onclick: () => { - createEditGridButtonModal({ - onSuccess: (element) => { - section.elements.push(element); - saveGrids(); + state.playMode || state.minimalMode + ? null + : m( + 'div.flex.items-center.justify-center.o-50', + { + onclick: () => { + createEditGridButtonModal({ + onSuccess: (element) => { + section.elements.push(element); + saveGrids(); + }, + }); }, - }); - }, - style: { aspectRatio: '1 / 1', padding: 0 }, - }, - [ - m( - 'div.bg-black-05.br3.flex.items-center.justify-center.pointer.grow', - { style: { height: '90%', width: '90%' } }, - m(Icon, { icon: 'add-circle-outline', size: 3, className: '.o-30' }), - ), // - ], - ), // + style: { aspectRatio: '1 / 1', padding: 0 }, + }, + [ + m( + 'div.bg-black-05.br3.flex.items-center.justify-center.pointer.grow', + { style: { height: '90%', width: '90%' } }, + m(Icon, { icon: 'add-circle-outline', size: 3, className: '.o-30' }), + ), // + ], + ), // ], ), ]), @@ -371,6 +373,7 @@ export default (): m.Component => { if (attrs.gridName) { state.selectedGrid = decodeURIComponent(attrs.gridName); state.minimalMode = true; + state.playMode = true; console.log(attrs.gridName);