update login page
This commit is contained in:
parent
c710303de9
commit
7d1dbeddec
9 changed files with 137 additions and 83 deletions
|
@ -22,7 +22,7 @@
|
|||
case MediaBrowser.ConnectionState.ServerSignIn:
|
||||
{
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
window.location = 'connectlogin.html?mode=serversignin&serverid=' + result.Servers[0].Id;
|
||||
window.location = 'login.html?serverid=' + result.Servers[0].Id;
|
||||
} else {
|
||||
showServerConnectionFailure();
|
||||
}
|
||||
|
@ -64,13 +64,20 @@
|
|||
var href = "#";
|
||||
html += '<a class="cardContent lnkServer" data-serverid="' + server.Id + '" href="' + href + '">';
|
||||
|
||||
var imgUrl = 'css/images/server.png';
|
||||
var imgUrl = server.Id == 'connect' ? 'css/images/logo536.png' : '';
|
||||
|
||||
html += '<div class="cardImage" style="background-image:url(\'' + imgUrl + '\');">';
|
||||
if (imgUrl) {
|
||||
html += '<div class="cardImage" style="background-image:url(\'' + imgUrl + '\');">';
|
||||
} else {
|
||||
html += '<div class="cardImage" style="text-align:center;">';
|
||||
|
||||
var icon = server.Id == 'new' ? 'plus-circle' : 'globe';
|
||||
html += '<i class="fa fa-' + icon + '" style="color:#fff;vertical-align:middle;font-size:100px;margin-top:25%;"></i>';
|
||||
}
|
||||
|
||||
html += "</div>";
|
||||
|
||||
// cardContent
|
||||
// cardContent'
|
||||
html += "</a>";
|
||||
|
||||
// cardScalable
|
||||
|
@ -78,11 +85,13 @@
|
|||
|
||||
html += '<div class="cardFooter">';
|
||||
|
||||
html += '<div class="cardText" style="text-align:right; float:right;">';
|
||||
if (server.showOptions !== false) {
|
||||
html += '<div class="cardText" style="text-align:right; float:right;">';
|
||||
|
||||
html += '<button class="btnServerMenu" type="button" data-inline="true" data-iconpos="notext" data-icon="ellipsis-v" style="margin: 2px 0 0;"></button>';
|
||||
html += '<button class="btnServerMenu" type="button" data-inline="true" data-iconpos="notext" data-icon="ellipsis-v" style="margin: 2px 0 0;"></button>';
|
||||
|
||||
html += "</div>";
|
||||
html += "</div>";
|
||||
}
|
||||
|
||||
html += '<div class="cardText" style="margin-right: 30px; padding: 11px 0 10px;">';
|
||||
html += server.Name;
|
||||
|
@ -117,6 +126,17 @@
|
|||
$('.lnkServer', elem).on('click', function () {
|
||||
|
||||
var id = this.getAttribute('data-serverid');
|
||||
|
||||
if (id == 'new') {
|
||||
window.location = 'connectlogin.html?mode=manualserver';
|
||||
return;
|
||||
}
|
||||
|
||||
if (id == 'connect') {
|
||||
window.location = 'connectlogin.html?mode=connect';
|
||||
return;
|
||||
}
|
||||
|
||||
var server = servers.filter(function (s) {
|
||||
return s.Id == id;
|
||||
})[0];
|
||||
|
@ -281,10 +301,8 @@
|
|||
var href = "#";
|
||||
html += '<a class="cardContent" href="' + href + '">';
|
||||
|
||||
var imgUrl = 'css/images/server.png';
|
||||
|
||||
html += '<div class="cardImage" style="background-image:url(\'' + imgUrl + '\');">';
|
||||
|
||||
html += '<div class="cardImage" style="text-align:center;">';
|
||||
html += '<i class="fa fa-globe" style="color:#fff;vertical-align:middle;font-size:100px;margin-top:25%;"></i>';
|
||||
html += "</div>";
|
||||
|
||||
// cardContent
|
||||
|
@ -356,20 +374,30 @@
|
|||
|
||||
ConnectionManager.getAvailableServers().done(function (servers) {
|
||||
|
||||
servers = servers.slice(0);
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
servers.push({
|
||||
Name: Globalize.translate('ButtonNewServer'),
|
||||
Id: 'new',
|
||||
showOptions: false
|
||||
});
|
||||
}
|
||||
|
||||
if (!ConnectionManager.isLoggedIntoConnect()) {
|
||||
servers.push({
|
||||
Name: Globalize.translate('ButtonSignInWithConnect'),
|
||||
Id: 'connect',
|
||||
showOptions: false
|
||||
});
|
||||
}
|
||||
|
||||
renderServers(page, servers);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
|
||||
loadInvitations(page);
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
$('.newServer', page).show();
|
||||
$('.connectLogin', page).show();
|
||||
} else {
|
||||
$('.newServer', page).hide();
|
||||
$('.connectLogin', page).hide();
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('pageshow', "#selectServerPage", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue