Display app version in web interface

This commit is contained in:
unknown 2015-07-11 10:53:18 -06:00
parent 9573997586
commit 2800bee1cb
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
// 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")]

View File

@ -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)
{

View File

@ -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;
}
#header-title {
font-size: 34px;
vertical-align: middle;
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();
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");

View File

@ -56,6 +56,13 @@
</div>
<hr />
<div id="footer">
Jackett Version <span id="app-version"></span>
</div>
</div>
<div id="select-indexer-modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
@ -113,7 +120,7 @@
<div class="indexer-logo"><img src="logos/{{id}}.png" /></div>
<div class="indexer-name"><h3>{{name}}</h3></div>
<div class="indexer-buttons">
<button class="btn btn-primary btn-sm indexer-setup" data-id="{{id}}">
<button class="btn btn-primary btn-sm indexer-setup" data-id="{{id}}">
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
</button>
<button class="btn btn-danger btn-sm indexer-button-delete" data-id="{{id}}">
@ -150,9 +157,9 @@
<input class="setup-item-inputstring form-control" type="text" value="{{{value}}}" />
<div class="setup-item-inputbool">
{{#if value}}
<input type="checkbox" data-id="{{id}}" class="form-control" checked />
<input type="checkbox" data-id="{{id}}" class="form-control" checked />
{{else}}
<input type="checkbox" data-id="{{id}}" class="form-control" />
<input type="checkbox" data-id="{{id}}" class="form-control" />
{{/if}}
</div>
<img class="setup-item-displayimage" src="{{{value}}}" />
@ -160,8 +167,10 @@
<span class="spinner glyphicon glyphicon-refresh"></span>
</div>
<script src="custom.js"></script>
</body>