mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
register on app init
This commit is contained in:
parent
4062544e50
commit
d0f6faea11
3 changed files with 5 additions and 3 deletions
|
@ -10,7 +10,6 @@ import datetime from '../scripts/datetime';
|
||||||
import { DirectoryBrowser } from '../components/directorybrowser/directorybrowser';
|
import { DirectoryBrowser } from '../components/directorybrowser/directorybrowser';
|
||||||
import dialogHelper from '../components/dialogHelper/dialogHelper';
|
import dialogHelper from '../components/dialogHelper/dialogHelper';
|
||||||
import itemIdentifier from '../components/itemidentifier/itemidentifier';
|
import itemIdentifier from '../components/itemidentifier/itemidentifier';
|
||||||
import { Events } from 'jellyfin-apiclient';
|
|
||||||
|
|
||||||
export function getCurrentUser() {
|
export function getCurrentUser() {
|
||||||
return window.ApiClient.getCurrentUser(false);
|
return window.ApiClient.getCurrentUser(false);
|
||||||
|
@ -224,7 +223,6 @@ const Dashboard = {
|
||||||
serverAddress,
|
serverAddress,
|
||||||
showLoadingMsg,
|
showLoadingMsg,
|
||||||
datetime,
|
datetime,
|
||||||
Events,
|
|
||||||
DirectoryBrowser,
|
DirectoryBrowser,
|
||||||
dialogHelper,
|
dialogHelper,
|
||||||
itemIdentifier
|
itemIdentifier
|
||||||
|
|
|
@ -36,6 +36,7 @@ import { playbackManager } from '../components/playback/playbackmanager';
|
||||||
import SyncPlayNoActivePlayer from '../components/syncPlay/ui/players/NoActivePlayer';
|
import SyncPlayNoActivePlayer from '../components/syncPlay/ui/players/NoActivePlayer';
|
||||||
import SyncPlayHtmlVideoPlayer from '../components/syncPlay/ui/players/HtmlVideoPlayer';
|
import SyncPlayHtmlVideoPlayer from '../components/syncPlay/ui/players/HtmlVideoPlayer';
|
||||||
import SyncPlayHtmlAudioPlayer from '../components/syncPlay/ui/players/HtmlAudioPlayer';
|
import SyncPlayHtmlAudioPlayer from '../components/syncPlay/ui/players/HtmlAudioPlayer';
|
||||||
|
import taskButton from '../scripts/taskbutton';
|
||||||
|
|
||||||
// TODO: Move this elsewhere
|
// TODO: Move this elsewhere
|
||||||
window.getWindowLocationSearch = function(win) {
|
window.getWindowLocationSearch = function(win) {
|
||||||
|
@ -82,6 +83,10 @@ function loadCoreDictionary() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
|
// This is used in plugins
|
||||||
|
window.events = Events;
|
||||||
|
window.TaskButton = taskButton;
|
||||||
|
|
||||||
serverAddress().then(server => {
|
serverAddress().then(server => {
|
||||||
if (server) {
|
if (server) {
|
||||||
ServerConnections.initApiClient(server);
|
ServerConnections.initApiClient(server);
|
||||||
|
|
|
@ -121,5 +121,4 @@ function taskbutton(options) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
window.TaskButton = taskbutton;
|
|
||||||
export default taskbutton;
|
export default taskbutton;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue