update components
This commit is contained in:
parent
a4431538c7
commit
b65adf700f
2 changed files with 49 additions and 49 deletions
|
@ -16,12 +16,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.1.62",
|
"version": "1.1.64",
|
||||||
"_release": "1.1.62",
|
"_release": "1.1.64",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.1.62",
|
"tag": "1.1.64",
|
||||||
"commit": "47fb2042a7e5b8ea4471c67fc3e9922e29e23f07"
|
"commit": "09ad84b364cc201acfa1c7700142e2043bf23db9"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "~1.1.5",
|
"_target": "~1.1.5",
|
||||||
|
|
|
@ -1,5 +1,23 @@
|
||||||
define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'browser', 'pageJs'], function (loading, viewManager, skinManager, pluginManager, backdrop, browser, page) {
|
define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'browser', 'pageJs'], function (loading, viewManager, skinManager, pluginManager, backdrop, browser, page) {
|
||||||
|
|
||||||
|
var embyRouter = {
|
||||||
|
showLocalLogin: function (apiClient, serverId, manualLogin) {
|
||||||
|
|
||||||
|
var pageName = manualLogin ? 'manuallogin' : 'login';
|
||||||
|
|
||||||
|
show('/startup/' + pageName + '.html?serverid=' + serverId);
|
||||||
|
},
|
||||||
|
showSelectServer: function () {
|
||||||
|
show('/startup/selectserver.html');
|
||||||
|
},
|
||||||
|
showWelcome: function () {
|
||||||
|
show('/startup/welcome.html');
|
||||||
|
},
|
||||||
|
showSettings: function () {
|
||||||
|
show('/settings/settings.html');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
var connectionManager;
|
var connectionManager;
|
||||||
|
|
||||||
function redirectToLogin() {
|
function redirectToLogin() {
|
||||||
|
@ -28,28 +46,28 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
|
||||||
result.ApiClient.getPublicUsers().then(function (users) {
|
result.ApiClient.getPublicUsers().then(function (users) {
|
||||||
|
|
||||||
if (users.length) {
|
if (users.length) {
|
||||||
show('/startup/login.html?serverid=' + result.Servers[0].Id);
|
embyRouter.showLocalLogin(result.ApiClient, result.Servers[0].Id);
|
||||||
} else {
|
} else {
|
||||||
goToLocalLogin(result.ApiClient, result.Servers[0].Id);
|
embyRouter.showLocalLogin(result.ApiClient, result.Servers[0].Id, true);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MediaBrowser.ConnectionState.ServerSelection:
|
case MediaBrowser.ConnectionState.ServerSelection:
|
||||||
{
|
{
|
||||||
show('/startup/selectserver.html');
|
embyRouter.showSelectServer();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MediaBrowser.ConnectionState.ConnectSignIn:
|
case MediaBrowser.ConnectionState.ConnectSignIn:
|
||||||
{
|
{
|
||||||
show('/startup/welcome.html');
|
embyRouter.showWelcome();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MediaBrowser.ConnectionState.ServerUpdateNeeded:
|
case MediaBrowser.ConnectionState.ServerUpdateNeeded:
|
||||||
{
|
{
|
||||||
require(['alert'], function (alert) {
|
require(['alert'], function (alert) {
|
||||||
alert(Globalize.translate('core#ServerUpdateNeeded', '<a href="https://emby.media">https://emby.media</a>')).then(function () {
|
alert(Globalize.translate('core#ServerUpdateNeeded', '<a href="https://emby.media">https://emby.media</a>')).then(function () {
|
||||||
show('/startup/selectserver.html');
|
embyRouter.showSelectServer();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -59,11 +77,6 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function goToLocalLogin(apiClient, serverId) {
|
|
||||||
|
|
||||||
show('/startup/manuallogin.html?serverid=' + serverId);
|
|
||||||
}
|
|
||||||
|
|
||||||
var cacheParam = new Date().getTime();
|
var cacheParam = new Date().getTime();
|
||||||
function loadContentUrl(ctx, next, route, request) {
|
function loadContentUrl(ctx, next, route, request) {
|
||||||
|
|
||||||
|
@ -71,6 +84,7 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
|
||||||
|
|
||||||
if (url.toLowerCase().indexOf('http') != 0 && url.indexOf('file:') != 0) {
|
if (url.toLowerCase().indexOf('http') != 0 && url.indexOf('file:') != 0) {
|
||||||
|
|
||||||
|
// Put a slash at the beginning but make sure to avoid a double slash
|
||||||
if (url.indexOf('/') != 0) {
|
if (url.indexOf('/') != 0) {
|
||||||
|
|
||||||
url = '/' + url;
|
url = '/' + url;
|
||||||
|
@ -413,14 +427,6 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
|
||||||
skinManager.getCurrentSkin().setTitle(title);
|
skinManager.getCurrentSkin().setTitle(title);
|
||||||
}
|
}
|
||||||
|
|
||||||
function gotoSettings() {
|
|
||||||
show('/settings/settings.html');
|
|
||||||
}
|
|
||||||
|
|
||||||
function selectServer() {
|
|
||||||
show('/startup/selectserver.html');
|
|
||||||
}
|
|
||||||
|
|
||||||
function showVideoOsd() {
|
function showVideoOsd() {
|
||||||
var skin = skinManager.getCurrentSkin();
|
var skin = skinManager.getCurrentSkin();
|
||||||
|
|
||||||
|
@ -478,33 +484,27 @@ define(['loading', 'viewManager', 'skinManager', 'pluginManager', 'backdrop', 'b
|
||||||
|
|
||||||
setBaseRoute();
|
setBaseRoute();
|
||||||
|
|
||||||
return {
|
embyRouter.addRoute = addRoute;
|
||||||
addRoute: addRoute,
|
embyRouter.param = param;
|
||||||
param: param,
|
embyRouter.back = back;
|
||||||
back: back,
|
embyRouter.show = show;
|
||||||
show: show,
|
embyRouter.start = start;
|
||||||
start: start,
|
embyRouter.baseUrl = baseUrl;
|
||||||
baseUrl: baseUrl,
|
embyRouter.canGoBack = canGoBack;
|
||||||
canGoBack: canGoBack,
|
embyRouter.current = current;
|
||||||
current: current,
|
embyRouter.redirectToLogin = redirectToLogin;
|
||||||
redirectToLogin: redirectToLogin,
|
embyRouter.goHome = goHome;
|
||||||
goHome: goHome,
|
embyRouter.showItem = showItem;
|
||||||
gotoSettings: gotoSettings,
|
embyRouter.setTitle = setTitle;
|
||||||
showItem: showItem,
|
embyRouter.setTransparency = setTransparency;
|
||||||
setTitle: setTitle,
|
embyRouter.getRoutes = getRoutes;
|
||||||
selectServer: selectServer,
|
embyRouter.pushState = pushState;
|
||||||
showVideoOsd: showVideoOsd,
|
embyRouter.enableNativeHistory = enableNativeHistory;
|
||||||
setTransparency: setTransparency,
|
embyRouter.TransparencyLevel = {
|
||||||
getRoutes: getRoutes,
|
None: 0,
|
||||||
|
Backdrop: 1,
|
||||||
pushState: pushState,
|
Full: 2
|
||||||
|
|
||||||
TransparencyLevel: {
|
|
||||||
None: 0,
|
|
||||||
Backdrop: 1,
|
|
||||||
Full: 2
|
|
||||||
},
|
|
||||||
enableNativeHistory: enableNativeHistory
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
return embyRouter;
|
||||||
});
|
});
|
Loading…
Add table
Add a link
Reference in a new issue