mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update photo resolving
This commit is contained in:
parent
59466a8ff3
commit
0a225d099d
5 changed files with 123 additions and 62 deletions
|
@ -42,6 +42,11 @@ var Dashboard = {
|
|||
$.mobile.panel.prototype.options.classes.panel = "largePanel ui-panel";
|
||||
},
|
||||
|
||||
isRunningInCordova: function () {
|
||||
var isCordovaApp = !!window.cordova;
|
||||
return isCordovaApp;
|
||||
},
|
||||
|
||||
onRequestFail: function (e, data) {
|
||||
|
||||
if (data.status == 401) {
|
||||
|
@ -230,28 +235,6 @@ var Dashboard = {
|
|||
}, 3000);
|
||||
},
|
||||
|
||||
alert: function (options) {
|
||||
|
||||
if (typeof options == "string") {
|
||||
|
||||
var message = options;
|
||||
|
||||
$.mobile.loading('show', {
|
||||
text: message,
|
||||
textonly: true,
|
||||
textVisible: true
|
||||
});
|
||||
|
||||
setTimeout(function () {
|
||||
$.mobile.loading('hide');
|
||||
}, 3000);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Dashboard.confirmInternal(options.message, options.title || Globalize.translate('HeaderAlert'), false, options.callback);
|
||||
},
|
||||
|
||||
updateSystemInfo: function (info) {
|
||||
|
||||
Dashboard.lastSystemInfo = info;
|
||||
|
@ -470,6 +453,53 @@ var Dashboard = {
|
|||
Dashboard.alert(Globalize.translate('MessageSettingsSaved'));
|
||||
},
|
||||
|
||||
alert: function (options) {
|
||||
|
||||
if (typeof options == "string") {
|
||||
|
||||
var message = options;
|
||||
|
||||
$.mobile.loading('show', {
|
||||
text: message,
|
||||
textonly: true,
|
||||
textVisible: true
|
||||
});
|
||||
|
||||
setTimeout(function () {
|
||||
$.mobile.loading('hide');
|
||||
}, 3000);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
|
||||
navigator.notification.alert(options.message, options.callback || function () { }, options.title || Globalize.translate('HeaderAlert'));
|
||||
|
||||
} else {
|
||||
Dashboard.confirmInternal(options.message, options.title || Globalize.translate('HeaderAlert'), false, options.callback);
|
||||
}
|
||||
},
|
||||
|
||||
confirm: function (message, title, callback) {
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
|
||||
navigator.notification.alert(options.message, options.callback || function () { }, options.title || Globalize.translate('HeaderAlert'));
|
||||
|
||||
var buttonLabels = [Globalize.translate('ButtonOk'), Globalize.translate('ButtonCancel')];
|
||||
|
||||
navigator.notification.confirm(options.message, function (index) {
|
||||
|
||||
options.callback(index == 1);
|
||||
|
||||
}, options.title || Globalize.translate('HeaderAlert'), buttonLabels.join(','));
|
||||
|
||||
} else {
|
||||
Dashboard.confirmInternal(message, title, true, callback);
|
||||
}
|
||||
},
|
||||
|
||||
confirmInternal: function (message, title, showCancel, callback) {
|
||||
|
||||
$('.confirmFlyout').popup("close").remove();
|
||||
|
@ -508,10 +538,6 @@ var Dashboard = {
|
|||
});
|
||||
},
|
||||
|
||||
confirm: function (message, title, callback) {
|
||||
Dashboard.confirmInternal(message, title, true, callback);
|
||||
},
|
||||
|
||||
refreshSystemInfoFromServer: function () {
|
||||
|
||||
if (Dashboard.getAccessToken()) {
|
||||
|
@ -1339,10 +1365,24 @@ var Dashboard = {
|
|||
.on('serveraddresschanged.dashboard', Dashboard.onApiClientServerAddressChanged);
|
||||
}
|
||||
|
||||
var appName = "Dashboard";
|
||||
var appVersion = window.dashboardVersion;
|
||||
var deviceName = generateDeviceName();
|
||||
var deviceId = MediaBrowser.generateDeviceId();
|
||||
var appName;
|
||||
var deviceName;
|
||||
var deviceId;
|
||||
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
|
||||
appName = "Emby Mobile";
|
||||
deviceName = device.model;
|
||||
deviceId = device.uuid;
|
||||
|
||||
} else {
|
||||
|
||||
appName = "Emby Web Client";
|
||||
deviceName = generateDeviceName();
|
||||
deviceId = MediaBrowser.generateDeviceId();
|
||||
}
|
||||
|
||||
var credentialProvider = new MediaBrowser.CredentialProvider();
|
||||
|
||||
var capabilities = Dashboard.capabilities();
|
||||
|
@ -1412,10 +1452,10 @@ var Dashboard = {
|
|||
|
||||
})();
|
||||
|
||||
(function() {
|
||||
|
||||
(function () {
|
||||
|
||||
function onReady() {
|
||||
|
||||
|
||||
var videoPlayerHtml = '<div id="mediaPlayer" data-theme="b" class="ui-bar-b" style="display: none;">';
|
||||
|
||||
videoPlayerHtml += '<div class="videoBackdrop">';
|
||||
|
@ -1530,8 +1570,17 @@ var Dashboard = {
|
|||
}
|
||||
}
|
||||
|
||||
$(onReady);
|
||||
if (Dashboard.isRunningInCordova()) {
|
||||
|
||||
document.addEventListener("deviceready", function () {
|
||||
|
||||
$(onReady);
|
||||
|
||||
}, false);
|
||||
|
||||
} else {
|
||||
$(onReady);
|
||||
}
|
||||
})();
|
||||
|
||||
Dashboard.jQueryMobileInit();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue