luci: tools: Fix show and close modal dialog for NFQWS_OPT

This commit is contained in:
remittor
2025-12-25 18:01:29 +03:00
parent d14f26a8cb
commit c9823adaae

View File

@@ -575,13 +575,17 @@ return baseclass.extend({
},
show: function() {
//ui.showModal(null, E('p', { 'class': 'spinning' }, _('Loading')) );
let content = this.load();
//ui.hideModal();
if (content === null) {
return this.error('Cannot load parameter');
}
return this.render(content);
ui.showModal(null,
E('p', { 'class': 'spinning' }, _('Loading'))
);
L.resolveDefault(this.load(), null)
.then(content => {
ui.hideModal();
return this.render(content);
}).catch(e => {
ui.hideModal();
return this.error(e);
})
},
}),