mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #1366 from jellyfin/refactor
Update casing for some files and add placeholder elements
This commit is contained in:
commit
2c4f8d928a
22 changed files with 79 additions and 58 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -1,6 +1,3 @@
|
||||||
# config
|
|
||||||
config.json
|
|
||||||
|
|
||||||
# npm
|
# npm
|
||||||
dist
|
dist
|
||||||
web
|
web
|
||||||
|
@ -10,5 +7,5 @@ node_modules
|
||||||
.idea
|
.idea
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
#log
|
# log
|
||||||
yarn-error.log
|
yarn-error.log
|
||||||
|
|
|
@ -111,10 +111,10 @@
|
||||||
"src/components/playmenu.js",
|
"src/components/playmenu.js",
|
||||||
"src/components/sanatizefilename.js",
|
"src/components/sanatizefilename.js",
|
||||||
"src/components/scrollManager.js",
|
"src/components/scrollManager.js",
|
||||||
"src/components/syncplay/groupSelectionMenu.js",
|
"src/components/syncPlay/groupSelectionMenu.js",
|
||||||
"src/components/syncplay/playbackPermissionManager.js",
|
"src/components/syncPlay/playbackPermissionManager.js",
|
||||||
"src/components/syncplay/syncPlayManager.js",
|
"src/components/syncPlay/syncPlayManager.js",
|
||||||
"src/components/syncplay/timeSyncManager.js",
|
"src/components/syncPlay/timeSyncManager.js",
|
||||||
"src/plugins/bookPlayer/plugin.js",
|
"src/plugins/bookPlayer/plugin.js",
|
||||||
"src/plugins/bookPlayer/tableOfContent.js",
|
"src/plugins/bookPlayer/tableOfContent.js",
|
||||||
"src/plugins/photoPlayer/plugin.js",
|
"src/plugins/photoPlayer/plugin.js",
|
||||||
|
|
|
@ -597,6 +597,7 @@
|
||||||
.detailImageContainer {
|
.detailImageContainer {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: -25vh;
|
margin-top: -25vh;
|
||||||
|
margin-bottom: 10vh;
|
||||||
float: left;
|
float: left;
|
||||||
width: 25vw;
|
width: 25vw;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
|
@ -641,7 +642,8 @@ div.itemDetailGalleryLink.defaultCardBackground {
|
||||||
}
|
}
|
||||||
|
|
||||||
.itemDetailGalleryLink.defaultCardBackground {
|
.itemDetailGalleryLink.defaultCardBackground {
|
||||||
height: 23vw; /* Dirty hack to get it to look somewhat square. Less than ideal. */
|
/* Dirty hack to get it to look somewhat square. Less than ideal. */
|
||||||
|
height: 23vw;
|
||||||
}
|
}
|
||||||
|
|
||||||
.itemDetailGalleryLink.defaultCardBackground > .material-icons {
|
.itemDetailGalleryLink.defaultCardBackground > .material-icons {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Module that manages the SyncPlay feature.
|
* Module that manages the SyncPlay feature.
|
||||||
* @module components/syncplay/syncPlayManager
|
* @module components/syncPlay/syncPlayManager
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import events from 'events';
|
import events from 'events';
|
|
@ -1,6 +1,6 @@
|
||||||
/**
|
/**
|
||||||
* Module that manages time syncing with server.
|
* Module that manages time syncing with server.
|
||||||
* @module components/syncplay/timeSyncManager
|
* @module components/syncPlay/timeSyncManager
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import events from 'events';
|
import events from 'events';
|
|
@ -57,7 +57,7 @@ define(['require', 'dialogHelper', 'loading', 'apphost', 'layoutManager', 'conne
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
require(['text!./viewsettings.template.html'], function (template) {
|
require(['text!./viewSettings.template.html'], function (template) {
|
||||||
|
|
||||||
var dialogOptions = {
|
var dialogOptions = {
|
||||||
removeOnClose: true,
|
removeOnClose: true,
|
1
src/config.json
Symbolic link
1
src/config.json
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
config.template.json
|
|
@ -1,3 +1,3 @@
|
||||||
{
|
{
|
||||||
"multiserver": true
|
"multiserver": false
|
||||||
}
|
}
|
||||||
|
|
|
@ -171,7 +171,12 @@ define(['loading', 'events', 'libraryBrowser', 'imageLoader', 'listView', 'cardB
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!result.Items.length) {
|
if (!result.Items.length) {
|
||||||
html = '<p style="text-align:center;">' + globalize.translate('MessageNoCollectionsAvailable') + '</p>';
|
html = '';
|
||||||
|
|
||||||
|
html += '<div class="noItemsMessage centerMessage">';
|
||||||
|
html += '<h1>' + globalize.translate('MessageNothingHere') + '</h1>';
|
||||||
|
html += '<p>' + globalize.translate('MessageNoCollectionsAvailable') + '</p>';
|
||||||
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
var itemsContainer = tabContent.querySelector('.itemsContainer');
|
var itemsContainer = tabContent.querySelector('.itemsContainer');
|
||||||
|
|
|
@ -165,6 +165,15 @@ define(['layoutManager', 'loading', 'libraryBrowser', 'cardBuilder', 'lazyLoader
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!result.Items.length) {
|
||||||
|
html = '';
|
||||||
|
|
||||||
|
html += '<div class="noItemsMessage centerMessage">';
|
||||||
|
html += '<h1>' + globalize.translate('MessageNothingHere') + '</h1>';
|
||||||
|
html += '<p>' + globalize.translate('MessageNoGenresAvailable') + '</p>';
|
||||||
|
html += '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
elem.innerHTML = html;
|
elem.innerHTML = html;
|
||||||
lazyLoader.lazyChildren(elem, fillItemsContainer);
|
lazyLoader.lazyChildren(elem, fillItemsContainer);
|
||||||
libraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
libraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
||||||
|
|
|
@ -158,7 +158,12 @@ define(['layoutManager', 'loading', 'events', 'libraryBrowser', 'imageLoader', '
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!result.Items.length) {
|
if (!result.Items.length) {
|
||||||
html = '<p style="text-align:center;">' + globalize.translate('MessageNoTrailersFound') + '</p>';
|
html = '';
|
||||||
|
|
||||||
|
html += '<div class="noItemsMessage centerMessage">';
|
||||||
|
html += '<h1>' + globalize.translate('MessageNothingHere') + '</h1>';
|
||||||
|
html += '<p>' + globalize.translate('MessageNoTrailersFound') + '</p>';
|
||||||
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
var itemsContainer = tabContent.querySelector('.itemsContainer');
|
var itemsContainer = tabContent.querySelector('.itemsContainer');
|
||||||
|
|
|
@ -161,6 +161,15 @@ define(['layoutManager', 'loading', 'libraryBrowser', 'cardBuilder', 'lazyLoader
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!result.Items.length) {
|
||||||
|
html = '';
|
||||||
|
|
||||||
|
html += '<div class="noItemsMessage centerMessage">';
|
||||||
|
html += '<h1>' + globalize.translate('MessageNothingHere') + '</h1>';
|
||||||
|
html += '<p>' + globalize.translate('MessageNoGenresAvailable') + '</p>';
|
||||||
|
html += '</div>';
|
||||||
|
}
|
||||||
|
|
||||||
elem.innerHTML = html;
|
elem.innerHTML = html;
|
||||||
lazyLoader.lazyChildren(elem, fillItemsContainer);
|
lazyLoader.lazyChildren(elem, fillItemsContainer);
|
||||||
libraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
libraryBrowser.saveQueryValues(getSavedQueryKey(), query);
|
||||||
|
|
|
@ -1,24 +0,0 @@
|
||||||
Dashboard.confirm = function(message, title, callback) {
|
|
||||||
'use strict';
|
|
||||||
require(['confirm'], function(confirm) {
|
|
||||||
confirm(message, title).then(function() {
|
|
||||||
callback(!0);
|
|
||||||
}).catch(function() {
|
|
||||||
callback(!1);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
Dashboard.showLoadingMsg = function() {
|
|
||||||
'use strict';
|
|
||||||
require(['loading'], function(loading) {
|
|
||||||
loading.show();
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg = function() {
|
|
||||||
'use strict';
|
|
||||||
require(['loading'], function(loading) {
|
|
||||||
loading.hide();
|
|
||||||
});
|
|
||||||
};
|
|
|
@ -7,7 +7,7 @@ import 'css!./style';
|
||||||
import 'material-icons';
|
import 'material-icons';
|
||||||
import 'paper-icon-button-light';
|
import 'paper-icon-button-light';
|
||||||
|
|
||||||
import TableOfContent from './tableOfContent';
|
import TableOfContents from './tableOfContents';
|
||||||
|
|
||||||
export class BookPlayer {
|
export class BookPlayer {
|
||||||
constructor() {
|
constructor() {
|
||||||
|
@ -163,7 +163,7 @@ export class BookPlayer {
|
||||||
|
|
||||||
openTableOfContents() {
|
openTableOfContents() {
|
||||||
if (this._loaded) {
|
if (this._loaded) {
|
||||||
this._tocElement = new TableOfContent(this);
|
this._tocElement = new TableOfContents(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -277,6 +277,7 @@ export class BookPlayer {
|
||||||
if (item.Path && (item.Path.endsWith('epub'))) {
|
if (item.Path && (item.Path.endsWith('epub'))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import dialogHelper from 'dialogHelper';
|
import dialogHelper from 'dialogHelper';
|
||||||
|
|
||||||
export default class TableOfContent {
|
export default class TableOfContents {
|
||||||
constructor(bookPlayer) {
|
constructor(bookPlayer) {
|
||||||
this._bookPlayer = bookPlayer;
|
this._bookPlayer = bookPlayer;
|
||||||
this._rendition = bookPlayer._rendition;
|
this._rendition = bookPlayer._rendition;
|
||||||
|
@ -59,6 +59,7 @@ export default class TableOfContent {
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
removeOnClose: true
|
removeOnClose: true
|
||||||
});
|
});
|
||||||
|
|
||||||
elem.id = 'dialogToc';
|
elem.id = 'dialogToc';
|
||||||
|
|
||||||
let tocHtml = '<div class="topRightActionButtons">';
|
let tocHtml = '<div class="topRightActionButtons">';
|
||||||
|
@ -72,6 +73,7 @@ export default class TableOfContent {
|
||||||
tocHtml += `<a href="${rendition.book.path.directory + link}">${chapter.label}</a>`;
|
tocHtml += `<a href="${rendition.book.path.directory + link}">${chapter.label}</a>`;
|
||||||
tocHtml += '</li>';
|
tocHtml += '</li>';
|
||||||
});
|
});
|
||||||
|
|
||||||
tocHtml += '</ul>';
|
tocHtml += '</ul>';
|
||||||
elem.innerHTML = tocHtml;
|
elem.innerHTML = tocHtml;
|
||||||
|
|
||||||
|
@ -84,7 +86,6 @@ export default class TableOfContent {
|
||||||
this._elem = elem;
|
this._elem = elem;
|
||||||
|
|
||||||
this.bindEvents();
|
this.bindEvents();
|
||||||
|
|
||||||
dialogHelper.open(elem);
|
dialogHelper.open(elem);
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -9,17 +9,12 @@ export default class PhotoPlayer {
|
||||||
}
|
}
|
||||||
|
|
||||||
play(options) {
|
play(options) {
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
import('slideshow').then(({default: slideshow}) => {
|
import('slideshow').then(({default: slideshow}) => {
|
||||||
|
|
||||||
var index = options.startIndex || 0;
|
var index = options.startIndex || 0;
|
||||||
|
|
||||||
var apiClient = connectionManager.currentApiClient();
|
var apiClient = connectionManager.currentApiClient();
|
||||||
|
|
||||||
apiClient.getCurrentUser().then(function(result) {
|
apiClient.getCurrentUser().then(function(result) {
|
||||||
|
|
||||||
var newSlideShow = new slideshow({
|
var newSlideShow = new slideshow({
|
||||||
showTitle: false,
|
showTitle: false,
|
||||||
cover: false,
|
cover: false,
|
||||||
|
@ -31,7 +26,6 @@ export default class PhotoPlayer {
|
||||||
});
|
});
|
||||||
|
|
||||||
newSlideShow.show();
|
newSlideShow.show();
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -39,7 +33,6 @@ export default class PhotoPlayer {
|
||||||
}
|
}
|
||||||
|
|
||||||
canPlayMediaType(mediaType) {
|
canPlayMediaType(mediaType) {
|
||||||
|
|
||||||
return (mediaType || '').toLowerCase() === 'photo';
|
return (mediaType || '').toLowerCase() === 'photo';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,6 +228,28 @@ var Dashboard = {
|
||||||
} else {
|
} else {
|
||||||
Dashboard.navigate('selectserver.html');
|
Dashboard.navigate('selectserver.html');
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
hideLoadingMsg: function() {
|
||||||
|
'use strict';
|
||||||
|
require(['loading'], function(loading) {
|
||||||
|
loading.hide();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
showLoadingMsg: function() {
|
||||||
|
'use strict';
|
||||||
|
require(['loading'], function(loading) {
|
||||||
|
loading.show();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
confirm: function(message, title, callback) {
|
||||||
|
'use strict';
|
||||||
|
require(['confirm'], function(confirm) {
|
||||||
|
confirm(message, title).then(function() {
|
||||||
|
callback(!0);
|
||||||
|
}).catch(function() {
|
||||||
|
callback(!1);
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -653,7 +675,7 @@ var AppInfo = {};
|
||||||
playQueueManager: componentsPath + '/playback/playqueuemanager',
|
playQueueManager: componentsPath + '/playback/playqueuemanager',
|
||||||
nowPlayingHelper: componentsPath + '/playback/nowplayinghelper',
|
nowPlayingHelper: componentsPath + '/playback/nowplayinghelper',
|
||||||
pluginManager: componentsPath + '/pluginManager',
|
pluginManager: componentsPath + '/pluginManager',
|
||||||
packageManager: componentsPath + '/packagemanager',
|
packageManager: componentsPath + '/packageManager',
|
||||||
screensaverManager: componentsPath + '/screensavermanager',
|
screensaverManager: componentsPath + '/screensavermanager',
|
||||||
chromecastHelper: 'plugins/chromecastPlayer/chromecastHelpers'
|
chromecastHelper: 'plugins/chromecastPlayer/chromecastHelpers'
|
||||||
};
|
};
|
||||||
|
@ -737,7 +759,6 @@ var AppInfo = {};
|
||||||
// define legacy features
|
// define legacy features
|
||||||
// TODO delete the rest of these
|
// TODO delete the rest of these
|
||||||
define('fnchecked', ['legacy/fnchecked'], returnFirstDependency);
|
define('fnchecked', ['legacy/fnchecked'], returnFirstDependency);
|
||||||
define('legacyDashboard', ['legacy/dashboard'], returnFirstDependency);
|
|
||||||
define('legacySelectMenu', ['legacy/selectmenu'], returnFirstDependency);
|
define('legacySelectMenu', ['legacy/selectmenu'], returnFirstDependency);
|
||||||
|
|
||||||
// there are several objects that need to be instantiated
|
// there are several objects that need to be instantiated
|
||||||
|
@ -820,10 +841,10 @@ var AppInfo = {};
|
||||||
define('playbackSettings', [componentsPath + '/playbackSettings/playbackSettings'], returnFirstDependency);
|
define('playbackSettings', [componentsPath + '/playbackSettings/playbackSettings'], returnFirstDependency);
|
||||||
define('homescreenSettings', [componentsPath + '/homeScreenSettings/homeScreenSettings'], returnFirstDependency);
|
define('homescreenSettings', [componentsPath + '/homeScreenSettings/homeScreenSettings'], returnFirstDependency);
|
||||||
define('playbackManager', [componentsPath + '/playback/playbackmanager'], getPlaybackManager);
|
define('playbackManager', [componentsPath + '/playback/playbackmanager'], getPlaybackManager);
|
||||||
define('timeSyncManager', [componentsPath + '/syncplay/timeSyncManager'], returnDefault);
|
define('timeSyncManager', [componentsPath + '/syncPlay/timeSyncManager'], returnDefault);
|
||||||
define('groupSelectionMenu', [componentsPath + '/syncplay/groupSelectionMenu'], returnFirstDependency);
|
define('groupSelectionMenu', [componentsPath + '/syncPlay/groupSelectionMenu'], returnFirstDependency);
|
||||||
define('syncPlayManager', [componentsPath + '/syncplay/syncPlayManager'], returnDefault);
|
define('syncPlayManager', [componentsPath + '/syncPlay/syncPlayManager'], returnDefault);
|
||||||
define('playbackPermissionManager', [componentsPath + '/syncplay/playbackPermissionManager'], returnDefault);
|
define('playbackPermissionManager', [componentsPath + '/syncPlay/playbackPermissionManager'], returnDefault);
|
||||||
define('layoutManager', [componentsPath + '/layoutManager', 'apphost'], getLayoutManager);
|
define('layoutManager', [componentsPath + '/layoutManager', 'apphost'], getLayoutManager);
|
||||||
define('homeSections', [componentsPath + '/homesections/homesections'], returnFirstDependency);
|
define('homeSections', [componentsPath + '/homesections/homesections'], returnFirstDependency);
|
||||||
define('playMenu', [componentsPath + '/playmenu'], returnFirstDependency);
|
define('playMenu', [componentsPath + '/playmenu'], returnFirstDependency);
|
||||||
|
@ -847,7 +868,7 @@ var AppInfo = {};
|
||||||
define('userdataButtons', [componentsPath + '/userdatabuttons/userdatabuttons'], returnFirstDependency);
|
define('userdataButtons', [componentsPath + '/userdatabuttons/userdatabuttons'], returnFirstDependency);
|
||||||
define('listView', [componentsPath + '/listview/listview'], returnFirstDependency);
|
define('listView', [componentsPath + '/listview/listview'], returnFirstDependency);
|
||||||
define('indicators', [componentsPath + '/indicators/indicators'], returnFirstDependency);
|
define('indicators', [componentsPath + '/indicators/indicators'], returnFirstDependency);
|
||||||
define('viewSettings', [componentsPath + '/viewsettings/viewsettings'], returnFirstDependency);
|
define('viewSettings', [componentsPath + '/viewSettings/viewSettings'], returnFirstDependency);
|
||||||
define('filterMenu', [componentsPath + '/filtermenu/filtermenu'], returnFirstDependency);
|
define('filterMenu', [componentsPath + '/filtermenu/filtermenu'], returnFirstDependency);
|
||||||
define('sortMenu', [componentsPath + '/sortmenu/sortmenu'], returnFirstDependency);
|
define('sortMenu', [componentsPath + '/sortmenu/sortmenu'], returnFirstDependency);
|
||||||
define('sanitizefilename', [componentsPath + '/sanitizeFilename'], returnFirstDependency);
|
define('sanitizefilename', [componentsPath + '/sanitizeFilename'], returnFirstDependency);
|
||||||
|
|
|
@ -1024,10 +1024,11 @@
|
||||||
"MessageLeaveEmptyToInherit": "Leave empty to inherit settings from a parent item or the global default value.",
|
"MessageLeaveEmptyToInherit": "Leave empty to inherit settings from a parent item or the global default value.",
|
||||||
"MessageNoAvailablePlugins": "No available plugins.",
|
"MessageNoAvailablePlugins": "No available plugins.",
|
||||||
"MessageNoCollectionsAvailable": "Collections allow you to enjoy personalized groupings of Movies, Series, and Albums. Click the + button to start creating collections.",
|
"MessageNoCollectionsAvailable": "Collections allow you to enjoy personalized groupings of Movies, Series, and Albums. Click the + button to start creating collections.",
|
||||||
|
"MessageNoGenresAvailable": "Enable some metadata providers to pull genres from the internet.",
|
||||||
"MessageNoMovieSuggestionsAvailable": "No movie suggestions are currently available. Start watching and rating your movies, and then come back to view your recommendations.",
|
"MessageNoMovieSuggestionsAvailable": "No movie suggestions are currently available. Start watching and rating your movies, and then come back to view your recommendations.",
|
||||||
"MessageNoPluginsInstalled": "You have no plugins installed.",
|
"MessageNoPluginsInstalled": "You have no plugins installed.",
|
||||||
"MessageNoServersAvailable": "No servers have been found using the automatic server discovery.",
|
"MessageNoServersAvailable": "No servers have been found using the automatic server discovery.",
|
||||||
"MessageNoTrailersFound": "No trailers found. Install the Trailer channel to enhance your movie experience by adding a library of internet trailers.",
|
"MessageNoTrailersFound": "Install the trailers channel to enhance your movie experience by adding a library of internet trailers.",
|
||||||
"MessageNothingHere": "Nothing here.",
|
"MessageNothingHere": "Nothing here.",
|
||||||
"MessagePasswordResetForUsers": "The following users have had their passwords reset. They can now sign in with the pin codes that were used to perform the reset.",
|
"MessagePasswordResetForUsers": "The following users have had their passwords reset. They can now sign in with the pin codes that were used to perform the reset.",
|
||||||
"MessagePlayAccessRestricted": "Playback of this content is currently restricted. Please contact your server administrator for more information.",
|
"MessagePlayAccessRestricted": "Playback of this content is currently restricted. Please contact your server administrator for more information.",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue