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