mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-23 17:55:44 +03:00
Add "Mark media as sensitive" checkbox
It does the same thing as spoiler text toggle.
This commit is contained in:
parent
e7dffecfe0
commit
a522511e0e
2 changed files with 24 additions and 0 deletions
|
@ -324,6 +324,16 @@
|
|||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
#compose-container .media-sensitive {
|
||||
padding: 8px;
|
||||
background-color: var(--bg-blur-color);
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
#compose-container .media-sensitive > * {
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#compose-container form .poll {
|
||||
background-color: var(--bg-faded-color);
|
||||
border-radius: 8px;
|
||||
|
|
|
@ -876,6 +876,20 @@ function Compose({
|
|||
/>
|
||||
);
|
||||
})}
|
||||
<label class="media-sensitive">
|
||||
<input
|
||||
name="sensitive"
|
||||
type="checkbox"
|
||||
checked={sensitive}
|
||||
disabled={uiState === 'loading'}
|
||||
onChange={(e) => {
|
||||
const sensitive = e.target.checked;
|
||||
setSensitive(sensitive);
|
||||
}}
|
||||
/>{' '}
|
||||
<span>Mark media as sensitive</span>{' '}
|
||||
<Icon icon={`eye-${sensitive ? 'close' : 'open'}`} />
|
||||
</label>
|
||||
</div>
|
||||
)}
|
||||
{!!poll && (
|
||||
|
|
Loading…
Reference in a new issue