mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-24 22:44:43 +01:00
Move spoiler text to inside the button
This commit is contained in:
parent
1a73e32211
commit
e116d164e8
1 changed files with 4 additions and 24 deletions
|
@ -1889,21 +1889,12 @@ function Status({
|
|||
<>
|
||||
{(!!spoilerText || !!sensitive) && !readingExpandSpoilers && (
|
||||
<>
|
||||
{!!spoilerText && (
|
||||
<span
|
||||
class="spoiler-content media-first-spoiler-content"
|
||||
lang={language}
|
||||
dir="auto"
|
||||
ref={spoilerContentRef}
|
||||
data-read-more={_(readMoreText)}
|
||||
>
|
||||
<EmojiText text={spoilerText} emojis={emojis} />{' '}
|
||||
</span>
|
||||
)}
|
||||
<button
|
||||
class={`light spoiler-button media-first-spoiler-button ${
|
||||
showSpoiler ? 'spoiling' : ''
|
||||
}`}
|
||||
lang={language}
|
||||
dir="auto"
|
||||
type="button"
|
||||
onClick={(e) => {
|
||||
e.preventDefault();
|
||||
|
@ -1922,7 +1913,7 @@ function Status({
|
|||
}}
|
||||
>
|
||||
<Icon icon={showSpoiler ? 'eye-open' : 'eye-close'} />{' '}
|
||||
{showSpoiler ? t`Show less` : t`Show content`}
|
||||
{spoilerText ? <EmojiText text={spoilerText} emojis={emojis} /> : showSpoiler ? t`Show less` : t`Show content`}
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
|
@ -1946,17 +1937,6 @@ function Status({
|
|||
<>
|
||||
{!!spoilerText && (
|
||||
<>
|
||||
<div
|
||||
class="content spoiler-content"
|
||||
lang={language}
|
||||
dir="auto"
|
||||
ref={spoilerContentRef}
|
||||
data-read-more={_(readMoreText)}
|
||||
>
|
||||
<p>
|
||||
<EmojiText text={spoilerText} emojis={emojis} />
|
||||
</p>
|
||||
</div>
|
||||
{readingExpandSpoilers || previewMode ? (
|
||||
<div class="spoiler-divider">
|
||||
<Icon icon="eye-open" /> <Trans>Content warning</Trans>
|
||||
|
@ -1984,7 +1964,7 @@ function Status({
|
|||
}}
|
||||
>
|
||||
<Icon icon={showSpoiler ? 'eye-open' : 'eye-close'} />{' '}
|
||||
{showSpoiler ? t`Show less` : t`Show content`}
|
||||
{!!spoilerText ? <EmojiText text={spoilerText} emojis={emojis} /> : showSpoiler ? t`Show less` : t`Show content`}
|
||||
</button>
|
||||
)}
|
||||
</>
|
||||
|
|
Loading…
Add table
Reference in a new issue