Merge pull request 'Allow expanding content warnings & playing media w/out opening subnote' (#9560) from Freeplay/calckey:note-improvements into develop

Reviewed-on: https://codeberg.org/calckey/calckey/pulls/9560
This commit is contained in:
Kainoa Kanter 2023-02-07 03:28:21 +00:00
commit 9079d616c6
4 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,5 @@
<template>
<button class="nrvgflfu _button" @click="toggle">
<button class="nrvgflfu _button" @click.stop.prevent="toggle">
<b>{{ modelValue ? i18n.ts._cw.hide : i18n.ts._cw.show }}</b>
<span v-if="!modelValue">{{ label }}</span>
</button>

View File

@ -2,7 +2,7 @@
<div class="hoawjimk">
<XBanner v-for="media in mediaList.filter(media => !previewable(media))" :key="media.id" :media="media"/>
<div v-if="mediaList.filter(media => previewable(media)).length > 0" class="gird-container" :class="{ dmWidth: inDm }">
<div ref="gallery" :data-count="mediaList.filter(media => previewable(media)).length">
<div ref="gallery" :data-count="mediaList.filter(media => previewable(media)).length" @click.stop.prevent>
<template v-for="media in mediaList.filter(media => previewable(media))">
<XVideo v-if="media.type.startsWith('video')" :key="media.id" :video="media"/>
<XImage v-else-if="media.type.startsWith('image')" :key="media.id" class="image" :data-id="media.id" :image="media" :raw="raw"/>

View File

@ -62,10 +62,10 @@
<XPoll v-if="appearNote.poll" ref="pollViewer" :note="appearNote" class="poll"/>
<MkUrlPreview v-for="url in urls" :key="url" :url="url" :compact="true" :detail="false" class="url-preview"/>
<div v-if="appearNote.renote" class="renote"><XNoteSimple :note="appearNote.renote"/></div>
<button v-if="isLong && collapsed" class="fade _button" @click="collapsed = false">
<button v-if="isLong && collapsed" class="fade _button" @click.stop.prevent="collapsed = false">
<span>{{ i18n.ts.showMore }}</span>
</button>
<button v-else-if="isLong && !collapsed" class="showLess _button" @click="collapsed = true">
<button v-else-if="isLong && !collapsed" class="showLess _button" @click.stop.prevent="collapsed = true">
<span>{{ i18n.ts.showLess }}</span>
</button>
</div>

View File

@ -14,10 +14,10 @@
<summary>{{ i18n.ts.poll }}</summary>
<XPoll :note="note"/>
</div>
<button v-if="isLong && collapsed" class="fade _button" @click="collapsed = false">
<button v-if="isLong && collapsed" class="fade _button" @click.stop.prevent="collapsed = false">
<span>{{ i18n.ts.showMore }}</span>
</button>
<button v-if="isLong && !collapsed" class="showLess _button" @click="collapsed = true">
<button v-if="isLong && !collapsed" class="showLess _button" @click.stop.prevent="collapsed = true">
<span>{{ i18n.ts.showLess }}</span>
</button>
</div>