mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
rework dialog
This commit is contained in:
parent
b86d2368f4
commit
996f2504b2
16 changed files with 139 additions and 179 deletions
|
@ -636,7 +636,6 @@
|
||||||
resolve({
|
resolve({
|
||||||
localUser: localUser,
|
localUser: localUser,
|
||||||
name: connectUser ? connectUser.Name : (localUser ? localUser.Name : null),
|
name: connectUser ? connectUser.Name : (localUser ? localUser.Name : null),
|
||||||
canManageServer: localUser ? localUser.Policy.IsAdministrator : false,
|
|
||||||
imageUrl: image.url,
|
imageUrl: image.url,
|
||||||
supportsImageParams: image.supportsParams
|
supportsImageParams: image.supportsParams
|
||||||
});
|
});
|
||||||
|
@ -851,8 +850,8 @@
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
require(['serverdiscovery'], function () {
|
require(['serverdiscovery'], function (serverDiscovery) {
|
||||||
ServerDiscovery.findServers(1000).then(function (foundServers) {
|
serverDiscovery.findServers(1000).then(function (foundServers) {
|
||||||
|
|
||||||
var servers = foundServers.map(function (foundServer) {
|
var servers = foundServers.map(function (foundServer) {
|
||||||
|
|
||||||
|
@ -974,12 +973,12 @@
|
||||||
|
|
||||||
function beginWakeServer(server) {
|
function beginWakeServer(server) {
|
||||||
|
|
||||||
require(['wakeonlan'], function () {
|
require(['wakeonlan'], function (wakeonlan) {
|
||||||
var infos = server.WakeOnLanInfos || [];
|
var infos = server.WakeOnLanInfos || [];
|
||||||
|
|
||||||
for (var i = 0, length = infos.length; i < length; i++) {
|
for (var i = 0, length = infos.length; i < length; i++) {
|
||||||
|
|
||||||
WakeOnLan.send(infos[i]);
|
wakeonlan.send(infos[i]);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
(function (globalScope) {
|
define([], function () {
|
||||||
|
|
||||||
globalScope.ServerDiscovery = {
|
return {
|
||||||
|
|
||||||
findServers: function (timeoutMs) {
|
findServers: function (timeoutMs) {
|
||||||
|
|
||||||
|
@ -15,4 +15,4 @@
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
})(window);
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
(function (globalScope) {
|
define([], function () {
|
||||||
|
|
||||||
function send(info) {
|
function send(info) {
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
globalScope.WakeOnLan = {
|
return {
|
||||||
send: send
|
send: send
|
||||||
};
|
};
|
||||||
|
|
||||||
})(window);
|
});
|
|
@ -26,14 +26,14 @@
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"main": "iron-meta.html",
|
"main": "iron-meta.html",
|
||||||
"homepage": "https://github.com/polymerelements/iron-meta",
|
"homepage": "https://github.com/PolymerElements/iron-meta",
|
||||||
"_release": "1.1.1",
|
"_release": "1.1.1",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.1.1",
|
"tag": "v1.1.1",
|
||||||
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
|
"commit": "e171ee234b482219c9514e6f9551df48ef48bd9f"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-meta.git",
|
"_source": "git://github.com/PolymerElements/iron-meta.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/iron-meta"
|
"_originalSource": "PolymerElements/iron-meta"
|
||||||
}
|
}
|
|
@ -52,7 +52,7 @@
|
||||||
"tag": "v1.1.3",
|
"tag": "v1.1.3",
|
||||||
"commit": "f070288446f9e78fbe16b032ddb429a8e8015ee7"
|
"commit": "f070288446f9e78fbe16b032ddb429a8e8015ee7"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/paper-input.git",
|
"_source": "git://github.com/PolymerElements/paper-input.git",
|
||||||
"_target": "^1.0.9",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/paper-input"
|
"_originalSource": "PolymerElements/paper-input"
|
||||||
}
|
}
|
|
@ -32,14 +32,14 @@
|
||||||
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0"
|
||||||
},
|
},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "https://github.com/PolymerElements/paper-ripple",
|
"homepage": "https://github.com/polymerelements/paper-ripple",
|
||||||
"_release": "1.0.5",
|
"_release": "1.0.5",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.5",
|
"tag": "v1.0.5",
|
||||||
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
|
"commit": "d72e7a9a8ab518b901ed18dde492df3b87a93be5"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/PolymerElements/paper-ripple.git",
|
"_source": "git://github.com/polymerelements/paper-ripple.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "PolymerElements/paper-ripple"
|
"_originalSource": "polymerelements/paper-ripple"
|
||||||
}
|
}
|
|
@ -1,55 +0,0 @@
|
||||||
define(['fade-in-animation', 'fade-out-animation', 'paper-dialog'], function () {
|
|
||||||
|
|
||||||
return function (options) {
|
|
||||||
|
|
||||||
var title = options.title;
|
|
||||||
var message = options.message;
|
|
||||||
var buttons = options.buttons;
|
|
||||||
var callback = options.callback;
|
|
||||||
|
|
||||||
var id = 'paperdlg' + new Date().getTime();
|
|
||||||
|
|
||||||
var html = '<paper-dialog id="' + id + '" role="alertdialog" entry-animation="fade-in-animation" exit-animation="fade-out-animation" with-backdrop>';
|
|
||||||
html += '<h2>' + title + '</h2>';
|
|
||||||
html += '<div>' + message + '</div>';
|
|
||||||
html += '<div class="buttons">';
|
|
||||||
|
|
||||||
var index = 0;
|
|
||||||
html += buttons.map(function (b) {
|
|
||||||
|
|
||||||
var dataIndex = ' data-index="' + index + '"';
|
|
||||||
index++;
|
|
||||||
return '<paper-button class="dialogButton"' + dataIndex + ' dialog-dismiss>' + b + '</paper-button>';
|
|
||||||
|
|
||||||
}).join('');
|
|
||||||
|
|
||||||
html += '</div>';
|
|
||||||
html += '</paper-dialog>';
|
|
||||||
|
|
||||||
$(document.body).append(html);
|
|
||||||
|
|
||||||
// This timeout is obviously messy but it's unclear how to determine when the webcomponent is ready for use
|
|
||||||
// element onload never fires
|
|
||||||
setTimeout(function () {
|
|
||||||
|
|
||||||
var dlg = document.getElementById(id);
|
|
||||||
|
|
||||||
$('.dialogButton', dlg).on('click', function () {
|
|
||||||
|
|
||||||
if (callback) {
|
|
||||||
callback(parseInt(this.getAttribute('data-index')));
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
// Has to be assigned a z-index after the call to .open()
|
|
||||||
dlg.addEventListener('iron-overlay-closed', function (e) {
|
|
||||||
|
|
||||||
dlg.parentNode.removeChild(dlg);
|
|
||||||
});
|
|
||||||
|
|
||||||
dlg.open();
|
|
||||||
|
|
||||||
}, 300);
|
|
||||||
};
|
|
||||||
});
|
|
|
@ -66,7 +66,11 @@
|
||||||
return o.ironIcon;
|
return o.ironIcon;
|
||||||
}).length;
|
}).length;
|
||||||
|
|
||||||
html += '<paper-menu>';
|
if (options.title && !renderIcon) {
|
||||||
|
html += '<paper-menu style="text-align:center;">';
|
||||||
|
} else {
|
||||||
|
html += '<paper-menu>';
|
||||||
|
}
|
||||||
for (var i = 0, length = options.items.length; i < length; i++) {
|
for (var i = 0, length = options.items.length; i < length; i++) {
|
||||||
|
|
||||||
var option = options.items[i];
|
var option = options.items[i];
|
||||||
|
|
|
@ -70,43 +70,6 @@
|
||||||
|
|
||||||
var header = document.querySelector('.viewMenuBar');
|
var header = document.querySelector('.viewMenuBar');
|
||||||
|
|
||||||
var headerSearchButton = header.querySelector('.headerSearchButton');
|
|
||||||
var btnCast = header.querySelector('.btnCast');
|
|
||||||
|
|
||||||
if (user.localUser) {
|
|
||||||
btnCast.classList.remove('hide');
|
|
||||||
|
|
||||||
if (headerSearchButton) {
|
|
||||||
headerSearchButton.classList.remove('hide');
|
|
||||||
}
|
|
||||||
|
|
||||||
requirejs(['voice/voice'], function () {
|
|
||||||
|
|
||||||
if (VoiceInputManager.isSupported()) {
|
|
||||||
header.querySelector('.headerVoiceButton').classList.remove('hide');
|
|
||||||
} else {
|
|
||||||
header.querySelector('.headerVoiceButton').classList.add('hide');
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
} else {
|
|
||||||
btnCast.classList.add('hide');
|
|
||||||
header.querySelector('.headerVoiceButton').classList.add('hide');
|
|
||||||
if (headerSearchButton) {
|
|
||||||
headerSearchButton.classList.add('hide');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var dashboardEntryHeaderButton = header.querySelector('.dashboardEntryHeaderButton');
|
|
||||||
if (dashboardEntryHeaderButton) {
|
|
||||||
if (user.canManageServer) {
|
|
||||||
dashboardEntryHeaderButton.classList.remove('hide');
|
|
||||||
} else {
|
|
||||||
dashboardEntryHeaderButton.classList.add('hide');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (user.name) {
|
if (user.name) {
|
||||||
if (user.imageUrl && AppInfo.enableUserImage) {
|
if (user.imageUrl && AppInfo.enableUserImage) {
|
||||||
|
|
||||||
|
@ -127,29 +90,59 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateLocalUser(user.localUser);
|
||||||
requiresUserRefresh = false;
|
requiresUserRefresh = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateLocalUser(user) {
|
||||||
|
|
||||||
|
var header = document.querySelector('.viewMenuBar');
|
||||||
|
|
||||||
|
var headerSearchButton = header.querySelector('.headerSearchButton');
|
||||||
|
var btnCast = header.querySelector('.btnCast');
|
||||||
|
var dashboardEntryHeaderButton = header.querySelector('.dashboardEntryHeaderButton');
|
||||||
|
|
||||||
|
if (user) {
|
||||||
|
btnCast.classList.remove('hide');
|
||||||
|
|
||||||
|
if (headerSearchButton) {
|
||||||
|
headerSearchButton.classList.remove('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dashboardEntryHeaderButton) {
|
||||||
|
if (user.Policy.IsAdministrator) {
|
||||||
|
dashboardEntryHeaderButton.classList.remove('hide');
|
||||||
|
} else {
|
||||||
|
dashboardEntryHeaderButton.classList.add('hide');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
requirejs(['voice/voice'], function () {
|
||||||
|
|
||||||
|
if (VoiceInputManager.isSupported()) {
|
||||||
|
header.querySelector('.headerVoiceButton').classList.remove('hide');
|
||||||
|
} else {
|
||||||
|
header.querySelector('.headerVoiceButton').classList.add('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
} else {
|
||||||
|
btnCast.classList.add('hide');
|
||||||
|
header.querySelector('.headerVoiceButton').classList.add('hide');
|
||||||
|
if (headerSearchButton) {
|
||||||
|
headerSearchButton.classList.add('hide');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dashboardEntryHeaderButton) {
|
||||||
|
dashboardEntryHeaderButton.classList.add('hide');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function removeUserFromHeader() {
|
function removeUserFromHeader() {
|
||||||
|
|
||||||
var header = document.querySelector('.viewMenuBar');
|
updateLocalUser(null);
|
||||||
|
|
||||||
header.querySelector('.headerVoiceButton').classList.add('hide');
|
|
||||||
|
|
||||||
var btnCast = header.querySelector('.btnCast');
|
|
||||||
if (btnCast) {
|
|
||||||
btnCast.classList.add('hide');
|
|
||||||
}
|
|
||||||
|
|
||||||
var headerSearchButton = header.querySelector('.headerSearchButton');
|
|
||||||
if (headerSearchButton) {
|
|
||||||
headerSearchButton.classList.add('hide');
|
|
||||||
}
|
|
||||||
|
|
||||||
var dashboardEntryHeaderButton = header.querySelector('.dashboardEntryHeaderButton');
|
|
||||||
if (dashboardEntryHeaderButton) {
|
|
||||||
dashboardEntryHeaderButton.classList.add('hide');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function bindMenuEvents() {
|
function bindMenuEvents() {
|
||||||
|
@ -933,15 +926,19 @@
|
||||||
initializeApiClient(window.ApiClient);
|
initializeApiClient(window.ApiClient);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var mainDrawerPanel = document.querySelector('.mainDrawerPanel');
|
||||||
|
mainDrawerPanel.addEventListener('iron-select', onMainDrawerSelect);
|
||||||
|
|
||||||
|
renderHeader();
|
||||||
|
|
||||||
Events.on(ConnectionManager, 'apiclientcreated', function (e, apiClient) {
|
Events.on(ConnectionManager, 'apiclientcreated', function (e, apiClient) {
|
||||||
initializeApiClient(apiClient);
|
initializeApiClient(apiClient);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Events.on(ConnectionManager, 'localusersignedin', function () {
|
Events.on(ConnectionManager, 'localusersignedin', function (e, user) {
|
||||||
requiresLibraryMenuRefresh = true;
|
requiresLibraryMenuRefresh = true;
|
||||||
requiresDrawerRefresh = true;
|
requiresDrawerRefresh = true;
|
||||||
ConnectionManager.user(window.ApiClient).then(addUserToHeader);
|
ConnectionManager.user(ConnectionManager.getApiClient(user.ServerId)).then(addUserToHeader);
|
||||||
});
|
});
|
||||||
|
|
||||||
Events.on(ConnectionManager, 'localusersignedout', function () {
|
Events.on(ConnectionManager, 'localusersignedout', function () {
|
||||||
|
@ -954,11 +951,6 @@
|
||||||
updateCastIcon();
|
updateCastIcon();
|
||||||
});
|
});
|
||||||
|
|
||||||
var mainDrawerPanel = document.querySelector('.mainDrawerPanel');
|
|
||||||
mainDrawerPanel.addEventListener('iron-select', onMainDrawerSelect);
|
|
||||||
|
|
||||||
renderHeader();
|
|
||||||
|
|
||||||
})(window, document, jQuery, window.devicePixelRatio);
|
})(window, document, jQuery, window.devicePixelRatio);
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
|
|
|
@ -392,25 +392,46 @@
|
||||||
|
|
||||||
if (playerInfo.supportedCommands.indexOf('EndSession') != -1) {
|
if (playerInfo.supportedCommands.indexOf('EndSession') != -1) {
|
||||||
|
|
||||||
var options = {
|
var menuItems = [];
|
||||||
callback: function (result) {
|
|
||||||
|
|
||||||
if (result == 0) {
|
menuItems.push({
|
||||||
MediaController.getCurrentPlayer().endSession();
|
name: Globalize.translate('ButtonYes'),
|
||||||
}
|
id: 'yes'
|
||||||
|
|
||||||
if (result != 2) {
|
|
||||||
self.setDefaultPlayerActive();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
message: Globalize.translate('ConfirmEndPlayerSession'),
|
|
||||||
title: Globalize.translate('HeaderDisconnectFromPlayer'),
|
|
||||||
buttons: [Globalize.translate('ButtonYes'), Globalize.translate('ButtonNo'), Globalize.translate('ButtonCancel')]
|
|
||||||
};
|
|
||||||
|
|
||||||
require(['dialog'], function (dialog) {
|
|
||||||
dialog(options);
|
|
||||||
});
|
});
|
||||||
|
menuItems.push({
|
||||||
|
name: Globalize.translate('ButtonNo'),
|
||||||
|
id: 'no'
|
||||||
|
});
|
||||||
|
menuItems.push({
|
||||||
|
name: Globalize.translate('ButtonCancel'),
|
||||||
|
id: 'cancel'
|
||||||
|
});
|
||||||
|
|
||||||
|
require(['actionsheet'], function () {
|
||||||
|
|
||||||
|
ActionSheetElement.show({
|
||||||
|
items: menuItems,
|
||||||
|
//positionTo: positionTo,
|
||||||
|
title: Globalize.translate('ConfirmEndPlayerSession'),
|
||||||
|
callback: function (id) {
|
||||||
|
|
||||||
|
switch (id) {
|
||||||
|
|
||||||
|
case 'yes':
|
||||||
|
MediaController.getCurrentPlayer().endSession();
|
||||||
|
self.setDefaultPlayerActive();
|
||||||
|
break;
|
||||||
|
case 'no':
|
||||||
|
self.setDefaultPlayerActive();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
|
@ -1789,10 +1789,14 @@ var AppInfo = {};
|
||||||
paths.dialog = "cordova/dialog";
|
paths.dialog = "cordova/dialog";
|
||||||
paths.prompt = "cordova/prompt";
|
paths.prompt = "cordova/prompt";
|
||||||
paths.sharingwidget = "cordova/sharingwidget";
|
paths.sharingwidget = "cordova/sharingwidget";
|
||||||
|
paths.serverdiscovery = "cordova/serverdiscovery";
|
||||||
|
paths.wakeonlan = "cordova/wakeonlan";
|
||||||
} else {
|
} else {
|
||||||
paths.dialog = "components/dialog";
|
paths.dialog = "components/dialog";
|
||||||
paths.prompt = "components/prompt";
|
paths.prompt = "components/prompt";
|
||||||
paths.sharingwidget = "components/sharingwidget";
|
paths.sharingwidget = "components/sharingwidget";
|
||||||
|
paths.serverdiscovery = "apiclient/serverdiscovery";
|
||||||
|
paths.wakeonlan = "apiclient/wakeonlan";
|
||||||
}
|
}
|
||||||
|
|
||||||
var sha1Path = bowerPath + "/cryptojslib/components/sha1-min";
|
var sha1Path = bowerPath + "/cryptojslib/components/sha1-min";
|
||||||
|
@ -1904,13 +1908,6 @@ var AppInfo = {};
|
||||||
return appStorage;
|
return appStorage;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (Dashboard.isRunningInCordova()) {
|
|
||||||
define("serverdiscovery", ["cordova/serverdiscovery"]);
|
|
||||||
define("wakeonlan", ["cordova/wakeonlan"]);
|
|
||||||
} else {
|
|
||||||
define("serverdiscovery", ["apiclient/serverdiscovery"]);
|
|
||||||
define("wakeonlan", ["apiclient/wakeonlan"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Dashboard.isRunningInCordova()) {
|
if (Dashboard.isRunningInCordova()) {
|
||||||
define("localassetmanager", ["cordova/localassetmanager"]);
|
define("localassetmanager", ["cordova/localassetmanager"]);
|
||||||
|
@ -1980,7 +1977,7 @@ var AppInfo = {};
|
||||||
define("fileupload", ["apiclient/fileupload"]);
|
define("fileupload", ["apiclient/fileupload"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
define("buttonenabled", ["components/buttonenabled"]);
|
define("buttonenabled", ["legacy/buttonenabled"]);
|
||||||
|
|
||||||
var deps = [];
|
var deps = [];
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var page = $(form).parents('.page');
|
var page = $(form).parents('.page')[0];
|
||||||
|
|
||||||
SupporterKeyPage.load(page);
|
SupporterKeyPage.load(page);
|
||||||
});
|
});
|
||||||
|
|
|
@ -882,7 +882,7 @@
|
||||||
"ButtonGuide": "Guide",
|
"ButtonGuide": "Guide",
|
||||||
"ButtonRecordedTv": "Recorded TV",
|
"ButtonRecordedTv": "Recorded TV",
|
||||||
"HeaderDisconnectFromPlayer": "Disconnect from Player",
|
"HeaderDisconnectFromPlayer": "Disconnect from Player",
|
||||||
"ConfirmEndPlayerSession": "Would you like to shutdown the app on the remote device?",
|
"ConfirmEndPlayerSession": "Would you like to close Emby on the device?",
|
||||||
"ButtonYes": "Yes",
|
"ButtonYes": "Yes",
|
||||||
"ButtonNo": "No",
|
"ButtonNo": "No",
|
||||||
"ButtonRestorePreviousPurchase": "Restore Purchase",
|
"ButtonRestorePreviousPurchase": "Restore Purchase",
|
||||||
|
|
|
@ -892,7 +892,7 @@
|
||||||
"ButtonGuide": "Guide",
|
"ButtonGuide": "Guide",
|
||||||
"ButtonRecordedTv": "Recorded TV",
|
"ButtonRecordedTv": "Recorded TV",
|
||||||
"HeaderDisconnectFromPlayer": "Disconnect from Player",
|
"HeaderDisconnectFromPlayer": "Disconnect from Player",
|
||||||
"ConfirmEndPlayerSession": "Would you like to shutdown the app on the remote device?",
|
"ConfirmEndPlayerSession": "Would you like to close Emby on the device?",
|
||||||
"ButtonYes": "Yes",
|
"ButtonYes": "Yes",
|
||||||
"ButtonNo": "No",
|
"ButtonNo": "No",
|
||||||
"ButtonRestorePreviousPurchase": "Restore Purchase",
|
"ButtonRestorePreviousPurchase": "Restore Purchase",
|
||||||
|
|
|
@ -59,21 +59,23 @@
|
||||||
|
|
||||||
function onIconClick() {
|
function onIconClick() {
|
||||||
|
|
||||||
require(['dialog'], function (dialog) {
|
// todo: switch this to action sheet
|
||||||
dialog({
|
|
||||||
|
|
||||||
title: "Happy Halloween",
|
//require(['dialog'], function (dialog) {
|
||||||
message: "Happy Halloween from the Emby Team. We hope your Halloween is spooktacular! Would you like to allow the Halloween theme to continue?",
|
// dialog({
|
||||||
callback: function (result) {
|
|
||||||
|
|
||||||
if (result == 1) {
|
// title: "Happy Halloween",
|
||||||
destroyTheme();
|
// message: "Happy Halloween from the Emby Team. We hope your Halloween is spooktacular! Would you like to allow the Halloween theme to continue?",
|
||||||
}
|
// callback: function (result) {
|
||||||
},
|
|
||||||
|
|
||||||
buttons: [Globalize.translate('ButtonYes'), Globalize.translate('ButtonNo')]
|
// if (result == 1) {
|
||||||
});
|
// destroyTheme();
|
||||||
});
|
// }
|
||||||
|
// },
|
||||||
|
|
||||||
|
// buttons: [Globalize.translate('ButtonYes'), Globalize.translate('ButtonNo')]
|
||||||
|
// });
|
||||||
|
//});
|
||||||
}
|
}
|
||||||
|
|
||||||
function destroyTheme() {
|
function destroyTheme() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue