enhance(dialog): use MaterialAlertDialogBuilder (#3491)

* Fix example insets

* Add app-region: drag

* Use `Theme.Material3.DayNight.NoActionBar`

* Re-generate some kotlin files

* Use MaterialAlertDialogBuilder

* Add change file

* Revert back to margin-top: 0.5rem

* Re-generate outdated gradle wrapper from #3039

* Move title bar to its own file

* Fix cancel message
This commit is contained in:
Tony
2026-07-16 17:27:19 +08:00
committed by GitHub
parent edc52ea056
commit 40ae0a7fa0
15 changed files with 185 additions and 133 deletions
+6 -4
View File
@@ -55,7 +55,7 @@
async function openDialog() {
try {
var result = await open({
const result = await open({
title: "My wonderful open dialog",
defaultPath,
filters: filter
@@ -74,9 +74,11 @@
if (Array.isArray(result)) {
onMessage(result);
} else if (result === null) {
onMessage('user cancelled the selection')
} else {
var pathToRead = result;
var isFile = pathToRead.match(/\S+\.\S+$/g);
const pathToRead = result;
const isFile = pathToRead.match(/\S+\.\S+$/g);
await readFile(pathToRead)
.then(function (res) {
@@ -89,7 +91,7 @@
arrayBufferToBase64(
new Uint8Array(res),
function (base64) {
var src = "data:image/png;base64," + base64;
const src = "data:image/png;base64," + base64;
insecureRenderHtml('<img src="' + src + '"></img>');
}
);