This project implements modal dialogs for sciter.js.
- works on Windows, Mac and Linux
- modal dialog with icon
- fully skinnable
- translatable using callback
- any button can open a link in the browser
- git clone the repository
- install packages
npm install
- install latest sciter sdk
npm run install-sdk
- start the demo
npm run scapp
- A recent version of Node.js
node
(tested with 16 LTS) and its package managernpm
.- On Windows download and run the installer
- On Linux check the installation guide
- install package
npm install sciter-dialogs
- add the
src
dir to your project
Add to <script type="module">
// npm import
import Dialogs from "node_modules/sciter-dialogs/src/dialogs.js";
// src import
import Dialogs from "src/dialogs.js";
const value = Dialogs.show("question", "Do you want to update widget?", "yes no cancel");
Dialogs.setOptions({
css: [
__DIR__ + "src/dialog-win.css",
__DIR__ + "css/test.css",
]
});
Dialogs.setOptions({
callback: dialogCallback,
});
/**
* Dialog callback
* @param DOMElement root
* @return void
*/
function dialogCallback(root)
{
// get all dialog elements to translate
root.$$("[data-i18n]").map(function(element) {
element.textContent += " (i18n)";
});
}
- add "don't show again" checkbox
- add keyboard shortcuts to buttons ̲
- in some cases dialog is not modal