Merge pull request #2158 from thornbill/fix-links

Fix opening links with middle click or open in new tab
This commit is contained in:
Bill Thornton 2020-12-02 16:27:57 -05:00 committed by GitHub
commit ca9e6e8ac8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 105 additions and 99 deletions

View File

@ -51,6 +51,12 @@ class AppRouter {
}
this.setBaseRoute();
// paths that start with a hashbang (i.e. /#!/page.html) get transformed to starting with //
// we need to strip one "/" for our routes to work
page('//*', (ctx) => {
page.redirect(ctx.path.substring(1));
});
}
/**
@ -682,27 +688,27 @@ class AppRouter {
const serverId = item.ServerId || options.serverId;
if (item === 'settings') {
return 'mypreferencesmenu.html';
return '#!/mypreferencesmenu.html';
}
if (item === 'wizard') {
return 'wizardstart.html';
return '#!/wizardstart.html';
}
if (item === 'manageserver') {
return 'dashboard.html';
return '#!/dashboard.html';
}
if (item === 'recordedtv') {
return 'livetv.html?tab=3&serverId=' + options.serverId;
return '#!/livetv.html?tab=3&serverId=' + options.serverId;
}
if (item === 'nextup') {
return 'list.html?type=nextup&serverId=' + options.serverId;
return '#!/list.html?type=nextup&serverId=' + options.serverId;
}
if (item === 'list') {
let url = 'list.html?serverId=' + options.serverId + '&type=' + options.itemTypes;
let url = '#!/list.html?serverId=' + options.serverId + '&type=' + options.itemTypes;
if (options.isFavorite) {
url += '&IsFavorite=true';
@ -713,57 +719,57 @@ class AppRouter {
if (item === 'livetv') {
if (options.section === 'programs') {
return 'livetv.html?tab=0&serverId=' + options.serverId;
return '#!/livetv.html?tab=0&serverId=' + options.serverId;
}
if (options.section === 'guide') {
return 'livetv.html?tab=1&serverId=' + options.serverId;
return '#!/livetv.html?tab=1&serverId=' + options.serverId;
}
if (options.section === 'movies') {
return 'list.html?type=Programs&IsMovie=true&serverId=' + options.serverId;
return '#!/list.html?type=Programs&IsMovie=true&serverId=' + options.serverId;
}
if (options.section === 'shows') {
return 'list.html?type=Programs&IsSeries=true&IsMovie=false&IsNews=false&serverId=' + options.serverId;
return '#!/list.html?type=Programs&IsSeries=true&IsMovie=false&IsNews=false&serverId=' + options.serverId;
}
if (options.section === 'sports') {
return 'list.html?type=Programs&IsSports=true&serverId=' + options.serverId;
return '#!/list.html?type=Programs&IsSports=true&serverId=' + options.serverId;
}
if (options.section === 'kids') {
return 'list.html?type=Programs&IsKids=true&serverId=' + options.serverId;
return '#!/list.html?type=Programs&IsKids=true&serverId=' + options.serverId;
}
if (options.section === 'news') {
return 'list.html?type=Programs&IsNews=true&serverId=' + options.serverId;
return '#!/list.html?type=Programs&IsNews=true&serverId=' + options.serverId;
}
if (options.section === 'onnow') {
return 'list.html?type=Programs&IsAiring=true&serverId=' + options.serverId;
return '#!/list.html?type=Programs&IsAiring=true&serverId=' + options.serverId;
}
if (options.section === 'dvrschedule') {
return 'livetv.html?tab=4&serverId=' + options.serverId;
return '#!/livetv.html?tab=4&serverId=' + options.serverId;
}
if (options.section === 'seriesrecording') {
return 'livetv.html?tab=5&serverId=' + options.serverId;
return '#!/livetv.html?tab=5&serverId=' + options.serverId;
}
return 'livetv.html?serverId=' + options.serverId;
return '#!/livetv.html?serverId=' + options.serverId;
}
if (itemType == 'SeriesTimer') {
return 'details?seriesTimerId=' + id + '&serverId=' + serverId;
return '#!/details?seriesTimerId=' + id + '&serverId=' + serverId;
}
if (item.CollectionType == 'livetv') {
return 'livetv.html';
return '#!/livetv.html';
}
if (item.Type === 'Genre') {
url = 'list.html?genreId=' + item.Id + '&serverId=' + serverId;
url = '#!/list.html?genreId=' + item.Id + '&serverId=' + serverId;
if (context === 'livetv') {
url += '&type=Programs';
@ -777,7 +783,7 @@ class AppRouter {
}
if (item.Type === 'MusicGenre') {
url = 'list.html?musicGenreId=' + item.Id + '&serverId=' + serverId;
url = '#!/list.html?musicGenreId=' + item.Id + '&serverId=' + serverId;
if (options.parentId) {
url += '&parentId=' + options.parentId;
@ -787,7 +793,7 @@ class AppRouter {
}
if (item.Type === 'Studio') {
url = 'list.html?studioId=' + item.Id + '&serverId=' + serverId;
url = '#!/list.html?studioId=' + item.Id + '&serverId=' + serverId;
if (options.parentId) {
url += '&parentId=' + options.parentId;
@ -798,7 +804,7 @@ class AppRouter {
if (context !== 'folders' && !itemHelper.isLocalItem(item)) {
if (item.CollectionType == 'movies') {
url = 'movies.html?topParentId=' + item.Id;
url = '#!/movies.html?topParentId=' + item.Id;
if (options && options.section === 'latest') {
url += '&tab=1';
@ -808,7 +814,7 @@ class AppRouter {
}
if (item.CollectionType == 'tvshows') {
url = 'tv.html?topParentId=' + item.Id;
url = '#!/tv.html?topParentId=' + item.Id;
if (options && options.section === 'latest') {
url += '&tab=2';
@ -818,31 +824,31 @@ class AppRouter {
}
if (item.CollectionType == 'music') {
return 'music.html?topParentId=' + item.Id;
return '#!/music.html?topParentId=' + item.Id;
}
}
const itemTypes = ['Playlist', 'TvChannel', 'Program', 'BoxSet', 'MusicAlbum', 'MusicGenre', 'Person', 'Recording', 'MusicArtist'];
if (itemTypes.indexOf(itemType) >= 0) {
return 'details?id=' + id + '&serverId=' + serverId;
return '#!/details?id=' + id + '&serverId=' + serverId;
}
const contextSuffix = context ? '&context=' + context : '';
if (itemType == 'Series' || itemType == 'Season' || itemType == 'Episode') {
return 'details?id=' + id + contextSuffix + '&serverId=' + serverId;
return '#!/details?id=' + id + contextSuffix + '&serverId=' + serverId;
}
if (item.IsFolder) {
if (id) {
return 'list.html?parentId=' + id + '&serverId=' + serverId;
return '#!/list.html?parentId=' + id + '&serverId=' + serverId;
}
return '#';
}
return 'details?id=' + id + '&serverId=' + serverId;
return '#!/details?id=' + id + '&serverId=' + serverId;
}
}

View File

@ -141,7 +141,7 @@ import '../elements/emby-itemscontainer/emby-itemscontainer';
if (result.Items.length) {
if (html += '<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">', !layoutManager.tv && options.Limit && result.Items.length >= options.Limit) {
html += '<a is="emby-linkbutton" href="' + ('list.html?serverId=' + ApiClient.serverId() + '&type=' + section.types + '&IsFavorite=true') + '" class="more button-flat button-flat-mini sectionTitleTextButton">';
html += '<a is="emby-linkbutton" href="' + ('#!/list.html?serverId=' + ApiClient.serverId() + '&type=' + section.types + '&IsFavorite=true') + '" class="more button-flat button-flat-mini sectionTitleTextButton">';
html += '<h2 class="sectionTitle sectionTitle-cards">';
html += globalize.translate(section.name);
html += '</h2>';

View File

@ -147,7 +147,7 @@ function updateNowPlayingInfo(context, state, serverId) {
for (const artist of item.ArtistItems) {
const artistName = artist.Name;
const artistId = artist.Id;
artistsSeries += `<a class="button-link emby-button" is="emby-linkbutton" href="details?id=${artistId}&serverId=${nowPlayingServerId}">${artistName}</a>`;
artistsSeries += `<a class="button-link emby-button" is="emby-linkbutton" href="#!/details?id=${artistId}&serverId=${nowPlayingServerId}">${artistName}</a>`;
if (artist !== item.ArtistItems.slice(-1)[0]) {
artistsSeries += ', ';
}
@ -165,7 +165,7 @@ function updateNowPlayingInfo(context, state, serverId) {
}
}
if (item.Album != null) {
albumName = '<a class="button-link emby-button" is="emby-linkbutton" href="details?id=' + item.AlbumId + `&serverId=${nowPlayingServerId}">` + item.Album + '</a>';
albumName = '<a class="button-link emby-button" is="emby-linkbutton" href="#!/details?id=' + item.AlbumId + `&serverId=${nowPlayingServerId}">` + item.Album + '</a>';
}
context.querySelector('.nowPlayingAlbum').innerHTML = albumName;
context.querySelector('.nowPlayingArtist').innerHTML = artistsSeries;
@ -173,12 +173,12 @@ function updateNowPlayingInfo(context, state, serverId) {
} else if (item.Type == 'Episode') {
if (item.SeasonName != null) {
const seasonName = item.SeasonName;
context.querySelector('.nowPlayingSeason').innerHTML = '<a class="button-link emby-button" is="emby-linkbutton" href="details?id=' + item.SeasonId + `&serverId=${nowPlayingServerId}">${seasonName}</a>`;
context.querySelector('.nowPlayingSeason').innerHTML = '<a class="button-link emby-button" is="emby-linkbutton" href="#!/details?id=' + item.SeasonId + `&serverId=${nowPlayingServerId}">${seasonName}</a>`;
}
if (item.SeriesName != null) {
const seriesName = item.SeriesName;
if (item.SeriesId != null) {
context.querySelector('.nowPlayingSerie').innerHTML = '<a class="button-link emby-button" is="emby-linkbutton" href="details?id=' + item.SeriesId + `&serverId=${nowPlayingServerId}">${seriesName}</a>`;
context.querySelector('.nowPlayingSerie').innerHTML = '<a class="button-link emby-button" is="emby-linkbutton" href="#!/details?id=' + item.SeriesId + `&serverId=${nowPlayingServerId}">${seriesName}</a>`;
} else {
context.querySelector('.nowPlayingSerie').innerHTML = seriesName;
}

View File

@ -3,7 +3,7 @@
<div class="dashboardSections" style="padding-top:.5em;">
<div class="dashboardColumn dashboardColumn-2-60 dashboardColumn-3-46">
<div class="dashboardSection">
<a is="emby-linkbutton" href="dashboardgeneral.html" class="button-flat sectionTitleTextButton">
<a is="emby-linkbutton" href="#!/dashboardgeneral.html" class="button-flat sectionTitleTextButton">
<h3>${TabServer}</h3>
<span class="material-icons chevron_right"></span>
</a>
@ -35,7 +35,7 @@
</div>
<div class="dashboardSection">
<a is="emby-linkbutton" href="devices.html" class="button-flat sectionTitleTextButton">
<a is="emby-linkbutton" href="#!/devices.html" class="button-flat sectionTitleTextButton">
<h3>${HeaderActiveDevices}</h3>
<span class="material-icons chevron_right"></span>
</a>
@ -46,7 +46,7 @@
<div class="dashboardColumn dashboardColumn-2-40 dashboardColumn-3-27">
<div class="dashboardSection">
<a is="emby-linkbutton" href="serveractivity.html?useractivity=true" class="button-flat sectionTitleTextButton">
<a is="emby-linkbutton" href="#!/serveractivity.html?useractivity=true" class="button-flat sectionTitleTextButton">
<h3>${HeaderActivity}</h3>
<span class="material-icons chevron_right"></span>
</a>
@ -63,7 +63,7 @@
</div>
<div class="dashboardSection serverActivitySection hide activityContainer">
<a is="emby-linkbutton" href="serveractivity.html?useractivity=false" class="button-flat sectionTitleTextButton">
<a is="emby-linkbutton" href="#!/serveractivity.html?useractivity=false" class="button-flat sectionTitleTextButton">
<h3>${Alerts}</h3>
<span class="material-icons chevron_right"></span>
</a>
@ -72,7 +72,7 @@
</div>
<div class="dashboardSection">
<a is="emby-linkbutton" href="dashboardgeneral.html" class="button-flat sectionTitleTextButton">
<a is="emby-linkbutton" href="#!/dashboardgeneral.html" class="button-flat sectionTitleTextButton">
<h3>${HeaderPaths}</h3>
<span class="material-icons chevron_right"></span>
</a>

View File

@ -96,7 +96,7 @@ import confirm from '../../../components/confirm/confirm';
deviceHtml += '<div class="cardBox visualCardBox">';
deviceHtml += '<div class="cardScalable">';
deviceHtml += '<div class="cardPadder cardPadder-backdrop"></div>';
deviceHtml += '<a is="emby-linkbutton" href="' + (canEdit ? 'device.html?id=' + device.Id : '#') + '" class="cardContent cardImageContainer">';
deviceHtml += '<a is="emby-linkbutton" href="' + (canEdit ? '#!/device.html?id=' + device.Id : '#') + '" class="cardContent cardImageContainer">';
const iconUrl = imageHelper.getDeviceIcon(device);
if (iconUrl) {

View File

@ -8,7 +8,7 @@
<div class="verticalSection verticalSection-extrabottompadding">
<div class="sectionTitleContainer flex align-items-center">
<h2 class="sectionTitle">${HeaderCustomDlnaProfiles}</h2>
<a is="emby-linkbutton" href="dlnaprofile.html" class="fab submit" style="margin:0 0 0 1em">
<a is="emby-linkbutton" href="#!/dlnaprofile.html" class="fab submit" style="margin:0 0 0 1em">
<span class="material-icons add"></span>
</a>
</div>

View File

@ -145,13 +145,13 @@ import alert from '../../components/alert';
function getTabs() {
return [{
href: 'encodingsettings.html',
href: '#!/encodingsettings.html',
name: globalize.translate('Transcoding')
}, {
href: 'playbackconfiguration.html',
href: '#!/playbackconfiguration.html',
name: globalize.translate('ButtonResume')
}, {
href: 'streamingsettings.html',
href: '#!/streamingsettings.html',
name: globalize.translate('TabStreaming')
}];
}

View File

@ -29,13 +29,13 @@ import Dashboard from '../../scripts/clientUtils';
function getTabs() {
return [{
href: 'encodingsettings.html',
href: '#!/encodingsettings.html',
name: globalize.translate('Transcoding')
}, {
href: 'playbackconfiguration.html',
href: '#!/playbackconfiguration.html',
name: globalize.translate('ButtonResume')
}, {
href: 'streamingsettings.html',
href: '#!/streamingsettings.html',
name: globalize.translate('TabStreaming')
}];
}

View File

@ -91,7 +91,7 @@ function populateList(options) {
function getPluginHtml(plugin, options, installedPlugins) {
let html = '';
let href = plugin.externalUrl ? plugin.externalUrl : 'addplugin.html?name=' + encodeURIComponent(plugin.name) + '&guid=' + plugin.guid;
let href = plugin.externalUrl ? plugin.externalUrl : '#!/addplugin.html?name=' + encodeURIComponent(plugin.name) + '&guid=' + plugin.guid;
if (options.context) {
href += '&context=' + options.context;

View File

@ -98,7 +98,7 @@ function populateList(page, plugins, pluginConfigurationPages) {
} else {
html += '<div class="centerMessage">';
html += '<h1>' + globalize.translate('MessageNoPluginsInstalled') + '</h1>';
html += '<p><a is="emby-linkbutton" class="button-link" href="availableplugins.html">';
html += '<p><a is="emby-linkbutton" class="button-link" href="#!/availableplugins.html">';
html += globalize.translate('MessageBrowsePluginCatalog');
html += '</a></p>';
html += '</div>';

View File

@ -24,13 +24,13 @@ import Dashboard from '../../scripts/clientUtils';
function getTabs() {
return [{
href: 'encodingsettings.html',
href: '#!/encodingsettings.html',
name: globalize.translate('Transcoding')
}, {
href: 'playbackconfiguration.html',
href: '#!/playbackconfiguration.html',
name: globalize.translate('ButtonResume')
}, {
href: 'streamingsettings.html',
href: '#!/streamingsettings.html',
name: globalize.translate('TabStreaming')
}];
}

View File

@ -93,7 +93,7 @@ import confirm from '../../../components/confirm/confirm';
html += '<div class="cardBox visualCardBox">';
html += '<div class="cardScalable visualCardBox-cardScalable">';
html += '<div class="cardPadder cardPadder-square"></div>';
html += '<a is="emby-linkbutton" class="cardContent" href="useredit.html?userId=' + user.Id + '">';
html += '<a is="emby-linkbutton" class="cardContent" href="#!/useredit.html?userId=' + user.Id + '">';
let imgUrl;
if (user.PrimaryImageTag) {

View File

@ -5,7 +5,7 @@
<div class="pageTabContent" id="suggestionsTab" data-index="0">
<div id="activePrograms" class="verticalSection">
<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">
<a href="list.html?type=Programs&IsAiring=true" is="emby-linkbutton" class="button-flat button-flat-mini sectionTitleTextButton sectionTitleTextButton-programs">
<a href="#!/list.html?type=Programs&IsAiring=true" is="emby-linkbutton" class="button-flat button-flat-mini sectionTitleTextButton sectionTitleTextButton-programs">
<h2 class="sectionTitle sectionTitle-cards" style="display: inline-block; vertical-align: middle;">${HeaderOnNow}</h2>
<span class="material-icons chevron_right"></span>
</a>
@ -14,7 +14,7 @@
</div>
<div id="upcomingEpisodes" class="verticalSection">
<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">
<a href="list.html?type=Programs&IsSeries=true&IsMovie=false&IsNews=false" is="emby-linkbutton" class="button-flat button-flat-mini sectionTitleTextButton sectionTitleTextButton-programs">
<a href="#!/list.html?type=Programs&IsSeries=true&IsMovie=false&IsNews=false" is="emby-linkbutton" class="button-flat button-flat-mini sectionTitleTextButton sectionTitleTextButton-programs">
<h2 class="sectionTitle sectionTitle-cards" style="display: inline-block; vertical-align: middle;">${Shows}</h2>
<span class="material-icons chevron_right"></span>
</a>
@ -23,7 +23,7 @@
</div>
<div id="upcomingTvMovies" class="verticalSection">
<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">
<a href="list.html?type=Programs&IsMovie=true" is="emby-linkbutton" class="button-flat button-flat-mini sectionTitleTextButton sectionTitleTextButton-programs">
<a href="#!/list.html?type=Programs&IsMovie=true" is="emby-linkbutton" class="button-flat button-flat-mini sectionTitleTextButton sectionTitleTextButton-programs">
<h2 class="sectionTitle sectionTitle-cards" style="display: inline-block; vertical-align: middle;">${Movies}</h2>
<span class="material-icons chevron_right"></span>
</a>
@ -32,7 +32,7 @@
</div>
<div id="upcomingSports" class="verticalSection">
<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">
<a href="list.html?type=Programs&IsSports=true" is="emby-linkbutton" class="button-flat button-flat-mini sectionTitleTextButton sectionTitleTextButton-programs">
<a href="#!/list.html?type=Programs&IsSports=true" is="emby-linkbutton" class="button-flat button-flat-mini sectionTitleTextButton sectionTitleTextButton-programs">
<h2 class="sectionTitle sectionTitle-cards" style="display: inline-block; vertical-align: middle;">${Sports}</h2>
<span class="material-icons chevron_right"></span>
</a>
@ -41,7 +41,7 @@
</div>
<div id="upcomingKids" class="verticalSection">
<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">
<a href="list.html?type=Programs&IsKids=true" is="emby-linkbutton" class="button-flat button-flat-mini sectionTitleTextButton sectionTitleTextButton-programs">
<a href="#!/list.html?type=Programs&IsKids=true" is="emby-linkbutton" class="button-flat button-flat-mini sectionTitleTextButton sectionTitleTextButton-programs">
<h2 class="sectionTitle sectionTitle-cards" style="display: inline-block; vertical-align: middle;">${HeaderForKids}</h2>
<span class="material-icons chevron_right"></span>
</a>
@ -50,7 +50,7 @@
</div>
<div id="upcomingNews" class="verticalSection">
<div class="sectionTitleContainer sectionTitleContainer-cards padded-left">
<a href="list.html?type=Programs&IsNews=true" is="emby-linkbutton" class="button-flat button-flat-mini sectionTitleTextButton sectionTitleTextButton-programs">
<a href="#!/list.html?type=Programs&IsNews=true" is="emby-linkbutton" class="button-flat button-flat-mini sectionTitleTextButton sectionTitleTextButton-programs">
<h2 class="sectionTitle sectionTitle-cards" style="display: inline-block; vertical-align: middle;">${News}</h2>
<span class="material-icons chevron_right"></span>
</a>

View File

@ -218,9 +218,9 @@ function getProviderName(providerId) {
function getProviderConfigurationUrl(providerId) {
switch (providerId = providerId.toLowerCase()) {
case 'xmltv':
return 'livetvguideprovider.html?type=xmltv';
return '#!/livetvguideprovider.html?type=xmltv';
case 'schedulesdirect':
return 'livetvguideprovider.html?type=schedulesdirect';
return '#!/livetvguideprovider.html?type=schedulesdirect';
}
}

View File

@ -9,7 +9,7 @@
</div>
</div>
<div class="padded-top padded-left padded-right flex flex-shrink-zero justify-content-center verticalSection flex-wrap-wrap margin-auto-x">
<a is="emby-linkbutton" href="addserver.html" class="raised cancel btnAddServer flex-shrink-zero" style="margin: .25em;">
<a is="emby-linkbutton" href="#!/addserver.html" class="raised cancel btnAddServer flex-shrink-zero" style="margin: .25em;">
<span>${ButtonAddServer}</span>
</a>
</div>

View File

@ -69,7 +69,7 @@
</div>
<div class="adminSection verticalSection verticalSection-extrabottompadding hide">
<h2 class="sectionTitle" style="padding-left:.25em;">${HeaderAdmin}</h2>
<a is="emby-linkbutton" href="dashboard.html" style="display:block;padding:0;margin:0;" class="listItem-border">
<a is="emby-linkbutton" href="#!/dashboard.html" style="display:block;padding:0;margin:0;" class="listItem-border">
<div class="listItem">
<span class="material-icons listItemIcon listItemIcon-transparent dashboard"></span>
<div class="listItemBody">
@ -77,7 +77,7 @@
</div>
</div>
</a>
<a is="emby-linkbutton" href="edititemmetadata.html" style="display:block;padding:0;margin:0;" class="listItem-border">
<a is="emby-linkbutton" href="#!/edititemmetadata.html" style="display:block;padding:0;margin:0;" class="listItem-border">
<div class="listItem">
<span class="material-icons listItemIcon listItemIcon-transparent mode_edit"></span>
<div class="listItemBody">

View File

@ -22,12 +22,12 @@ export default function (view, params) {
const userId = params.userId || Dashboard.getCurrentUserId();
const page = this;
page.querySelector('.lnkMyProfile').setAttribute('href', 'myprofile.html?userId=' + userId);
page.querySelector('.lnkDisplayPreferences').setAttribute('href', 'mypreferencesdisplay.html?userId=' + userId);
page.querySelector('.lnkHomePreferences').setAttribute('href', 'mypreferenceshome.html?userId=' + userId);
page.querySelector('.lnkPlaybackPreferences').setAttribute('href', 'mypreferencesplayback.html?userId=' + userId);
page.querySelector('.lnkSubtitlePreferences').setAttribute('href', 'mypreferencessubtitles.html?userId=' + userId);
page.querySelector('.lnkQuickConnectPreferences').setAttribute('href', 'mypreferencesquickconnect.html');
page.querySelector('.lnkMyProfile').setAttribute('href', '#!/myprofile.html?userId=' + userId);
page.querySelector('.lnkDisplayPreferences').setAttribute('href', '#!/mypreferencesdisplay.html?userId=' + userId);
page.querySelector('.lnkHomePreferences').setAttribute('href', '#!/mypreferenceshome.html?userId=' + userId);
page.querySelector('.lnkPlaybackPreferences').setAttribute('href', '#!/mypreferencesplayback.html?userId=' + userId);
page.querySelector('.lnkSubtitlePreferences').setAttribute('href', '#!/mypreferencessubtitles.html?userId=' + userId);
page.querySelector('.lnkQuickConnectPreferences').setAttribute('href', '#!/mypreferencesquickconnect.html');
if (window.NativeShell && window.NativeShell.AppHost.supports('clientsettings')) {
page.querySelector('.clientSettings').classList.remove('hide');

View File

@ -95,7 +95,7 @@ export function logout() {
}
export function getPluginUrl(name) {
return 'configurationpage?name=' + encodeURIComponent(name);
return '#!/configurationpage?name=' + encodeURIComponent(name);
}
export function navigate(url, preserveQueryString) {

View File

@ -295,26 +295,26 @@ function loadItems(element, item, type, query, listOptions) {
function getMoreItemsHref(item, type) {
if (item.Type === 'Genre') {
return 'list.html?type=' + type + '&genreId=' + item.Id + '&serverId=' + item.ServerId;
return '#!/list.html?type=' + type + '&genreId=' + item.Id + '&serverId=' + item.ServerId;
}
if (item.Type === 'MusicGenre') {
return 'list.html?type=' + type + '&musicGenreId=' + item.Id + '&serverId=' + item.ServerId;
return '#!/list.html?type=' + type + '&musicGenreId=' + item.Id + '&serverId=' + item.ServerId;
}
if (item.Type === 'Studio') {
return 'list.html?type=' + type + '&studioId=' + item.Id + '&serverId=' + item.ServerId;
return '#!/list.html?type=' + type + '&studioId=' + item.Id + '&serverId=' + item.ServerId;
}
if (item.Type === 'MusicArtist') {
return 'list.html?type=' + type + '&artistId=' + item.Id + '&serverId=' + item.ServerId;
return '#!/list.html?type=' + type + '&artistId=' + item.Id + '&serverId=' + item.ServerId;
}
if (item.Type === 'Person') {
return 'list.html?type=' + type + '&personId=' + item.Id + '&serverId=' + item.ServerId;
return '#!/list.html?type=' + type + '&personId=' + item.Id + '&serverId=' + item.ServerId;
}
return 'list.html?type=' + type + '&parentId=' + item.Id + '&serverId=' + item.ServerId;
return '#!/list.html?type=' + type + '&parentId=' + item.Id + '&serverId=' + item.ServerId;
}
function addCurrentItemToQuery(query, item) {

View File

@ -292,7 +292,7 @@ import Headroom from 'headroom.js';
function refreshLibraryInfoInDrawer(user, drawer) {
let html = '';
html += '<div style="height:.5em;"></div>';
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder" href="home.html"><span class="material-icons navMenuOptionIcon home"></span><span class="navMenuOptionText">' + globalize.translate('Home') + '</span></a>';
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder" href="#!/home.html"><span class="material-icons navMenuOptionIcon home"></span><span class="navMenuOptionText">' + globalize.translate('Home') + '</span></a>';
// libraries are added here
html += '<div class="libraryMenuOptions">';
@ -303,8 +303,8 @@ import Headroom from 'headroom.js';
html += '<h3 class="sidebarHeader">';
html += globalize.translate('HeaderAdmin');
html += '</h3>';
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder lnkManageServer" data-itemid="dashboard" href="dashboard.html"><span class="material-icons navMenuOptionIcon dashboard"></span><span class="navMenuOptionText">' + globalize.translate('TabDashboard') + '</span></a>';
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder editorViewMenu" data-itemid="editor" href="edititemmetadata.html"><span class="material-icons navMenuOptionIcon mode_edit"></span><span class="navMenuOptionText">' + globalize.translate('Metadata') + '</span></a>';
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder lnkManageServer" data-itemid="dashboard" href="#!/dashboard.html"><span class="material-icons navMenuOptionIcon dashboard"></span><span class="navMenuOptionText">' + globalize.translate('TabDashboard') + '</span></a>';
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder editorViewMenu" data-itemid="editor" href="#!/edititemmetadata.html"><span class="material-icons navMenuOptionIcon mode_edit"></span><span class="navMenuOptionText">' + globalize.translate('Metadata') + '</span></a>';
html += '</div>';
}
@ -315,7 +315,7 @@ import Headroom from 'headroom.js';
html += '</h3>';
if (appHost.supports('multiserver')) {
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder" data-itemid="selectserver" href="selectserver.html?showuser=1"><span class="material-icons navMenuOptionIcon wifi"></span><span class="navMenuOptionText">' + globalize.translate('SelectServer') + '</span></a>';
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder" data-itemid="selectserver" href="#!/selectserver.html?showuser=1"><span class="material-icons navMenuOptionIcon wifi"></span><span class="navMenuOptionText">' + globalize.translate('SelectServer') + '</span></a>';
}
html += '<a is="emby-linkbutton" class="navMenuOption lnkMediaFolder btnSettings" data-itemid="settings" href="#"><span class="material-icons navMenuOptionIcon settings"></span><span class="navMenuOptionText">' + globalize.translate('Settings') + '</span></a>';
@ -390,28 +390,28 @@ import Headroom from 'headroom.js';
name: globalize.translate('TabServer')
}, {
name: globalize.translate('TabDashboard'),
href: 'dashboard.html',
href: '#!/dashboard.html',
pageIds: ['dashboardPage'],
icon: 'dashboard'
}, {
name: globalize.translate('General'),
href: 'dashboardgeneral.html',
href: '#!/dashboardgeneral.html',
pageIds: ['dashboardGeneralPage'],
icon: 'settings'
}, {
name: globalize.translate('HeaderUsers'),
href: 'userprofiles.html',
href: '#!/userprofiles.html',
pageIds: ['userProfilesPage', 'newUserPage', 'editUserPage', 'userLibraryAccessPage', 'userParentalControlPage', 'userPasswordPage'],
icon: 'people'
}, {
name: globalize.translate('HeaderLibraries'),
href: 'library.html',
href: '#!/library.html',
pageIds: ['mediaLibraryPage', 'librarySettingsPage', 'libraryDisplayPage', 'metadataImagesConfigurationPage', 'metadataNfoPage'],
icon: 'folder'
}, {
name: globalize.translate('TitlePlayback'),
icon: 'play_arrow',
href: 'encodingsettings.html',
href: '#!/encodingsettings.html',
pageIds: ['encodingSettingsPage', 'playbackConfigurationPage', 'streamingSettingsPage']
}];
addPluginPagesToMainMenu(links, pluginItems, 'server');
@ -421,25 +421,25 @@ import Headroom from 'headroom.js';
});
links.push({
name: globalize.translate('HeaderDevices'),
href: 'devices.html',
href: '#!/devices.html',
pageIds: ['devicesPage', 'devicePage'],
icon: 'devices'
});
links.push({
name: globalize.translate('QuickConnect'),
href: 'quickConnect.html',
href: '#!/quickConnect.html',
pageIds: ['quickConnectPage'],
icon: 'tap_and_play'
});
links.push({
name: globalize.translate('HeaderActivity'),
href: 'serveractivity.html',
href: '#!/serveractivity.html',
pageIds: ['serverActivityPage'],
icon: 'assessment'
});
links.push({
name: globalize.translate('DLNA'),
href: 'dlnasettings.html',
href: '#!/dlnasettings.html',
pageIds: ['dlnaSettingsPage', 'dlnaProfilesPage', 'dlnaProfilePage'],
icon: 'input'
});
@ -449,13 +449,13 @@ import Headroom from 'headroom.js';
});
links.push({
name: globalize.translate('LiveTV'),
href: 'livetvstatus.html',
href: '#!/livetvstatus.html',
pageIds: ['liveTvStatusPage', 'liveTvTunerPage'],
icon: 'live_tv'
});
links.push({
name: globalize.translate('HeaderDVR'),
href: 'livetvsettings.html',
href: '#!/livetvsettings.html',
pageIds: ['liveTvSettingsPage'],
icon: 'dvr'
});
@ -466,36 +466,36 @@ import Headroom from 'headroom.js';
links.push({
name: globalize.translate('TabNetworking'),
icon: 'cloud',
href: 'networking.html',
href: '#!/networking.html',
pageIds: ['networkingPage']
});
links.push({
name: globalize.translate('HeaderApiKeys'),
icon: 'vpn_key',
href: 'apikeys.html',
href: '#!/apikeys.html',
pageIds: ['apiKeysPage']
});
links.push({
name: globalize.translate('TabLogs'),
href: 'log.html',
href: '#!/log.html',
pageIds: ['logPage'],
icon: 'bug_report'
});
links.push({
name: globalize.translate('TabNotifications'),
icon: 'notifications',
href: 'notificationsettings.html',
href: '#!/notificationsettings.html',
pageIds: ['notificationSettingsPage', 'notificationSettingPage']
});
links.push({
name: globalize.translate('TabPlugins'),
icon: 'shopping_cart',
href: 'installedplugins.html',
href: '#!/installedplugins.html',
pageIds: ['pluginsPage', 'pluginCatalogPage']
});
links.push({
name: globalize.translate('TabScheduledTasks'),
href: 'scheduledtasks.html',
href: '#!/scheduledtasks.html',
pageIds: ['scheduledTasksPage', 'scheduledTaskPage'],
icon: 'schedule'
});
@ -567,7 +567,7 @@ import Headroom from 'headroom.js';
function createDashboardMenu(apiClient) {
return getToolsMenuHtml(apiClient).then(function (toolsMenuHtml) {
let html = '';
html += '<a class="adminDrawerLogo clearLink" is="emby-linkbutton" href="home.html">';
html += '<a class="adminDrawerLogo clearLink" is="emby-linkbutton" href="#!/home.html">';
html += '<img src="assets/img/icon-transparent.png" />';
html += '</a>';
html += toolsMenuHtml;