Compare commits

..

No commits in common. "b19136c29465a89645aa6f0ed9c8172e46a14c71" and "7a5a48fa253a11f87754565858234a5646ba5295" have entirely different histories.

9 changed files with 43 additions and 92 deletions

View file

@ -9,4 +9,3 @@ second language input not having header
post form's bottom left buttons not showing their toggled state
some font overrides not working
popovers opening outside of window's boundaries
occasional blank page when showing new posts

View file

@ -50,7 +50,7 @@ body {
// have a cursor/pointer to operate them
@media (any-pointer: fine) {
* {
scrollbar-color: var(--text) transparent;
scrollbar-color: var(--fg) transparent;
&::-webkit-scrollbar {
background: transparent;
@ -130,7 +130,7 @@ body {
}
// Body should have background to scrollbar otherwise it will use white (body color?)
html {
scrollbar-color: var(--text) var(--wallpaper);
scrollbar-color: var(--fg) var(--wallpaper);
background: var(--wallpaper);
}
}
@ -815,11 +815,9 @@ option {
align-items: baseline;
line-height: 1.5;
p,
span {
display: block;
flex: 1 1 auto;
margin: 0;
}
.dismiss {

View file

@ -4,7 +4,6 @@ import nsfwImage from '../../assets/nsfw.png'
import Flash from '../flash/flash.vue'
import StillImage from '../still-image/still-image.vue'
import VideoAttachment from '../video_attachment/video_attachment.vue'
import Popover from '../popover/popover.vue'
import { useInstanceStore } from 'src/stores/instance.js'
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
@ -66,13 +65,13 @@ const Attachment = {
modalOpen: false,
showHidden: false,
flashLoaded: false,
showDescription: false,
}
},
components: {
Flash,
StillImage,
VideoAttachment,
Popover,
},
computed: {
classNames() {
@ -181,6 +180,9 @@ const Attachment = {
setFlashLoaded(event) {
this.flashLoaded = event
},
toggleDescription() {
this.showDescription = !this.showDescription
},
toggleHidden(event) {
if (
this.mergedConfig.useOneClickNsfw &&

View file

@ -134,7 +134,7 @@
width: 2em;
height: 2em;
margin-left: 0.5em;
font-size: 1em;
font-size: 1.25em;
}
}
@ -265,25 +265,3 @@
}
}
}
.description-popover {
padding: 1em;
width: 50ch;
overflow: hidden;
summary {
display: inline-block;
margin-bottom: 0.5em;
font-weight: bold;
pointer-events: none;
}
span {
display: block;
overflow-y: auto;
max-height: 10.5em;
text-wrap: pretty;
line-height: 1.5;
white-space: pre-wrap;
}
}

View file

@ -30,16 +30,21 @@
</button>
</div>
<div
v-if="size !== 'hide' && !hideDescription && edit"
v-if="size !== 'hide' && !hideDescription && (edit || localDescription || showDescription)"
class="description-container"
:class="{ '-static': !edit }"
>
<textarea
<input
v-if="edit"
v-model="localDescription"
type="text"
class="input description-field"
:placeholder="$t('post_status.media_description')"
/>
@keydown.enter.prevent=""
>
<p v-else>
{{ localDescription }}
</p>
</div>
</button>
<div
@ -82,22 +87,14 @@
>
<FAIcon icon="stop" />
</button>
<Popover
<button
v-if="attachment.description && size !== 'small' && !edit && attachment.type !== 'unknown'"
trigger="click"
popover-class="popover popover-default description-popover"
:trigger-attrs="{ 'class': 'button-default attachment-button -transparent', 'title': $t('status.attachment_description') }"
>
<template #trigger>
<FAIcon icon="align-right" />
</template>
<template #content>
<details open>
<summary>{{ $t('status.attachment_description') }}</summary>
<span>{{ localDescription }}</span>
</details>
</template>
</Popover>
class="button-default attachment-button -transparent"
:title="$t('status.show_attachment_description')"
@click.prevent="toggleDescription"
>
<FAIcon icon="align-right" />
</button>
<button
v-if="!useModal && attachment.type !== 'unknown'"
class="button-default attachment-button -transparent"
@ -247,16 +244,21 @@
</span>
</div>
<div
v-if="size !== 'hide' && !hideDescription && edit"
v-if="size !== 'hide' && !hideDescription && (edit || (localDescription && showDescription))"
class="description-container"
:class="{ '-static': !edit }"
>
<textarea
<input
v-if="edit"
v-model="localDescription"
type="text"
class="input description-field"
:placeholder="$t('post_status.media_description')"
/>
@keydown.enter.prevent=""
>
<p v-else>
{{ localDescription }}
</p>
</div>
</div>
</template>

View file

@ -129,7 +129,7 @@
.gallery-item {
margin: 0;
height: 20em;
height: 15em;
}
}
}

View file

@ -89,16 +89,13 @@
/>
</button>
<details
open
<span
v-if="description"
class="description"
>
<summary>{{ $t('status.attachment_description') }}</summary>
<span>{{ description }}</span>
</details>
{{ description }}
</span>
<span
v-if="media.length > 1"
class="counter"
>
{{ $t('media_modal.counter', { current: currentIndex + 1, total: media.length }, currentIndex + 1) }}
@ -162,43 +159,19 @@ $modal-view-button-icon-margin: 0.5em;
.counter {
/* Hardcoded since background is also hardcoded */
color: white;
text-shadow: 0 0 1em black, 0 0 1em black, 0 0 1em black;
margin: 1em 2em;
overflow: hidden;
}
.description + .counter {
margin-top: 0;
margin-top: 1em;
text-shadow: 0 0 10px black, 0 0 10px black;
padding: 0.2em 2em;
}
.description {
flex: 0 0 auto;
max-width: 80ch;
overflow-y: auto;
min-height: 1em;
max-width: 35.8em;
max-height: 9.5em;
summary {
margin-bottom: 0.5em;
display: inline-block;
font-weight: bold;
pointer-events: none;
}
span {
display: block;
overflow-y: auto;
min-height: 1em;
text-wrap: pretty;
max-height: 10.5em;
white-space: pre-wrap;
line-height: 1.5;
scrollbar-color: white transparent;
&::-webkit-scrollbar-button,
&::-webkit-scrollbar-thumb {
background-color: white;
}
}
overflow-wrap: break-word;
text-wrap: pretty;
}
.modal-image {

View file

@ -53,7 +53,6 @@
.preview-heading {
display: flex;
flex-wrap: wrap;
margin: 0 0.5em;
}
.preview-toggle {
@ -107,6 +106,7 @@
display: flex;
justify-content: space-between;
align-items: baseline;
margin-left: -0.5em;
}
.visibility-notice {

View file

@ -1602,7 +1602,6 @@
"show_all_attachments": "Show all attachments",
"show_attachment_in_modal": "Show in media modal",
"show_attachment_description": "Preview description (open attachment for full description)",
"attachment_description": "Attachment description",
"hide_attachment": "Hide attachment",
"remove_attachment": "Remove attachment",
"attachment_stop_flash": "Stop Flash player",