mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix require
This commit is contained in:
parent
e9b97185b8
commit
c11dc53e44
1 changed files with 5 additions and 4 deletions
|
@ -287,7 +287,7 @@ class AppRouter {
|
||||||
this.showWelcome();
|
this.showWelcome();
|
||||||
break;
|
break;
|
||||||
case 'ServerUpdateNeeded':
|
case 'ServerUpdateNeeded':
|
||||||
require(['alert'], (alert) => {
|
import('alert').then(({default: alert}) =>{
|
||||||
alert({
|
alert({
|
||||||
text: globalize.translate('ServerUpdateNeeded', 'https://github.com/jellyfin/jellyfin'),
|
text: globalize.translate('ServerUpdateNeeded', 'https://github.com/jellyfin/jellyfin'),
|
||||||
html: globalize.translate('ServerUpdateNeeded', '<a href="https://github.com/jellyfin/jellyfin">https://github.com/jellyfin/jellyfin</a>')
|
html: globalize.translate('ServerUpdateNeeded', '<a href="https://github.com/jellyfin/jellyfin">https://github.com/jellyfin/jellyfin</a>')
|
||||||
|
@ -322,7 +322,8 @@ class AppRouter {
|
||||||
url += '?' + ctx.querystring;
|
url += '?' + ctx.querystring;
|
||||||
}
|
}
|
||||||
|
|
||||||
require(['text!' + url], (html) => {
|
import('text!' + url).then(({default: html}) => {
|
||||||
|
console.warn(html)
|
||||||
this.loadContent(ctx, route, html, request);
|
this.loadContent(ctx, route, html, request);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -339,7 +340,7 @@ class AppRouter {
|
||||||
};
|
};
|
||||||
|
|
||||||
if (route.controller) {
|
if (route.controller) {
|
||||||
require(['controllers/' + route.controller], onInitComplete);
|
import('controllers/' + route.controller).then(onInitComplete);
|
||||||
} else {
|
} else {
|
||||||
onInitComplete();
|
onInitComplete();
|
||||||
}
|
}
|
||||||
|
@ -406,7 +407,7 @@ class AppRouter {
|
||||||
this.forcedLogoutMsg = null;
|
this.forcedLogoutMsg = null;
|
||||||
|
|
||||||
if (msg) {
|
if (msg) {
|
||||||
require(['alert'], (alert) => {
|
import('alert').then((alert) => {
|
||||||
alert(msg);
|
alert(msg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue