You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
67 lines
2.0 KiB
HTML
67 lines
2.0 KiB
HTML
<html window-icon="themepicsingle:download">
|
|
<head>
|
|
<include src="common.htm" />
|
|
<style src="updater.css" />
|
|
<script>
|
|
var text = $("#text"),
|
|
changelog = $("#changelog"),
|
|
info;
|
|
|
|
setupWindow(false, false, false);
|
|
translateWindow("button");
|
|
|
|
text.text = _("Retrieving information...");
|
|
changelog.setVisible(false);
|
|
document.timer(100ms, () => {
|
|
info = CommonNative.GetUpdateInfo();
|
|
if (info.error != "") {
|
|
text.text = info.error;
|
|
} else {
|
|
text.text = info.text;
|
|
$("#distrib").state.disabled = false;
|
|
if (info.hasNew && info.beta) text.append(<span><br/><br/><img src="resource:warn" />{_("This version is marked as beta!")}</span>);
|
|
changelog.append(<a>{_("Changelog")}</a>);
|
|
changelog.setVisible(true);
|
|
}
|
|
document.flushPaint();
|
|
var [x, y] = view.box("position", "client", "desktop");
|
|
var [w, h] = document.body.state.box("dimension", "border");
|
|
view.move(x, y, w, h, "client");
|
|
});
|
|
|
|
$("#release").on("click", () => {
|
|
CommonNative.OpenLink("https://code.highspec.ru/Mikanoshi/RnQ/releases");
|
|
});
|
|
|
|
$("#distrib").on("click", () => {
|
|
if (info.distrib) CommonNative.OpenLink(info.distrib);
|
|
});
|
|
|
|
$("#close").on("click", () => view.close());
|
|
|
|
document.on("click", "a", (e) => {
|
|
var [w0, h0] = document.body.state.box("dimension", "border");
|
|
changelog.text = info.changelog;
|
|
changelog.classList.add("loaded");
|
|
document.flushPaint();
|
|
var [x, y] = view.box("position", "client", "desktop");
|
|
var [w, h] = document.body.state.box("dimension", "border");
|
|
view.move(x, y + h0 / 2 - h / 2, w, h, "client");
|
|
return true;
|
|
}).on("keydown", (e) => {
|
|
if (e.keyCode == Event.VK_ESCAPE || (e.ctrlKey && e.keyCode == Event.VK_W)) view.close();
|
|
});
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div class="main">
|
|
<div id="text"></div>
|
|
<div id="changelog"></div>
|
|
</div>
|
|
<div class="buttonPanel">
|
|
<button uwp id="release">Releases page</button>
|
|
<button uwp id="distrib" disabled>Distribution</button>
|
|
<button uwp right id="close">Close</button>
|
|
</div>
|
|
</body>
|
|
</html> |