Display app version in web interface

This commit is contained in:
unknown
2015-07-11 10:53:18 -06:00
parent 9ffa461ae3
commit a6213c1b9a
5 changed files with 168 additions and 149 deletions

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyVersion("0.3.2.0")]
[assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -4,6 +4,7 @@ using System.Collections.Generic;
using System.IO; using System.IO;
using System.Linq; using System.Linq;
using System.Net; using System.Net;
using System.Reflection;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
@@ -257,6 +258,7 @@ namespace Jackett
{ {
jsonReply["result"] = "success"; jsonReply["result"] = "success";
jsonReply["api_key"] = ApiKey.CurrentKey; jsonReply["api_key"] = ApiKey.CurrentKey;
jsonReply["app_version"] = Assembly.GetExecutingAssembly().GetName().Version.ToString();
JArray items = new JArray(); JArray items = new JArray();
foreach (var i in indexerManager.Indexers) foreach (var i in indexerManager.Indexers)
{ {

View File

@@ -1,9 +1,9 @@
 body { body {
background-image: url("binding_dark.png"); background-image: url("binding_dark.png");
background-repeat: repeat; background-repeat: repeat;
} }
#page { #page {
border-radius: 6px; border-radius: 6px;
background-color: white; background-color: white;
max-width: 900px; max-width: 900px;
@@ -11,16 +11,16 @@
margin-top: 30px; margin-top: 30px;
padding: 20px; padding: 20px;
margin-bottom: 100px; margin-bottom: 100px;
} }
.container-fluid { .container-fluid {
} }
#templates { #templates {
display: none; display: none;
} }
.card { .card {
background-color: #f9f9f9; background-color: #f9f9f9;
border-radius: 6px; border-radius: 6px;
box-shadow: 1px 1px 5px 2px #cdcdcd; box-shadow: 1px 1px 5px 2px #cdcdcd;
@@ -29,50 +29,50 @@
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
margin: 10px; margin: 10px;
} }
.unconfigured-indexer { .unconfigured-indexer {
height: 170px; height: 170px;
} }
.indexer { .indexer {
height: 230px; height: 230px;
} }
.add-indexer { .add-indexer {
border: 0; border: 0;
} }
.indexer-logo { .indexer-logo {
text-align: center; text-align: center;
} }
.indexer-logo > img { .indexer-logo > img {
border: 1px solid #828282; border: 1px solid #828282;
} }
.indexer-name > h3 { .indexer-name > h3 {
margin-top: 13px; margin-top: 13px;
text-align: center; text-align: center;
} }
.indexer-buttons { .indexer-buttons {
text-align: center; text-align: center;
} }
.indexer-buttons > .btn { .indexer-buttons > .btn {
margin-bottom: 10px; margin-bottom: 10px;
} }
.indexer-button-test { .indexer-button-test {
width: 60px; width: 60px;
} }
.indexer-add-content { .indexer-add-content {
color: gray; color: gray;
text-align: center; text-align: center;
} }
.indexer-add-content > .glyphicon { .indexer-add-content > .glyphicon {
font-size: 50px; font-size: 50px;
@@ -86,28 +86,28 @@
} }
.indexer-host > input { .indexer-host > input {
font-size: 12px; font-size: 12px;
padding: 2px; padding: 2px;
} }
.setup-item-inputstring { .setup-item-inputstring {
max-width: 260px; max-width: 260px;
} }
.setup-item-inputbool input { .setup-item-inputbool input {
max-width: 100px; max-width: 100px;
height: 20px; height: 20px;
} }
.spinner { .spinner {
-webkit-animation: spin 2s infinite linear; -webkit-animation: spin 2s infinite linear;
-moz-animation: spin 2s infinite linear; -moz-animation: spin 2s infinite linear;
-o-animation: spin 2s infinite linear; -o-animation: spin 2s infinite linear;
animation: spin 2s infinite linear; animation: spin 2s infinite linear;
} }
@-moz-keyframes spin { @-moz-keyframes spin {
from { from {
-moz-transform: rotate(0deg); -moz-transform: rotate(0deg);
} }
@@ -115,9 +115,9 @@
to { to {
-moz-transform: rotate(360deg); -moz-transform: rotate(360deg);
} }
} }
@-webkit-keyframes spin { @-webkit-keyframes spin {
from { from {
-webkit-transform: rotate(0deg); -webkit-transform: rotate(0deg);
} }
@@ -125,9 +125,9 @@
to { to {
-webkit-transform: rotate(360deg); -webkit-transform: rotate(360deg);
} }
} }
@keyframes spin { @keyframes spin {
from { from {
transform: rotate(0deg); transform: rotate(0deg);
} }
@@ -135,18 +135,18 @@
to { to {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
#setup-indexer-go { #setup-indexer-go {
width: 70px; width: 70px;
} }
hr { hr {
border-top-color: #cdcdcd; border-top-color: #cdcdcd;
} }
.input-area { .input-area {
} }
.input-area > * { .input-area > * {
vertical-align: middle; vertical-align: middle;
@@ -156,28 +156,35 @@
margin-top: 10px; margin-top: 10px;
} }
.input-header { .input-header {
font-size: 18px; font-size: 18px;
width: 140px; width: 140px;
display: inline-block; display: inline-block;
} }
.input-right { .input-right {
width: 300px; width: 300px;
display: inline-block; display: inline-block;
font-family: monospace; font-family: monospace;
} }
#sonarr-warning { #sonarr-warning {
display: none; display: none;
} }
#logo { #logo {
max-width: 50px; max-width: 50px;
} }
#header-title { #header-title {
font-size: 34px; font-size: 34px;
vertical-align: middle; vertical-align: middle;
padding-left: 15px; padding-left: 15px;
} }
#footer {
color: #444444;
margin: 0 auto;
margin-top: 10px;
text-align: center;
}

View File

@@ -89,6 +89,7 @@ function reloadIndexers() {
$('#unconfigured-indexers').empty(); $('#unconfigured-indexers').empty();
var jqxhr = $.get("get_indexers", function (data) { var jqxhr = $.get("get_indexers", function (data) {
$("#api-key-input").val(data.api_key); $("#api-key-input").val(data.api_key);
$("#app-version").html(data.app_version);
displayIndexers(data.items); displayIndexers(data.items);
}).fail(function () { }).fail(function () {
doNotify("Error loading indexers, request to Jackett server failed", "danger", "glyphicon glyphicon-alert"); doNotify("Error loading indexers, request to Jackett server failed", "danger", "glyphicon glyphicon-alert");

View File

@@ -56,6 +56,13 @@
</div> </div>
<hr />
<div id="footer">
Jackett Version <span id="app-version"></span>
</div>
</div> </div>
<div id="select-indexer-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"> <div id="select-indexer-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
@@ -160,8 +167,10 @@
<span class="spinner glyphicon glyphicon-refresh"></span> <span class="spinner glyphicon glyphicon-refresh"></span>
</div> </div>
<script src="custom.js"></script> <script src="custom.js"></script>
</body> </body>