1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

using NativeShell api for native apps in shell.js

This commit is contained in:
vitorsemeano 2019-03-16 18:11:46 +00:00
parent 60c0e58c64
commit 3de82f210a

View file

@ -2,8 +2,13 @@ define([], function () {
'use strict'; 'use strict';
return { return {
openUrl: function (url) { openUrl: function (url, target) {
window.open(url, '_blank'); if (window.NativeShell) {
window.NativeShell.openUrl(url, target);
} else {
window.open(url, target || '_blank');
}
}, },
canExec: false, canExec: false,
exec: function (options) { exec: function (options) {
@ -12,10 +17,14 @@ define([], function () {
return Promise.reject(); return Promise.reject();
}, },
enableFullscreen: function () { enableFullscreen: function () {
// do nothing since this is for native apps if (window.NativeShell) {
window.NativeShell.enableFullscreen();
}
}, },
disableFullscreen: function () { disableFullscreen: function () {
// do nothing since this is for native apps if (window.NativeShell) {
window.NativeShell.disableFullscreen();
}
} }
}; };
}); });