1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix lint errors

This commit is contained in:
Bill Thornton 2025-02-20 12:51:59 -05:00
parent 7d9acf30b6
commit 4730a30c3d
29 changed files with 53 additions and 23 deletions

View file

@ -1,4 +1,3 @@
import { appHost } from 'components/apphost';
import cardBuilder from 'components/cardbuilder/cardBuilder';
import focusManager from 'components/focusManager';
import layoutManager from 'components/layoutManager';
@ -202,8 +201,9 @@ function getRouteUrl(section, serverId) {
function getItemsHtmlFn(section) {
return function (items) {
let cardLayout = appHost.preferVisualCards && section.autoCardLayout && section.showTitle;
cardLayout = false;
// NOTE: Why is card layout always disabled?
// let cardLayout = appHost.preferVisualCards && section.autoCardLayout && section.showTitle;
const cardLayout = false;
const serverId = this.apiClient.serverId();
const leadingButtons = layoutManager.tv ? [{
name: globalize.translate('All'),

View file

@ -877,6 +877,7 @@ function renderOverview(page, item) {
const overviewElements = page.querySelectorAll('.overview');
if (overviewElements.length > 0) {
// eslint-disable-next-line sonarjs/disabled-auto-escaping
const overview = DOMPurify.sanitize(markdownIt({ html: true }).render(item.Overview || ''));
if (overview) {
@ -1378,6 +1379,7 @@ function renderChildren(page, item) {
if (item.Type == 'MusicAlbum') {
let showArtist = false;
for (const track of result.Items) {
// eslint-disable-next-line sonarjs/no-alphabetical-sort
if (!isEqual(track.ArtistItems.map(x => x.Id).sort(), track.AlbumArtists.map(x => x.Id).sort())) {
showArtist = true;
break;

View file

@ -36,6 +36,7 @@ function handleConnectionResult(page, result) {
function submitServer(page) {
loading.show();
// eslint-disable-next-line sonarjs/slow-regex
const host = page.querySelector('#txtServerHost').value.replace(/\/+$/, '');
ServerConnections.connectToAddress(host, {
enableAutoLogin: appSettings.enableAutoLogin()

View file

@ -292,6 +292,7 @@ export default function (view, params) {
apiClient.getJSON(apiClient.getUrl('Branding/Configuration')).then(function (options) {
const loginDisclaimer = view.querySelector('.loginDisclaimer');
// eslint-disable-next-line sonarjs/disabled-auto-escaping
loginDisclaimer.innerHTML = DOMPurify.sanitize(markdownIt({ html: true }).render(options.LoginDisclaimer || ''));
for (const elem of loginDisclaimer.querySelectorAll('a')) {