diff --git a/app.css b/app.css index ac7f7afa55bef7a6d7790074ba749425f32f220b..d22c2f558179cdaf239506d6ed1eb928eac15fe9 100644 --- a/app.css +++ b/app.css @@ -186,7 +186,8 @@ h1, h2, h3, h4, h5, h6 { color: #009ee0; } -#wizard #branch-pane .btn { +#wizard #branch-pane .btn, +#wizard #type-pane .btn { background-color: #009ee0; } @@ -194,8 +195,13 @@ h1, h2, h3, h4, h5, h6 { box-shadow: 0 0 0.5em #005ea0 inset; } +#wizard #type-pane.show-deviceinfo-warning button.deviceinfo { + box-shadow: 0 0 0.5em #005ea0 inset; +} + #wizard #branch-pane .warning-experimental, -#wizard #model-pane .warning-notrecommended { +#wizard #model-pane .warning-notrecommended, +#wizard #type-pane .warning-deviceinfo { display: none; margin: 1em 0; padding: 1em; @@ -204,7 +210,8 @@ h1, h2, h3, h4, h5, h6 { } #wizard #branch-pane.show-experimental-warning .warning-experimental, -#wizard #model-pane.show-notrecommended-warning .warning-notrecommended { +#wizard #model-pane.show-notrecommended-warning .warning-notrecommended, +#wizard #type-pane.show-deviceinfo-warning .warning-deviceinfo { display: block; } diff --git a/app.js b/app.js index 9f3b9c997857e03b919cfb8e1996c5e1d9d96780..26d8c3a014698e2b440443ca0b953340c6ff4d25 100644 --- a/app.js +++ b/app.js @@ -819,6 +819,39 @@ var firmwarewizard = function() { scrollDown(); } + var deviceinfo = $('#deviceinfo'); + var url = ''; + deviceinfo.innerHTML = ''; + + if ( + devices_info[currentVendor] !== undefined && + devices_info[currentVendor][currentModel] !== undefined + ) { + url = devices_info[currentVendor][currentModel]; + } + + if ( + config.devices_info !== undefined && + config.devices_info[currentVendor] !== undefined && + config.devices_info[currentVendor][currentModel] + ) { + url = config.devices_info[currentVendor][currentModel]; + } + + if (url !== '') { + setClass($('#type-pane'), 'show-deviceinfo-warning', true); + + var a = document.createElement('a'); + a.href = url; + a.className = 'btn'; + a.target = '_blank'; + a.innerText = 'Anleitung'; + + deviceinfo.appendChild(a); + } else { + setClass($('#type-pane'), 'show-deviceinfo-warning', false); + } + var typeselect = $('#typeselect'); typeselect.innerHTML = ''; diff --git a/config_template.js b/config_template.js index 3fbcaa1f59c6dacf889b56da5581f7703bc8a42d..bbe02745d44a817c1587df898eeca331bb7c1f7d 100644 --- a/config_template.js +++ b/config_template.js @@ -52,5 +52,12 @@ var config = { // path to preview pictures directory preview_pictures: 'pictures/', // link to changelog - changelog: 'CHANGELOG.html' + changelog: 'CHANGELOG.html', + // links for instructions like flashing of certain devices (optional) + // overwrites values from devices_info in devices.js + devices_info: { + 'AVM': { + "FRITZ!Box 4040": "https://fritz-tools.readthedocs.io" + } + } }; diff --git a/devices.js b/devices.js index 008f937d629417d6537714b12239a238e2183581..0a59603bf69ebe53cecfa10e7d75b345509cf5e4 100644 --- a/devices.js +++ b/devices.js @@ -380,3 +380,18 @@ var vendormodels = { "8_32": devices_8_32, "16_32": devices_16_32, } + +var devices_info = { + "AVM": { + "FRITZ!Box 4020": "https://fritzfla.sh", + "FRITZ!Box 4040": "https://fritzfla.sh", + "FRITZ!Box 7312": "https://fritzfla.sh", + "FRITZ!Box 7320": "https://fritzfla.sh", + "FRITZ!Box 7330": "https://fritzfla.sh", + "FRITZ!Box 7330 SL": "https://fritzfla.sh", + "FRITZ!Box 7360": "https://fritzfla.sh", + "FRITZ!Box 7360 SL": "https://fritzfla.sh", + "FRITZ!WLAN Repeater 300E": "https://fritzfla.sh", + "FRITZ!WLAN Repeater 450E": "https://fritzfla.sh" + } +} diff --git a/index.html b/index.html index f6b0a5445337173c2a0aa13459034a34e42e1253..4b49c2b3a915316379d47571126bb6f7cac081a7 100644 --- a/index.html +++ b/index.html @@ -66,6 +66,14 @@ Einige Geräte benötigen spezielle Images, welche über den Bootloader des Herstellers eingespielt werden. </p> + <div class="warning-deviceinfo"> + <b>Vorsicht!</b> Für dieses Gerät gibt es eine extra Anleitung. + Dies kann zum Beispiel bedeuten, dass die Installation nicht über die + Weboberfläche des Geräts möglich ist. Bitte besuche zuerst die folgende + Seite und lies dir alle Informationen gut durch bevor du mit dem + Flashen der Firmware beginnst. + <div id="deviceinfo"></div> + </div> <radiogroup id="typeselect" class="radiogroup"></radiogroup> </div> </div>