Skip to content

Commit 3668355

Browse files
committed
fix: problem with minimal / play mode
1 parent a95b5ba commit 3668355

File tree

1 file changed

+23
-20
lines changed

1 file changed

+23
-20
lines changed

frontend/src/js/ui/views/session-grid.ts

+23-20
Original file line numberDiff line numberDiff line change
@@ -318,27 +318,29 @@ export default (): m.Component<SessionGridProps> => {
318318
});
319319
}),
320320

321-
m(
322-
'div.flex.items-center.justify-center.o-50',
323-
{
324-
onclick: () => {
325-
createEditGridButtonModal({
326-
onSuccess: (element) => {
327-
section.elements.push(element);
328-
saveGrids();
321+
state.playMode || state.minimalMode
322+
? null
323+
: m(
324+
'div.flex.items-center.justify-center.o-50',
325+
{
326+
onclick: () => {
327+
createEditGridButtonModal({
328+
onSuccess: (element) => {
329+
section.elements.push(element);
330+
saveGrids();
331+
},
332+
});
329333
},
330-
});
331-
},
332-
style: { aspectRatio: '1 / 1', padding: 0 },
333-
},
334-
[
335-
m(
336-
'div.bg-black-05.br3.flex.items-center.justify-center.pointer.grow',
337-
{ style: { height: '90%', width: '90%' } },
338-
m(Icon, { icon: 'add-circle-outline', size: 3, className: '.o-30' }),
339-
), //
340-
],
341-
), //
334+
style: { aspectRatio: '1 / 1', padding: 0 },
335+
},
336+
[
337+
m(
338+
'div.bg-black-05.br3.flex.items-center.justify-center.pointer.grow',
339+
{ style: { height: '90%', width: '90%' } },
340+
m(Icon, { icon: 'add-circle-outline', size: 3, className: '.o-30' }),
341+
), //
342+
],
343+
), //
342344
],
343345
),
344346
]),
@@ -371,6 +373,7 @@ export default (): m.Component<SessionGridProps> => {
371373
if (attrs.gridName) {
372374
state.selectedGrid = decodeURIComponent(attrs.gridName);
373375
state.minimalMode = true;
376+
state.playMode = true;
374377

375378
console.log(attrs.gridName);
376379

0 commit comments

Comments
 (0)