mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix table of contents class name
This commit is contained in:
parent
eba23f41c6
commit
10aad88956
3 changed files with 6 additions and 11 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,6 +271,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';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue