aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app/js/launcher.js27
-rw-r--r--src/lang/de.json4
-rw-r--r--src/lang/en.json4
-rw-r--r--src/lang/es.json4
-rw-r--r--src/lang/fr.json4
-rw-r--r--src/lang/zh.json4
6 files changed, 37 insertions, 10 deletions
diff --git a/src/app/js/launcher.js b/src/app/js/launcher.js
index 3130253..1c383b4 100644
--- a/src/app/js/launcher.js
+++ b/src/app/js/launcher.js
@@ -24,6 +24,8 @@ function page(page) {
}; page(1)
function formatRelease(notes) {
+ if (! notes) {return ""}
+
let content = "";
if (notes.length === 1) {
@@ -58,13 +60,38 @@ function formatRelease(notes) {
});
}
+// sets content of `div` to a single release block with centered text
+// inside it, the text being `lang(lang_key)`
+let set_error_content = (div, lang_key) => {
+ div.innerHTML =
+ "<div class='release-block'>" +
+ "<p><center>" +
+ lang(lang_key) +
+ "</center></p>" +
+ "</div>";
+}
+
// Updates the Viper release notes
ipcRenderer.on("vp-notes", (event, response) => {
+ if (! response) {
+ return set_error_content(
+ vpReleaseNotes,
+ "request.no_vp_release_notes"
+ )
+ }
+
vpReleaseNotes.innerHTML = formatRelease(response);
});
// Updates the Northstar release notes
ipcRenderer.on("ns-notes", (event, response) => {
+ if (! response) {
+ return set_error_content(
+ nsRelease,
+ "request.no_ns_release_notes"
+ )
+ }
+
nsRelease.innerHTML = formatRelease(response);
});
diff --git a/src/lang/de.json b/src/lang/de.json
index 21292dd..ee797a1 100644
--- a/src/lang/de.json
+++ b/src/lang/de.json
@@ -290,8 +290,8 @@
},
"request": {
- "no_vp_release_notes": "Viper Release Notes konnten nicht geladen werden.\nVersuche es erneut später!",
- "no_ns_release_notes": "Northstar Release Notes konnten nicht geladen werden.\nVersuche es erneut später!"
+ "no_vp_release_notes": "<h3>Viper Release Notes konnten nicht geladen werden.</h3>Versuche es erneut später!",
+ "no_ns_release_notes": "<h3>Northstar Release Notes konnten nicht geladen werden.</h3>Versuche es erneut später!"
},
"tooltip": {
diff --git a/src/lang/en.json b/src/lang/en.json
index 2bf2b0e..eca640d 100644
--- a/src/lang/en.json
+++ b/src/lang/en.json
@@ -290,8 +290,8 @@
},
"request": {
- "no_vp_release_notes": "Couldn't fetch Viper release notes.\nTry again later!",
- "no_ns_release_notes": "Couldn't fetch Northstar release notes.\nTry again later!"
+ "no_vp_release_notes": "<h3>Couldn't fetch Viper release notes.</h3>Try again later!",
+ "no_ns_release_notes": "<h3>Couldn't fetch Northstar release notes.</h3>Try again later!"
},
"tooltip": {
diff --git a/src/lang/es.json b/src/lang/es.json
index c453926..5d3bb27 100644
--- a/src/lang/es.json
+++ b/src/lang/es.json
@@ -290,8 +290,8 @@
},
"request": {
- "no_vp_release_notes": "No se pudo encontrar las notas de lanzamiento de Viper.\n¡Intenta mas tarde!",
- "no_ns_release_notes": "No se pudo encontrar las notas de lanzamiento de Northstar.\n¡Intenta mas tarde!"
+ "no_vp_release_notes": "<h3>No se pudo encontrar las notas de lanzamiento de Viper.</h3>¡Intenta mas tarde!",
+ "no_ns_release_notes": "<h3>No se pudo encontrar las notas de lanzamiento de Northstar.</h3>¡Intenta mas tarde!"
},
"tooltip": {
diff --git a/src/lang/fr.json b/src/lang/fr.json
index caa785f..b527147 100644
--- a/src/lang/fr.json
+++ b/src/lang/fr.json
@@ -290,8 +290,8 @@
},
"request": {
- "no_vp_release_notes": "Impossible de récupérer les notes de mises à jour de Viper.\nVeuillez réessayer plus tard.",
- "no_ns_release_notes": "Impossible de récupérer les notes de mises à jour de Northstar.\nVeuillez réessayer plus tard."
+ "no_vp_release_notes": "<h3>Impossible de récupérer les notes de mises à jour de Viper.</h3>Veuillez réessayer plus tard.",
+ "no_ns_release_notes": "<h3>Impossible de récupérer les notes de mises à jour de Northstar.</h3>Veuillez réessayer plus tard."
},
"tooltip": {
diff --git a/src/lang/zh.json b/src/lang/zh.json
index 7d53b44..a1ccd71 100644
--- a/src/lang/zh.json
+++ b/src/lang/zh.json
@@ -289,8 +289,8 @@
},
"request": {
- "no_vp_release_notes": "无法获取Viper的更新日志.\n请稍后再试!",
- "no_ns_release_notes": "无法获取Northstar的更新日志.\n请稍后再试!"
+ "no_vp_release_notes": "<h3>无法获取Viper的更新日志.</h3>请稍后再试!",
+ "no_ns_release_notes": "<h3>无法获取Northstar的更新日志.</h3>请稍后再试!"
},
"tooltip": {