From a6213c1b9a3c167671828054a41bb09b408c90f4 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 11 Jul 2015 10:53:18 -0600 Subject: [PATCH] Display app version in web interface --- src/Jackett/Properties/AssemblyInfo.cs | 2 +- src/Jackett/WebApi.cs | 2 + src/Jackett/WebContent/custom.css | 297 +++++++++++++------------ src/Jackett/WebContent/custom.js | 1 + src/Jackett/WebContent/index.html | 15 +- 5 files changed, 168 insertions(+), 149 deletions(-) diff --git a/src/Jackett/Properties/AssemblyInfo.cs b/src/Jackett/Properties/AssemblyInfo.cs index 4c36cbcf8..6dcc76d8b 100644 --- a/src/Jackett/Properties/AssemblyInfo.cs +++ b/src/Jackett/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyVersion("0.3.2.0")] [assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/src/Jackett/WebApi.cs b/src/Jackett/WebApi.cs index 8b6a6b543..8c46f3d6c 100644 --- a/src/Jackett/WebApi.cs +++ b/src/Jackett/WebApi.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; +using System.Reflection; using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; @@ -257,6 +258,7 @@ namespace Jackett { jsonReply["result"] = "success"; jsonReply["api_key"] = ApiKey.CurrentKey; + jsonReply["app_version"] = Assembly.GetExecutingAssembly().GetName().Version.ToString(); JArray items = new JArray(); foreach (var i in indexerManager.Indexers) { diff --git a/src/Jackett/WebContent/custom.css b/src/Jackett/WebContent/custom.css index d52dffdbb..ee80f8369 100644 --- a/src/Jackett/WebContent/custom.css +++ b/src/Jackett/WebContent/custom.css @@ -1,183 +1,190 @@ - body { - background-image: url("binding_dark.png"); - background-repeat: repeat; - } +body { + background-image: url("binding_dark.png"); + background-repeat: repeat; +} - #page { - border-radius: 6px; - background-color: white; - max-width: 900px; - margin: 0 auto; - margin-top: 30px; - padding: 20px; - margin-bottom: 100px; - } +#page { + border-radius: 6px; + background-color: white; + max-width: 900px; + margin: 0 auto; + margin-top: 30px; + padding: 20px; + margin-bottom: 100px; +} - .container-fluid { - } +.container-fluid { +} - #templates { - display: none; - } +#templates { + display: none; +} - .card { - background-color: #f9f9f9; - border-radius: 6px; - box-shadow: 1px 1px 5px 2px #cdcdcd; - padding: 10px; - width: 260px; - display: inline-block; - vertical-align: top; - margin: 10px; - } +.card { + background-color: #f9f9f9; + border-radius: 6px; + box-shadow: 1px 1px 5px 2px #cdcdcd; + padding: 10px; + width: 260px; + display: inline-block; + vertical-align: top; + margin: 10px; +} - .unconfigured-indexer { - height: 170px; - } +.unconfigured-indexer { + height: 170px; +} - .indexer { - height: 230px; - } +.indexer { + height: 230px; +} - .add-indexer { - border: 0; - } +.add-indexer { + border: 0; +} - .indexer-logo { - text-align: center; - } +.indexer-logo { + text-align: center; +} - .indexer-logo > img { - border: 1px solid #828282; - } + .indexer-logo > img { + border: 1px solid #828282; + } - .indexer-name > h3 { - margin-top: 13px; - text-align: center; - } +.indexer-name > h3 { + margin-top: 13px; + text-align: center; +} - .indexer-buttons { - text-align: center; - } +.indexer-buttons { + text-align: center; +} - .indexer-buttons > .btn { - margin-bottom: 10px; - } + .indexer-buttons > .btn { + margin-bottom: 10px; + } - .indexer-button-test { - width: 60px; - } +.indexer-button-test { + width: 60px; +} - .indexer-add-content { - color: gray; - text-align: center; - } +.indexer-add-content { + color: gray; + text-align: center; +} - .indexer-add-content > .glyphicon { - font-size: 50px; - vertical-align: bottom; - } + .indexer-add-content > .glyphicon { + font-size: 50px; + vertical-align: bottom; + } - .indexer-add-content > .light-text { - margin-top: 11px; - font-size: 18px; - margin-left: -5px; - } + .indexer-add-content > .light-text { + margin-top: 11px; + font-size: 18px; + margin-left: -5px; + } - .indexer-host > input { - font-size: 12px; - padding: 2px; - } +.indexer-host > input { + font-size: 12px; + padding: 2px; +} - .setup-item-inputstring { - max-width: 260px; - } +.setup-item-inputstring { + max-width: 260px; +} - .setup-item-inputbool input { - max-width: 100px; - height: 20px; - } +.setup-item-inputbool input { + max-width: 100px; + height: 20px; +} - .spinner { - -webkit-animation: spin 2s infinite linear; - -moz-animation: spin 2s infinite linear; - -o-animation: spin 2s infinite linear; - animation: spin 2s infinite linear; - } +.spinner { + -webkit-animation: spin 2s infinite linear; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; +} - @-moz-keyframes spin { - from { - -moz-transform: rotate(0deg); - } +@-moz-keyframes spin { + from { + -moz-transform: rotate(0deg); + } - to { - -moz-transform: rotate(360deg); - } - } + to { + -moz-transform: rotate(360deg); + } +} - @-webkit-keyframes spin { - from { - -webkit-transform: rotate(0deg); - } +@-webkit-keyframes spin { + from { + -webkit-transform: rotate(0deg); + } - to { - -webkit-transform: rotate(360deg); - } - } + to { + -webkit-transform: rotate(360deg); + } +} - @keyframes spin { - from { - transform: rotate(0deg); - } +@keyframes spin { + from { + transform: rotate(0deg); + } - to { - transform: rotate(360deg); - } - } + to { + transform: rotate(360deg); + } +} - #setup-indexer-go { - width: 70px; - } +#setup-indexer-go { + width: 70px; +} - hr { - border-top-color: #cdcdcd; - } +hr { + border-top-color: #cdcdcd; +} - .input-area { - } +.input-area { +} - .input-area > * { - vertical-align: middle; - } + .input-area > * { + vertical-align: middle; + } - .input-area > p { - margin-top: 10px; - } + .input-area > p { + margin-top: 10px; + } - .input-header { - font-size: 18px; - width: 140px; - display: inline-block; - } +.input-header { + font-size: 18px; + width: 140px; + display: inline-block; +} - .input-right { - width: 300px; - display: inline-block; - font-family: monospace; - } +.input-right { + width: 300px; + display: inline-block; + font-family: monospace; +} - #sonarr-warning { - display: none; - } +#sonarr-warning { + display: none; +} - #logo { - max-width: 50px; - } +#logo { + max-width: 50px; +} - #header-title { - font-size: 34px; - vertical-align: middle; - padding-left: 15px; - } \ No newline at end of file +#header-title { + font-size: 34px; + vertical-align: middle; + padding-left: 15px; +} + +#footer { + color: #444444; + margin: 0 auto; + margin-top: 10px; + text-align: center; +} diff --git a/src/Jackett/WebContent/custom.js b/src/Jackett/WebContent/custom.js index 4499ce97c..38c4871de 100644 --- a/src/Jackett/WebContent/custom.js +++ b/src/Jackett/WebContent/custom.js @@ -89,6 +89,7 @@ function reloadIndexers() { $('#unconfigured-indexers').empty(); var jqxhr = $.get("get_indexers", function (data) { $("#api-key-input").val(data.api_key); + $("#app-version").html(data.app_version); displayIndexers(data.items); }).fail(function () { doNotify("Error loading indexers, request to Jackett server failed", "danger", "glyphicon glyphicon-alert"); diff --git a/src/Jackett/WebContent/index.html b/src/Jackett/WebContent/index.html index 3bb738a0f..ad6ccb22b 100644 --- a/src/Jackett/WebContent/index.html +++ b/src/Jackett/WebContent/index.html @@ -56,6 +56,13 @@ +
+ + + +