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

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';
}
}