mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-13 03:26:21 +01:00
Slight adjustments to media alt edit sheet
This commit is contained in:
parent
4723358d2d
commit
eace6c4d9b
3 changed files with 46 additions and 9 deletions
|
@ -1335,12 +1335,16 @@ body:has(.media-modal-container + .status-deck) .media-post-link {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.sheet-max {
|
.sheet-max {
|
||||||
width: 90vw;
|
|
||||||
width: 90dvw;
|
|
||||||
max-width: none;
|
max-width: none;
|
||||||
height: 90vh;
|
height: 90vh;
|
||||||
height: 90dvh;
|
height: 90dvh;
|
||||||
}
|
}
|
||||||
|
@media (min-width: 40em) {
|
||||||
|
.sheet {
|
||||||
|
width: 90vw;
|
||||||
|
width: 90dvw;
|
||||||
|
}
|
||||||
|
}
|
||||||
.sheet .sheet-close {
|
.sheet .sheet-close {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
|
|
@ -487,7 +487,28 @@
|
||||||
padding-inline: 24px;
|
padding-inline: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#media-sheet {
|
||||||
|
.media-form {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 8px;
|
||||||
|
min-height: 50vh;
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
flex-grow: 1;
|
||||||
|
resize: none;
|
||||||
|
width: 100%;
|
||||||
|
/* height: 10em; */
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
#media-sheet main {
|
#media-sheet main {
|
||||||
padding-top: 8px;
|
padding-top: 8px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -495,10 +516,6 @@
|
||||||
flex: 1;
|
flex: 1;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
}
|
}
|
||||||
#media-sheet textarea {
|
|
||||||
width: 100%;
|
|
||||||
height: 10em;
|
|
||||||
}
|
|
||||||
#media-sheet .media-preview {
|
#media-sheet .media-preview {
|
||||||
border: 2px solid var(--outline-color);
|
border: 2px solid var(--outline-color);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
@ -515,6 +532,7 @@
|
||||||
linear-gradient(-45deg, transparent 75%, var(--img-bg-color) 75%);
|
linear-gradient(-45deg, transparent 75%, var(--img-bg-color) 75%);
|
||||||
background-size: 20px 20px;
|
background-size: 20px 20px;
|
||||||
background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
|
background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
|
||||||
|
flex: 0.8;
|
||||||
}
|
}
|
||||||
#media-sheet .media-preview > * {
|
#media-sheet .media-preview > * {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -534,11 +552,11 @@
|
||||||
#media-sheet .media-preview > * {
|
#media-sheet .media-preview > * {
|
||||||
max-height: none;
|
max-height: none;
|
||||||
}
|
}
|
||||||
#media-sheet textarea {
|
/* #media-sheet textarea {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
} */
|
||||||
}
|
}
|
||||||
|
|
||||||
#custom-emojis-sheet {
|
#custom-emojis-sheet {
|
||||||
|
|
|
@ -1545,6 +1545,7 @@ function MediaAttachment({
|
||||||
<div class="media-attachment">
|
<div class="media-attachment">
|
||||||
<div
|
<div
|
||||||
class="media-preview"
|
class="media-preview"
|
||||||
|
tabIndex="0"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setShowModal(true);
|
setShowModal(true);
|
||||||
}}
|
}}
|
||||||
|
@ -1571,6 +1572,7 @@ function MediaAttachment({
|
||||||
</div>
|
</div>
|
||||||
{showModal && (
|
{showModal && (
|
||||||
<Modal
|
<Modal
|
||||||
|
class="light"
|
||||||
onClick={(e) => {
|
onClick={(e) => {
|
||||||
if (e.target === e.currentTarget) {
|
if (e.target === e.currentTarget) {
|
||||||
setShowModal(false);
|
setShowModal(false);
|
||||||
|
@ -1608,7 +1610,20 @@ function MediaAttachment({
|
||||||
<audio src={url} controls />
|
<audio src={url} controls />
|
||||||
) : null}
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
{descTextarea}
|
<div class="media-form">
|
||||||
|
{descTextarea}
|
||||||
|
<footer>
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="light block"
|
||||||
|
onClick={() => {
|
||||||
|
setShowModal(false);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
Done
|
||||||
|
</button>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
Loading…
Reference in a new issue