1
0
Fork 0
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:
dkanada 2020-06-09 03:14:57 +09:00 committed by GitHub
commit 2c4f8d928a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 79 additions and 58 deletions

5
.gitignore vendored
View file

@ -1,6 +1,3 @@
# config
config.json
# npm
dist
web
@ -10,5 +7,5 @@ node_modules
.idea
.vscode
#log
# log
yarn-error.log

View file

@ -111,10 +111,10 @@
"src/components/playmenu.js",
"src/components/sanatizefilename.js",
"src/components/scrollManager.js",
"src/components/syncplay/groupSelectionMenu.js",
"src/components/syncplay/playbackPermissionManager.js",
"src/components/syncplay/syncPlayManager.js",
"src/components/syncplay/timeSyncManager.js",
"src/components/syncPlay/groupSelectionMenu.js",
"src/components/syncPlay/playbackPermissionManager.js",
"src/components/syncPlay/syncPlayManager.js",
"src/components/syncPlay/timeSyncManager.js",
"src/plugins/bookPlayer/plugin.js",
"src/plugins/bookPlayer/tableOfContent.js",
"src/plugins/photoPlayer/plugin.js",

View file

@ -597,6 +597,7 @@
.detailImageContainer {
position: relative;
margin-top: -25vh;
margin-bottom: 10vh;
float: left;
width: 25vw;
z-index: 3;
@ -641,7 +642,8 @@ div.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 {

View file

@ -1,6 +1,6 @@
/**
* Module that manages the SyncPlay feature.
* @module components/syncplay/syncPlayManager
* @module components/syncPlay/syncPlayManager
*/
import events from 'events';

View file

@ -1,6 +1,6 @@
/**
* Module that manages time syncing with server.
* @module components/syncplay/timeSyncManager
* @module components/syncPlay/timeSyncManager
*/
import events from 'events';

View file

@ -57,7 +57,7 @@ define(['require', 'dialogHelper', 'loading', 'apphost', 'layoutManager', 'conne
return new Promise(function (resolve, reject) {
require(['text!./viewsettings.template.html'], function (template) {
require(['text!./viewSettings.template.html'], function (template) {
var dialogOptions = {
removeOnClose: true,

1
src/config.json Symbolic link
View file

@ -0,0 +1 @@
config.template.json

View file

@ -1,3 +1,3 @@
{
"multiserver": true
"multiserver": false
}

View file

@ -171,7 +171,12 @@ define(['loading', 'events', 'libraryBrowser', 'imageLoader', 'listView', 'cardB
}
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');

View file

@ -165,6 +165,15 @@ define(['layoutManager', 'loading', 'libraryBrowser', 'cardBuilder', 'lazyLoader
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;
lazyLoader.lazyChildren(elem, fillItemsContainer);
libraryBrowser.saveQueryValues(getSavedQueryKey(), query);

View file

@ -158,7 +158,12 @@ define(['layoutManager', 'loading', 'events', 'libraryBrowser', 'imageLoader', '
}
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');

View file

@ -161,6 +161,15 @@ define(['layoutManager', 'loading', 'libraryBrowser', 'cardBuilder', 'lazyLoader
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;
lazyLoader.lazyChildren(elem, fillItemsContainer);
libraryBrowser.saveQueryValues(getSavedQueryKey(), query);

View file

@ -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();
});
};

View file

@ -7,7 +7,7 @@ import 'css!./style';
import 'material-icons';
import 'paper-icon-button-light';
import TableOfContent from './tableOfContent';
import TableOfContents from './tableOfContents';
export class BookPlayer {
constructor() {
@ -163,7 +163,7 @@ export class BookPlayer {
openTableOfContents() {
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'))) {
return true;
}
return false;
}
}

View file

@ -1,6 +1,6 @@
import dialogHelper from 'dialogHelper';
export default class TableOfContent {
export default class TableOfContents {
constructor(bookPlayer) {
this._bookPlayer = bookPlayer;
this._rendition = bookPlayer._rendition;
@ -59,6 +59,7 @@ export default class TableOfContent {
autoFocus: false,
removeOnClose: true
});
elem.id = 'dialogToc';
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 += '</li>';
});
tocHtml += '</ul>';
elem.innerHTML = tocHtml;
@ -84,7 +86,6 @@ export default class TableOfContent {
this._elem = elem;
this.bindEvents();
dialogHelper.open(elem);
}
}

View file

@ -9,17 +9,12 @@ export default class PhotoPlayer {
}
play(options) {
return new Promise(function (resolve, reject) {
import('slideshow').then(({default: slideshow}) => {
var index = options.startIndex || 0;
var apiClient = connectionManager.currentApiClient();
apiClient.getCurrentUser().then(function(result) {
var newSlideShow = new slideshow({
showTitle: false,
cover: false,
@ -31,7 +26,6 @@ export default class PhotoPlayer {
});
newSlideShow.show();
resolve();
});
});
@ -39,7 +33,6 @@ export default class PhotoPlayer {
}
canPlayMediaType(mediaType) {
return (mediaType || '').toLowerCase() === 'photo';
}
}

View file

@ -228,6 +228,28 @@ var Dashboard = {
} else {
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',
nowPlayingHelper: componentsPath + '/playback/nowplayinghelper',
pluginManager: componentsPath + '/pluginManager',
packageManager: componentsPath + '/packagemanager',
packageManager: componentsPath + '/packageManager',
screensaverManager: componentsPath + '/screensavermanager',
chromecastHelper: 'plugins/chromecastPlayer/chromecastHelpers'
};
@ -737,7 +759,6 @@ var AppInfo = {};
// define legacy features
// TODO delete the rest of these
define('fnchecked', ['legacy/fnchecked'], returnFirstDependency);
define('legacyDashboard', ['legacy/dashboard'], returnFirstDependency);
define('legacySelectMenu', ['legacy/selectmenu'], returnFirstDependency);
// there are several objects that need to be instantiated
@ -820,10 +841,10 @@ var AppInfo = {};
define('playbackSettings', [componentsPath + '/playbackSettings/playbackSettings'], returnFirstDependency);
define('homescreenSettings', [componentsPath + '/homeScreenSettings/homeScreenSettings'], returnFirstDependency);
define('playbackManager', [componentsPath + '/playback/playbackmanager'], getPlaybackManager);
define('timeSyncManager', [componentsPath + '/syncplay/timeSyncManager'], returnDefault);
define('groupSelectionMenu', [componentsPath + '/syncplay/groupSelectionMenu'], returnFirstDependency);
define('syncPlayManager', [componentsPath + '/syncplay/syncPlayManager'], returnDefault);
define('playbackPermissionManager', [componentsPath + '/syncplay/playbackPermissionManager'], returnDefault);
define('timeSyncManager', [componentsPath + '/syncPlay/timeSyncManager'], returnDefault);
define('groupSelectionMenu', [componentsPath + '/syncPlay/groupSelectionMenu'], returnFirstDependency);
define('syncPlayManager', [componentsPath + '/syncPlay/syncPlayManager'], returnDefault);
define('playbackPermissionManager', [componentsPath + '/syncPlay/playbackPermissionManager'], returnDefault);
define('layoutManager', [componentsPath + '/layoutManager', 'apphost'], getLayoutManager);
define('homeSections', [componentsPath + '/homesections/homesections'], returnFirstDependency);
define('playMenu', [componentsPath + '/playmenu'], returnFirstDependency);
@ -847,7 +868,7 @@ var AppInfo = {};
define('userdataButtons', [componentsPath + '/userdatabuttons/userdatabuttons'], returnFirstDependency);
define('listView', [componentsPath + '/listview/listview'], 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('sortMenu', [componentsPath + '/sortmenu/sortmenu'], returnFirstDependency);
define('sanitizefilename', [componentsPath + '/sanitizeFilename'], returnFirstDependency);

View file

@ -1024,10 +1024,11 @@
"MessageLeaveEmptyToInherit": "Leave empty to inherit settings from a parent item or the global default value.",
"MessageNoAvailablePlugins": "No available plugins.",
"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.",
"MessageNoPluginsInstalled": "You have no plugins installed.",
"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.",
"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.",