Add “Troubleshooting” section & CSS to error-page
Now the lovely SPCSS theme by Susam Pal (MIT license) is used. https://github.com/susam/spcss
This commit is contained in:
parent
7f07d30f56
commit
960c8899dc
|
@ -209,5 +209,26 @@
|
||||||
"repairInstallTerminalIntro": {
|
"repairInstallTerminalIntro": {
|
||||||
"message": "From a terminal, that would look something like:",
|
"message": "From a terminal, that would look something like:",
|
||||||
"description": "Intro to a terminal-based installation description."
|
"description": "Intro to a terminal-based installation description."
|
||||||
|
},
|
||||||
|
|
||||||
|
"troubleshootTitle": {
|
||||||
|
"message": "Troubleshooting",
|
||||||
|
"description": "Title of the Troubleshooting-paragraph of the error page."
|
||||||
|
},
|
||||||
|
|
||||||
|
"troubleshootDesc": {
|
||||||
|
"message": "If Shellfox’s script is installed but you still see this page — that is, the <a href='#error'>above error</a> isn’t “Error: No such native application shellfox” — please report the issue! You can report it on the <a id='tracker_link'>Shellfox bug-tracker</a>, or by sending an email to xwx@posteo.org. Let’s get that fixed! Please make sure to include your operating system and Firefox version in the report.",
|
||||||
|
"description": "Contents of the Troubleshooting-paragraph of the error page."
|
||||||
|
},
|
||||||
|
|
||||||
|
"errorMessage": {
|
||||||
|
"message": "Error: “$ERROR$”",
|
||||||
|
"description": "The text of the header of the error page that displays the error message.",
|
||||||
|
"placeholders": {
|
||||||
|
"error": {
|
||||||
|
"content": "$1",
|
||||||
|
"example": "No such program."
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,5 +198,24 @@
|
||||||
|
|
||||||
"repairInstallTerminalIntro": {
|
"repairInstallTerminalIntro": {
|
||||||
"message": "Farita sole en terminalo, aspektus jene:"
|
"message": "Farita sole en terminalo, aspektus jene:"
|
||||||
|
},
|
||||||
|
|
||||||
|
"troubleshootTitle": {
|
||||||
|
"message": "Pluaj eraroj"
|
||||||
|
},
|
||||||
|
|
||||||
|
"troubleshootDesc": {
|
||||||
|
"message": "Se la skripto estas instalita sed vi ankoraŭ renkontas ĉi tiun paĝon — t.e., ke la <a href='#error'>supra eraro</a> <i>ne</i> estas «Error: No such native application shellfox» — bonvolu raportu la eraron! Raporteblas ĉe la <a id='tracker_link'>erarraportilo de Ŝelvulpo</a>, aŭ per retletero al xwx@posteo.org. Ni riparu la problemon! Bonvolu ne forgesi noti vian operaciumon kaj Firefox-version en la raporto."
|
||||||
|
},
|
||||||
|
|
||||||
|
"errorMessage": {
|
||||||
|
"message": "Eraro: «$ERROR$»",
|
||||||
|
"placeholders": {
|
||||||
|
"error": {
|
||||||
|
"content": "$1",
|
||||||
|
"example": "No such program."
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
/* SPCSS theme by Susam Pal, under the MIT license
|
||||||
|
* https://github.com/susam/spcss */
|
||||||
|
body{color:#333;font-family:helvetica,arial,sans-serif;line-height:1.5;margin:0 auto;max-width:40em;padding:0 1em}h1,h2,h3,h4,h5,h6{margin:1.25em 0 .5em;line-height:1.2}a:link{color:#00e}a:visited{color:#518}a:focus,a:hover{color:#03f}a:active{color:#e00}h1 a:empty:before,h2 a:empty:before,h3 a:empty:before,h4 a:empty:before,h5 a:empty:before,h6 a:empty:before{content:"#"}h1 a:empty,h2 a:empty,h3 a:empty,h4 a:empty,h5 a:empty,h6 a:empty{visibility:hidden;padding-left:.25em}h1:hover a:empty,h2:hover a:empty,h3:hover a:empty,h4:hover a:empty,h5:hover a:empty,h6:hover a:empty{visibility:visible}img{max-width:100%}figure{margin:1em 0;text-align:center}figcaption{font-size:small}code,kbd,pre,samp{color:#009;font-family:monospace,monospace}pre kbd{color:#060}blockquote,pre{background:#eee;padding:.5em}pre{overflow:auto}blockquote{border-left:medium solid #ccc;margin:1em 0}blockquote :first-child{margin-top:0}blockquote :last-child{margin-bottom:0}table{border-collapse:collapse}td,th{border:thin solid #999;padding:.3em .4em;text-align:left}@media (prefers-color-scheme:dark){body{background:#111;color:#bbb}a:link{color:#9bf}a:visited{color:#caf}a:focus,a:hover{color:#9cf}a:active{color:#faa}code,kbd,pre,samp{color:#6cf}pre kbd{color:#9c6}blockquote,pre{background:#000}blockquote{border-color:#333}td,th{border-color:#666}}
|
|
@ -2,11 +2,17 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf8" />
|
<meta charset="utf8" />
|
||||||
|
<link href="error.css" rel="stylesheet" type="text/css">
|
||||||
|
<link rel="icon" type="image/png" href="../img/shellfox-38.png">
|
||||||
<title id="errorPageTitle">Shellfox error</title>
|
<title id="errorPageTitle">Shellfox error</title>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1 id="errorTitle">Shellfox failed to run command</h1>
|
<span>
|
||||||
|
<img style="display: inline; width: 3em;" src="../img/shellfox.png">
|
||||||
|
<h1 style="display: inline;" id="errorTitle">Shellfox failed to run command</h1>
|
||||||
|
</span>
|
||||||
|
|
||||||
<h2 id="error"></h2>
|
<h2 id="error"></h2>
|
||||||
|
|
||||||
<h2 id="notInstalled">It seems that Shellfox is not fully installed!</h2>
|
<h2 id="notInstalled">It seems that Shellfox is not fully installed!</h2>
|
||||||
|
@ -26,6 +32,9 @@
|
||||||
<code>$ curl https://hak.xwx.moe/jadedctrl/shellfox/archive/master.tar.gz | tar -xzv</code><br>
|
<code>$ curl https://hak.xwx.moe/jadedctrl/shellfox/archive/master.tar.gz | tar -xzv</code><br>
|
||||||
<code>$ cd shellfox/</code><br>
|
<code>$ cd shellfox/</code><br>
|
||||||
<code>$ sudo make native-install</code><br>
|
<code>$ sudo make native-install</code><br>
|
||||||
|
|
||||||
|
<h2 id="troubleshootTitle">Troubleshooting</h2>
|
||||||
|
<p id="troubleshootDesc">If Shellfox’s script is installed but you still see this page — that is, the <a href="#error">above error</a> isn’t “Error: No such native application shellfox” — please report the issue! You can report it on the <a href="https://hak.xwx.moe/jadedctrl/shellfox/issues">Shellfox bug-tracker</a>, or by sending an email to xwx@posteo.org. Let’s get that fixed! Please make sure to include your operating system and Firefox version in the report.</p>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
<script src="error.js"></script>
|
<script src="error.js"></script>
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
|
// Most importantly: Write the passed GET error (if any) to the error-header.
|
||||||
let urlParams = location.toString().split("?error=");
|
let urlParams = location.toString().split("?error=");
|
||||||
if (urlParams && urlParams.length > 0) {
|
if (urlParams && urlParams.length > 0) {
|
||||||
let errorText = unescape(urlParams[urlParams.length - 1]);
|
let errorText = unescape(urlParams[urlParams.length - 1]);
|
||||||
document.getElementById("error").innerText = "«" + errorText + "»";
|
document.getElementById("error").innerText = browser.i18n.getMessage("errorMessage", errorText);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Write locale-specific translations to the page.
|
||||||
document.getElementsByTagName("html")[0].setAttribute("lang", browser.i18n.getMessage("@@ui_locale"));
|
document.getElementsByTagName("html")[0].setAttribute("lang", browser.i18n.getMessage("@@ui_locale"));
|
||||||
|
|
||||||
document.getElementById("errorPageTitle").innerText = browser.i18n.getMessage("errorPageTitle");
|
document.getElementById("errorPageTitle").innerText = browser.i18n.getMessage("errorPageTitle");
|
||||||
|
@ -20,4 +23,12 @@ document.getElementById("installStep4").innerHTML = browser.i18n.getMessage("rep
|
||||||
document.getElementById("installStep5").innerText = browser.i18n.getMessage("repairInstallStep5");
|
document.getElementById("installStep5").innerText = browser.i18n.getMessage("repairInstallStep5");
|
||||||
document.getElementById("installTerminalIntro").innerText = browser.i18n.getMessage("repairInstallTerminalIntro");
|
document.getElementById("installTerminalIntro").innerText = browser.i18n.getMessage("repairInstallTerminalIntro");
|
||||||
|
|
||||||
|
document.getElementById("troubleshootTitle").innerText = browser.i18n.getMessage("troubleshootTitle");
|
||||||
|
document.getElementById("troubleshootDesc").innerHTML = browser.i18n.getMessage("troubleshootDesc");
|
||||||
|
|
||||||
|
|
||||||
|
// Now, write our repo’s URLs to the links.
|
||||||
document.getElementById("zip_link").setAttribute("href", "https://hak.xwx.moe/jadedctrl/shellfox/archive/master.zip");
|
document.getElementById("zip_link").setAttribute("href", "https://hak.xwx.moe/jadedctrl/shellfox/archive/master.zip");
|
||||||
|
document.getElementById("tracker_link").setAttribute("href", "https://hak.xwx.moe/jadedctrl/shellfox/issues");
|
||||||
|
|
||||||
|
|
||||||
|
|
Ŝarĝante…
Reference in New Issue