mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge branch 'master' into copy-stream-url
This commit is contained in:
commit
505cda6f76
19 changed files with 673 additions and 4164 deletions
8
.npmignore
Normal file
8
.npmignore
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
.gitattributes
|
||||||
|
.github
|
||||||
|
.drone.yml
|
||||||
|
.eslintrc.yml
|
||||||
|
run-eslint.sh
|
||||||
|
webpack.config.js
|
||||||
|
yarn.lock
|
||||||
|
src
|
|
@ -25,6 +25,7 @@
|
||||||
- [DrPandemic](https://github.com/drpandemic)
|
- [DrPandemic](https://github.com/drpandemic)
|
||||||
- [Oddstr13](https://github.com/oddstr13)
|
- [Oddstr13](https://github.com/oddstr13)
|
||||||
- [petermcneil](https://github.com/petermcneil)
|
- [petermcneil](https://github.com/petermcneil)
|
||||||
|
- [lewazo](https://github.com/lewazo)
|
||||||
- [Raghu Saxena](https://github.com/ckcr4lyf)
|
- [Raghu Saxena](https://github.com/ckcr4lyf)
|
||||||
|
|
||||||
# Emby Contributors
|
# Emby Contributors
|
||||||
|
|
13
package.json
13
package.json
|
@ -3,18 +3,23 @@
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"description": "Web interface for Jellyfin",
|
"description": "Web interface for Jellyfin",
|
||||||
"repository": "https://github.com/jellyfin/jellyfin-web",
|
"repository": "https://github.com/jellyfin/jellyfin-web",
|
||||||
"license": "GPL-2",
|
"license": "GPL-2.0-or-later",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"connect": "^3.6.6",
|
"copy-webpack-plugin": "^5.0.3",
|
||||||
"css-loader": "^2.1.0",
|
"css-loader": "^2.1.0",
|
||||||
|
"eslint": "^5.16.0",
|
||||||
"file-loader": "^3.0.1",
|
"file-loader": "^3.0.1",
|
||||||
"serve-static": "^1.13.2",
|
|
||||||
"style-loader": "^0.23.1",
|
"style-loader": "^0.23.1",
|
||||||
"webpack": "^4.29.5",
|
"webpack": "^4.29.5",
|
||||||
"webpack-cli": "^3.2.3"
|
"webpack-cli": "^3.2.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"howler": "^2.1.1",
|
|
||||||
"jstree": "^3.3.7"
|
"jstree": "^3.3.7"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"dev": "webpack --mode development",
|
||||||
|
"build": "webpack --mode production",
|
||||||
|
"lint": "eslint src",
|
||||||
|
"prepare": "webpack --mode production"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
9
src/bundle.js
Normal file
9
src/bundle.js
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
/**
|
||||||
|
* require.js module definitions bundled by webpack
|
||||||
|
*/
|
||||||
|
// Use define from require.js not webpack's define
|
||||||
|
var _define = window.define;
|
||||||
|
|
||||||
|
var jstree = require("jstree");
|
||||||
|
require("jstree/dist/themes/default/style.css");
|
||||||
|
_define("jstree", ["jQuery"], function() { return jstree; });
|
|
@ -94,7 +94,6 @@
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
flex-grow: 1;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -880,6 +880,16 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuild
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function canPlaySomeItemInCollection(items) {
|
||||||
|
var i = 0;
|
||||||
|
for (length = items.length; i < length; i++) {
|
||||||
|
if (playbackManager.canPlay(items[i])) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
function renderCollectionItems(page, parentItem, types, items) {
|
function renderCollectionItems(page, parentItem, types, items) {
|
||||||
page.querySelector(".collectionItems").innerHTML = "";
|
page.querySelector(".collectionItems").innerHTML = "";
|
||||||
var i, length;
|
var i, length;
|
||||||
|
@ -904,6 +914,12 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "cardBuild
|
||||||
renderChildren(page, parentItem)
|
renderChildren(page, parentItem)
|
||||||
};
|
};
|
||||||
for (i = 0, length = containers.length; i < length; i++) containers[i].notifyRefreshNeeded = notifyRefreshNeeded
|
for (i = 0, length = containers.length; i < length; i++) containers[i].notifyRefreshNeeded = notifyRefreshNeeded
|
||||||
|
|
||||||
|
// if nothing in the collection can be played hide play and shuffle buttons
|
||||||
|
if (!canPlaySomeItemInCollection(items)) {
|
||||||
|
hideAll(page, "btnPlay", false);
|
||||||
|
hideAll(page, "btnShuffle", false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function renderCollectionItemType(page, parentItem, type, items) {
|
function renderCollectionItemType(page, parentItem, type, items) {
|
||||||
|
|
|
@ -230,7 +230,6 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width:40em) {
|
@media all and (min-width:40em) {
|
||||||
|
|
||||||
.dashboardDocument .adminDrawerLogo,
|
.dashboardDocument .adminDrawerLogo,
|
||||||
.dashboardDocument .mainDrawerButton {
|
.dashboardDocument .mainDrawerButton {
|
||||||
display: none !important
|
display: none !important
|
||||||
|
@ -252,21 +251,11 @@
|
||||||
margin-top: 5em !important
|
margin-top: 5em !important
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboardDocument withSectionTabs .mainDrawer-scrollContainer {
|
|
||||||
margin-top: 8.7em !important
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboardDocument .skinBody {
|
.dashboardDocument .skinBody {
|
||||||
left: 20em
|
left: 20em
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width:40em) and (max-width:84em) {
|
|
||||||
.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer {
|
|
||||||
margin-top: 8.4em !important
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@media all and (max-width:60em) {
|
@media all and (max-width:60em) {
|
||||||
.libraryDocument .mainDrawerButton {
|
.libraryDocument .mainDrawerButton {
|
||||||
display: none
|
display: none
|
||||||
|
@ -275,11 +264,11 @@
|
||||||
|
|
||||||
@media all and (max-width:84em) {
|
@media all and (max-width:84em) {
|
||||||
.withSectionTabs .headerTop {
|
.withSectionTabs .headerTop {
|
||||||
padding-bottom: .2em
|
padding-bottom: 0.2em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sectionTabs {
|
.sectionTabs {
|
||||||
font-size: 83.5%
|
font-size: 83.5%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -315,12 +304,8 @@
|
||||||
top: 5.7em !important
|
top: 5.7em !important
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboardDocument.withSectionTabs .mainDrawer-scrollContainer {
|
|
||||||
margin-top: 6.1em !important
|
|
||||||
}
|
|
||||||
|
|
||||||
.dashboardDocument .mainDrawer-scrollContainer {
|
.dashboardDocument .mainDrawer-scrollContainer {
|
||||||
margin-top: 6.3em !important
|
margin-top: 6em !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.preload {
|
.preload {
|
||||||
background-color: #000;
|
background-color: #101010;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hide, .mouseIdle .hide-mouse-idle, .mouseIdle-tv .hide-mouse-idle-tv {
|
.hide, .mouseIdle .hide-mouse-idle, .mouseIdle-tv .hide-mouse-idle-tv {
|
||||||
|
|
|
@ -1,12 +1,29 @@
|
||||||
! function() {
|
(function() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
function loadApp() {
|
function injectScriptElement(src, onload) {
|
||||||
var script = document.createElement("script"),
|
if (!src) {
|
||||||
src = "./scripts/site.js";
|
return;
|
||||||
self.dashboardVersion && (src += "?v=" + self.dashboardVersion), script.src = src, document.head.appendChild(script)
|
}
|
||||||
}! function() {
|
|
||||||
var src, script = document.createElement("script");
|
var script = document.createElement("script");
|
||||||
src = self.Promise ? "./bower_components/alameda/alameda.js" : "./bower_components/requirejs/require.js", self.dashboardVersion && (src += "?v=" + self.dashboardVersion), script.src = src, script.onload = loadApp, document.head.appendChild(script)
|
if (self.dashboardVersion) {
|
||||||
}()
|
src += "?v=" + self.dashboardVersion;
|
||||||
}();
|
}
|
||||||
|
script.src = src;
|
||||||
|
|
||||||
|
if (onload) {
|
||||||
|
script.onload = onload;
|
||||||
|
}
|
||||||
|
|
||||||
|
document.head.appendChild(script);
|
||||||
|
}
|
||||||
|
|
||||||
|
injectScriptElement(
|
||||||
|
self.Promise ? "./bower_components/alameda/alameda.js" : "./bower_components/requirejs/require.js",
|
||||||
|
function() {
|
||||||
|
// onload of require library
|
||||||
|
injectScriptElement("./scripts/site.js");
|
||||||
|
}
|
||||||
|
);
|
||||||
|
})();
|
||||||
|
|
|
@ -149,7 +149,9 @@ define(["datetime", "jQuery", "material-icons"], function(datetime, $) {
|
||||||
nodesToLoad = [], selectedNodeId = null, $.jstree.destroy(), $(".libraryTree", page).jstree({
|
nodesToLoad = [], selectedNodeId = null, $.jstree.destroy(), $(".libraryTree", page).jstree({
|
||||||
plugins: ["wholerow"],
|
plugins: ["wholerow"],
|
||||||
core: {
|
core: {
|
||||||
check_callback: !0,
|
// Disable animations because jQuery slim does not support them
|
||||||
|
animation: false,
|
||||||
|
check_callback: true,
|
||||||
data: function(node, callback) {
|
data: function(node, callback) {
|
||||||
loadNode(page, this, node, openItems, selectedId, currentUser, callback)
|
loadNode(page, this, node, openItems, selectedId, currentUser, callback)
|
||||||
},
|
},
|
||||||
|
@ -220,4 +222,4 @@ define(["datetime", "jQuery", "material-icons"], function(datetime, $) {
|
||||||
getCurrentItemId: getCurrentItemId,
|
getCurrentItemId: getCurrentItemId,
|
||||||
setCurrentItemId: setCurrentItemId
|
setCurrentItemId: setCurrentItemId
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -132,7 +132,9 @@ define(["connectionManager", "listView", "cardBuilder", "imageLoader", "libraryB
|
||||||
IncludeItemTypes: "MusicAlbum",
|
IncludeItemTypes: "MusicAlbum",
|
||||||
PersonTypes: "",
|
PersonTypes: "",
|
||||||
ArtistIds: "",
|
ArtistIds: "",
|
||||||
AlbumArtistIds: ""
|
AlbumArtistIds: "",
|
||||||
|
SortOrder: "Descending",
|
||||||
|
SortBy: "ProductionYear,Sortname"
|
||||||
}, {
|
}, {
|
||||||
shape: "square",
|
shape: "square",
|
||||||
playFromHere: !0,
|
playFromHere: !0,
|
||||||
|
|
|
@ -818,12 +818,15 @@ var AppInfo = {};
|
||||||
text: "components/require/requiretext"
|
text: "components/require/requiretext"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
bundles: {
|
||||||
|
bundle: ["jstree"]
|
||||||
|
},
|
||||||
urlArgs: urlArgs,
|
urlArgs: urlArgs,
|
||||||
paths: paths,
|
paths: paths,
|
||||||
onError: onRequireJsError
|
onError: onRequireJsError
|
||||||
});
|
});
|
||||||
requirejs.onError = onRequireJsError;
|
requirejs.onError = onRequireJsError;
|
||||||
define("jstree", ["thirdparty/jstree/jstree", "css!thirdparty/jstree/themes/default/style.css"], returnFirstDependency);
|
|
||||||
define("dashboardcss", ["css!css/dashboard"], returnFirstDependency);
|
define("dashboardcss", ["css!css/dashboard"], returnFirstDependency);
|
||||||
define("slideshow", [componentsPath + "/slideshow/slideshow"], returnFirstDependency);
|
define("slideshow", [componentsPath + "/slideshow/slideshow"], returnFirstDependency);
|
||||||
define("fetch", [bowerPath + "/fetch/fetch"], returnFirstDependency);
|
define("fetch", [bowerPath + "/fetch/fetch"], returnFirstDependency);
|
||||||
|
|
|
@ -640,6 +640,7 @@
|
||||||
"LabelFailed": "Failed",
|
"LabelFailed": "Failed",
|
||||||
"LabelFileOrUrl": "File or url:",
|
"LabelFileOrUrl": "File or url:",
|
||||||
"LabelFinish": "Finish",
|
"LabelFinish": "Finish",
|
||||||
|
"LabelFolder": "Folder:",
|
||||||
"LabelFont": "Font:",
|
"LabelFont": "Font:",
|
||||||
"LabelForgotPasswordUsernameHelp": "Enter your username, if you remember it.",
|
"LabelForgotPasswordUsernameHelp": "Enter your username, if you remember it.",
|
||||||
"LabelFormat": "Format:",
|
"LabelFormat": "Format:",
|
||||||
|
@ -1348,7 +1349,7 @@
|
||||||
"TabMyPlugins": "My Plugins",
|
"TabMyPlugins": "My Plugins",
|
||||||
"TabNetworks": "Networks",
|
"TabNetworks": "Networks",
|
||||||
"TabNetworking": "Networking",
|
"TabNetworking": "Networking",
|
||||||
"TabNfoSettings": "NFO settings",
|
"TabNfoSettings": "NFO Settings",
|
||||||
"TabNotifications": "Notifications",
|
"TabNotifications": "Notifications",
|
||||||
"TabOther": "Other",
|
"TabOther": "Other",
|
||||||
"TabParentalControl": "Parental Control",
|
"TabParentalControl": "Parental Control",
|
||||||
|
|
2926
src/thirdparty/jstree/jstree.js
vendored
2926
src/thirdparty/jstree/jstree.js
vendored
File diff suppressed because it is too large
Load diff
BIN
src/thirdparty/jstree/themes/default/32px.png
vendored
BIN
src/thirdparty/jstree/themes/default/32px.png
vendored
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB |
1003
src/thirdparty/jstree/themes/default/style.css
vendored
1003
src/thirdparty/jstree/themes/default/style.css
vendored
File diff suppressed because it is too large
Load diff
BIN
src/thirdparty/jstree/themes/default/throbber.gif
vendored
BIN
src/thirdparty/jstree/themes/default/throbber.gif
vendored
Binary file not shown.
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,35 +1,44 @@
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const CopyPlugin = require('copy-webpack-plugin');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
context: __dirname + '/src',
|
context: path.resolve(__dirname, 'src'),
|
||||||
entry: './scripts/site.js',
|
entry: './bundle.js',
|
||||||
output: {
|
output: {
|
||||||
filename: 'main.js',
|
filename: 'bundle.js',
|
||||||
path: path.resolve(__dirname, 'dist')
|
path: path.resolve(__dirname, 'dist'),
|
||||||
|
libraryTarget: 'amd'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
externals: [{
|
||||||
|
jquery: {
|
||||||
|
amd: "jQuery"
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
|
||||||
resolve: {
|
resolve: {
|
||||||
modules: [
|
modules: [
|
||||||
path.resolve(__dirname, 'src/scripts'),
|
path.resolve(__dirname, 'node_modules')
|
||||||
path.resolve(__dirname, 'src/components'),
|
|
||||||
path.resolve(__dirname, 'src/components/playback'),
|
|
||||||
path.resolve(__dirname, 'src/components/emby-button'),
|
|
||||||
path.resolve(__dirname, 'src/components/usersettings'),
|
|
||||||
path.resolve(__dirname, 'src/components/images'),
|
|
||||||
path.resolve(__dirname, 'src/bower_components'),
|
|
||||||
path.resolve(__dirname, 'src/bower_components/apiclient'),
|
|
||||||
path.resolve(__dirname, 'src/bower_components/apiclient/sync'),
|
|
||||||
path.resolve(__dirname, 'src/components/cardbuilder'),
|
|
||||||
'node_modules'
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.css$/,
|
test: /\.css$/i,
|
||||||
use: ['style-loader', 'css-loader']
|
use: ['style-loader', 'css-loader']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.(png|jpg|gif)$/i,
|
||||||
|
use: ['file-loader']
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
};
|
|
||||||
|
plugins: [
|
||||||
|
new CopyPlugin([{
|
||||||
|
from: '**/*',
|
||||||
|
to: '.'
|
||||||
|
}])
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue