Published source
Download source ZIP
CH-J Server Manager
Browse directories and files for a specific application release.
Source is provided under the CH-J Proprietary Software License 1.14. Its availability does not change the license terms or grant additional rights.
1
"use strict";2
const copy = {3
cs: { guidanceHeading: "Provozní bezpečnost a zálohování", guidanceIntro: "Nejprve se zobrazují pokyny k bezpečnému používání. Jsou informativní a nezávazné; nejsou součástí licence a nevyžadují souhlas. Dalším krokem je licence aplikace.", next: "Pokračovat k licenci", back: "Zpět k pokynům", heading: "Licence aplikace", intro: "Před použitím tohoto vydání si přečtěte úplné znění licence. Souhlas je nutný při prvním spuštění a po každé aktualizaci.", consent: "Souhlasím s licenčními podmínkami CH-J Proprietary Software License 1.14.", risk: "Beru na vědomí riziko ztráty nebo poškození dat a nutnost přiměřeného zálohování před rizikovými operacemi. Rozumím, že aplikace sama nezaručuje existenci ani obnovitelnost záloh.", accept: "Přijmout a pokračovat", decline: "Ukončit", error: "Operaci se nepodařilo dokončit. Aplikace zůstává uzamčená." },4
de: { guidanceHeading: "Betriebssicherheit und Datensicherung", guidanceIntro: "Zuerst werden die Hinweise zur sicheren Nutzung angezeigt. Sie sind informativ und unverbindlich, kein Bestandteil der Lizenz und erfordern keine Zustimmung. Danach folgt die Anwendungslizenz.", next: "Weiter zur Lizenz", back: "Zurück zu den Hinweisen", heading: "Anwendungslizenz", intro: "Lesen Sie vor der Nutzung dieser Ausgabe den vollständigen Lizenztext. Die Zustimmung ist beim ersten Start und nach jeder Aktualisierung erforderlich.", consent: "Ich stimme den Lizenzbedingungen der CH-J Proprietary Software License 1.14 zu.", risk: "Ich nehme das Risiko eines Datenverlusts oder einer Datenbeschädigung sowie die Notwendigkeit angemessener Datensicherungen vor risikobehafteten Vorgängen zur Kenntnis. Ich verstehe, dass die Anwendung selbst weder das Vorhandensein noch die Wiederherstellbarkeit von Datensicherungen garantiert.", accept: "Akzeptieren und fortfahren", decline: "Beenden", error: "Der Vorgang konnte nicht abgeschlossen werden. Die Anwendung bleibt gesperrt." },5
en: { guidanceHeading: "Operational safety and backups", guidanceIntro: "The safe-use guidance is displayed first. It is informational and non-binding, is not part of the license and does not require agreement. The application license follows.", next: "Continue to license", back: "Back to guidance", heading: "Application license", intro: "Read the complete license before using this release. Acceptance is required on first launch and after every update.", consent: "I agree to the terms of the CH-J Proprietary Software License 1.14.", risk: "I acknowledge the risk of data loss or corruption and the need for appropriate backups before risky operations. I understand that the application itself does not guarantee the existence or recoverability of backups.", accept: "Accept and continue", decline: "Quit", error: "The operation could not be completed. The application remains locked." }6
};7
const el = id => document.getElementById(id);8
let license;9
let showingLicense = false;10
function translate() {11
const language = el("language").value;12
const text = copy[language];13
document.documentElement.lang = language;14
for (const [id, key] of [["consentLicense", "consent"], ["consentRisk", "risk"], ["accept", "accept"], ["decline", "decline"], ["continue", "next"], ["back", "back"]]) el(id).textContent = text[key];15
el("heading").textContent = text[showingLicense ? "heading" : "guidanceHeading"];16
el("intro").textContent = text[showingLicense ? "intro" : "guidanceIntro"];17
el("guidanceText").textContent = license?.guidance[language] || "";18
el("guidanceText").setAttribute("aria-label", text.guidanceHeading);19
el("guidanceText").hidden = showingLicense;20
for (const id of ["licenseText", "consentRow", "accept", "back"]) el(id).hidden = !showingLicense;21
el("continue").hidden = showingLicense;22
el("continue").disabled = !license;23
}24
el("language").addEventListener("change", translate);25
el("consent").addEventListener("change", () => { el("accept").disabled = !license || !showingLicense || !el("consent").checked; });26
el("decline").addEventListener("click", () => window.licenseApi.decline());27
el("continue").addEventListener("click", async () => {28
if (!license) return;29
el("continue").disabled = true;30
try {31
await window.licenseApi.showLicense({ guidanceSha256: license.guidanceSha256 });32
showingLicense = true;33
el("error").textContent = "";34
translate();35
el("licenseText").focus();36
} catch { el("error").textContent = copy[el("language").value].error; el("continue").disabled = false; }37
});38
el("back").addEventListener("click", () => {39
showingLicense = false;40
el("consent").checked = false;41
el("accept").disabled = true;42
translate();43
});44
el("accept").addEventListener("click", async () => {45
if (!license || !showingLicense || !el("consent").checked) return;46
el("accept").disabled = true;47
try { await window.licenseApi.accept({ accepted: true, sha256: license.sha256, guidanceSha256: license.guidanceSha256 }); }48
catch { el("error").textContent = copy[el("language").value].error; el("accept").disabled = !el("consent").checked; }49
});50
translate();51
window.licenseApi.read().then(value => {52
license = value;53
el("language").value = copy[value.language] ? value.language : "cs";54
el("licenseText").textContent = value.text;55
el("release").textContent = `CH-J Proprietary Software License ${value.licenseVersion} · v${value.appVersion} · ${value.buildId}`;56
translate();57
}).catch(() => { el("error").textContent = copy[el("language").value].error; });SHA-256: 0fb181820084322cb63d2b57e06181bd0ecbb46adfeba3d9b56da915a7a847a0
Archive SHA-256: 5ac91caf4fa32a6fdb114f2430deed486fbe7489d5eea343d1f034169fafb5e0