feat(common): change modal open signature and allow to hide buttons
This commit is contained in:
@@ -59,14 +59,19 @@ const actionateButton = async (button: (typeof selectedButton)["value"]) => {
|
||||
}
|
||||
} else {
|
||||
const url = content.replace(/^https?:\/\//, "");
|
||||
openModal(`Open ${url}?`, async () => {
|
||||
store.pushNotification(`${verb} opened`);
|
||||
await sleep(100);
|
||||
await navigateTo(content, { open: { target: "_blank " } });
|
||||
openModal({
|
||||
text: `Open ${url}?`,
|
||||
onConfirm: async () => {
|
||||
store.pushNotification(`${verb} opened`);
|
||||
await sleep(100);
|
||||
await navigateTo(content, { open: { target: "_blank " } });
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// TODO: use @activate events from common buttons
|
||||
|
||||
const QUIT_BUTTON: Rect = [31, 172, 80, 18];
|
||||
const OK_BUTTON: Rect = [144, 172, 80, 18];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user