[🐛] Fixed fullscreen button not appearing

This commit is contained in:
ThinLiquid 2023-10-21 03:36:55 +01:00
parent 8814ae3b29
commit edb5ef2217
No known key found for this signature in database
GPG key ID: D5085759953E6CAA

View file

@ -88,14 +88,14 @@ export class FlowWindow {
this.focus()
}
if (config.canResize === undefined) config.canResize = true
if (config.canResize === undefined || config.canResize === null) config.canResize = true
this.element.style.width = `${config.width ?? 300}px`
this.element.style.height = `${config.height ?? 200}px`
this.header = document.createElement('window-header')
this.header.innerHTML = `<img src="${config.icon}"></img> <div class="title">${config.title}</div><div style="flex:1;"></div><i id="min" class='bx bx-minus'></i><i id="close" class='bx bx-x'></i>`
if (!config.canResize) {
if (config.canResize) {
this.header.innerHTML = `<img src="${config.icon}"></img> <div class="title">${config.title}</div><div style="flex:1;"></div><i id="min" class='bx bx-minus'></i><i id="max" class='bx bx-checkbox'></i><i id="close" class='bx bx-x'></i>`
}
@ -105,7 +105,7 @@ export class FlowWindow {
(this.header.querySelector('#min') as HTMLElement).onclick = () => this.toggleMin()
if (!config.canResize) {
if (config.canResize) {
(this.header.querySelector('#max') as HTMLElement).onclick = () => this.toggleMax()
}