|
|
@ -3,15 +3,22 @@ import Dialog, { DialogResponse } from "./dialog";
|
|
|
|
export default class Info {
|
|
|
|
export default class Info {
|
|
|
|
static async show(
|
|
|
|
static async show(
|
|
|
|
text: string,
|
|
|
|
text: string,
|
|
|
|
options?: Partial<{
|
|
|
|
options: Partial<{
|
|
|
|
"icon-name": string;
|
|
|
|
"icon-name": string;
|
|
|
|
"no-wrap": true;
|
|
|
|
"no-wrap": true;
|
|
|
|
"no-markup": true;
|
|
|
|
"no-markup": true;
|
|
|
|
ellipsize: true;
|
|
|
|
ellipsize: true;
|
|
|
|
title: string;
|
|
|
|
title: string;
|
|
|
|
}>
|
|
|
|
width: number;
|
|
|
|
|
|
|
|
height: number;
|
|
|
|
|
|
|
|
}> = {}
|
|
|
|
): Promise<DialogResponse> {
|
|
|
|
): Promise<DialogResponse> {
|
|
|
|
const dialog = new Dialog("info", { ...options, text });
|
|
|
|
const dialog = new Dialog("info", {
|
|
|
|
|
|
|
|
...options,
|
|
|
|
|
|
|
|
width: options.width?.toString(),
|
|
|
|
|
|
|
|
height: options.height?.toString(),
|
|
|
|
|
|
|
|
text,
|
|
|
|
|
|
|
|
});
|
|
|
|
await dialog.show();
|
|
|
|
await dialog.show();
|
|
|
|
return dialog.getAnswer();
|
|
|
|
return dialog.getAnswer();
|
|
|
|
}
|
|
|
|
}
|
|
|
|