mirror of
https://github.com/NoCrypt/migu.git
synced 2026-04-20 08:02:12 +00:00
fix: remove @html from AL responses
This commit is contained in:
parent
872e5f8676
commit
000f39ced0
4 changed files with 13 additions and 7 deletions
|
|
@ -75,8 +75,8 @@ export let length = 5
|
|||
</span>
|
||||
</p>
|
||||
</div>
|
||||
<div class='overflow-y-auto px-15 pb-5 bg-very-dark card-desc'>
|
||||
{@html card.media.description}
|
||||
<div class='overflow-y-auto px-15 pb-5 bg-very-dark card-desc pre-wrap'>
|
||||
{card.media.description.replace(/<[^>]*>/g, '')}
|
||||
</div>
|
||||
<div class='px-15 pb-10 pt-5 genres'>
|
||||
{#each card.media.genres as genre}
|
||||
|
|
@ -96,6 +96,9 @@ export let length = 5
|
|||
{/await}
|
||||
|
||||
<style>
|
||||
.pre-wrap {
|
||||
white-space: pre-wrap
|
||||
}
|
||||
.empty {
|
||||
height: 27rem;
|
||||
grid-column: 1 / -1;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ const detailsMap = [
|
|||
function getCustomProperty (detail, media) {
|
||||
if (detail.property === 'episodes') {
|
||||
if (media.mediaListEntry?.progress) {
|
||||
return `Watched <b>${media.mediaListEntry.progress}</b> of <b>${getMediaMaxEp(media)}</b>`
|
||||
return `Watched ${media.mediaListEntry.progress} of ${getMediaMaxEp(media)}`
|
||||
}
|
||||
return `${getMediaMaxEp(media)} Episodes`
|
||||
} else if (detail.property === 'averageScore') {
|
||||
|
|
@ -58,7 +58,7 @@ function getProperty (property, media) {
|
|||
<div class='d-flex flex-column justify-content-center text-nowrap'>
|
||||
<div class='font-weight-bold'>
|
||||
{#if detail.custom === 'property'}
|
||||
{@html getCustomProperty(detail, media)}
|
||||
{getCustomProperty(detail, media)}
|
||||
{:else if property.constructor === Array}
|
||||
{property === 'nodes' ? property[0] && property[0].name : property.join(', ').replace(/_/g, ' ').toLowerCase()}
|
||||
{:else}
|
||||
|
|
|
|||
|
|
@ -83,8 +83,8 @@ function checkClose ({ keyCode }) {
|
|||
<div class='row p-20 px-xl-0 flex-column-reverse flex-md-row'>
|
||||
<div class='col-md-9 px-20'>
|
||||
<h1 class='title font-weight-bold text-white'>Synopsis</h1>
|
||||
<div class='font-size-16 pr-15'>
|
||||
{@html media.description}
|
||||
<div class='font-size-16 pr-15 pre-wrap'>
|
||||
{media.description.replace(/<[^>]*>/g, '')}
|
||||
</div>
|
||||
<ToggleList list={media.relations?.edges?.filter(({ node }) => node.type === 'ANIME')} let:item>
|
||||
<div class='w-150 mx-15 mb-10 rel pointer' on:click={async () => { $view = null; $view = (await alRequest({ method: 'SearchIDSingle', id: item.node.id })).data.Media }}>
|
||||
|
|
@ -134,6 +134,9 @@ function checkClose ({ keyCode }) {
|
|||
</div>
|
||||
|
||||
<style>
|
||||
.pre-wrap {
|
||||
white-space: pre-wrap
|
||||
}
|
||||
.banner {
|
||||
background: no-repeat center center;
|
||||
background-size: cover;
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ title {
|
|||
native,
|
||||
userPreferred
|
||||
},
|
||||
description(asHtml: true),
|
||||
description(asHtml: false),
|
||||
season,
|
||||
seasonYear,
|
||||
format,
|
||||
|
|
|
|||
Loading…
Reference in a new issue