fix: Dialog scheme not found when it is defined outside of the dialogs namespace

This commit is contained in:
DanyLE 2023-02-01 09:58:34 +01:00 committed by Dany LE
parent ae91401965
commit b490ae9d42
2 changed files with 4 additions and 3 deletions

1
d.ts/antos.d.ts vendored
View File

@ -475,6 +475,7 @@ declare namespace OS {
* @extends {BaseDialog}
*/
class BasicDialog extends BaseDialog {
['constructor']: typeof BasicDialog;
/**
* Placeholder for the UI scheme to be rendered. This can
* be either the string definition of the scheme or

View File

@ -236,6 +236,7 @@ namespace OS {
* @extends {BaseDialog}
*/
export class BasicDialog extends BaseDialog {
['constructor']: typeof BasicDialog
/**
* Placeholder for the UI scheme to be rendered. This can
* be either the string definition of the scheme or
@ -290,10 +291,9 @@ namespace OS {
return this.render(this.markup.path);
}
} else if (
GUI.dialogs[this.name] &&
GUI.dialogs[this.name].scheme
this.constructor.scheme
) {
const html: string = GUI.dialogs[this.name].scheme;
const html: string = this.constructor.scheme;
return GUI.htmlToScheme(html.trim(), this, this.host);
} else {
this.error(__("Unable to find dialog scheme"));