Move NSFW button to the draft action bar.

This commit is contained in:
Nicolas Perriault 2017-05-18 23:23:44 +02:00
parent 310fc2705e
commit 6f09a341e4
No known key found for this signature in database
GPG Key ID: DA5E4C83904F7A2A
2 changed files with 26 additions and 18 deletions

View File

@ -143,10 +143,14 @@ li.load-more {
padding-top: 6px;
}
.btn-group-justified .btn,
.btn-group-justified .btn:focus {
outline: 0;
}
.btn-group-justified.column-menu .btn {
border-radius: 0;
border-bottom: 0;
outline: 0;
}
.notification.reblog,
@ -403,13 +407,14 @@ li.load-more {
clear: both;
}
.charcount {
cursor: default;
.btn-nsfw {
font-size: 10px;
font-weight: bold;
line-height: 20px;
}
.draft-actions .btn-group:nth-child(2) {
width: .5%;
min-width: 30px;
.charcount {
cursor: default;
}
.in-reply-to .well {

View File

@ -256,24 +256,27 @@ draftView ({ draft, currentUser } as model) =
]
, visibilitySelector draft
, fileUploadField draft
, div [ class "form-group checkbox" ]
[ label []
[ input
[ type_ "checkbox"
, onCheck <| DraftEvent << UpdateSensitive
, checked draft.sensitive
]
[]
, text " This post is NSFW"
]
]
, Common.justifiedButtonGroup "draft-actions"
[ button
[ type_ "button"
, class "btn btn-default"
, title "Clear this draft"
, onClick (DraftEvent ClearDraft)
]
[ text "Clear" ]
[ Common.icon "trash" ]
, button
[ type_ "button"
, class <|
"btn btn-default btn-nsfw "
++ (if draft.sensitive then
"btn-primary active"
else
""
)
, title "Mark this post as Not Safe For Work (sensitive content)"
, onClick <| DraftEvent (UpdateSensitive (not draft.sensitive))
]
[ text "NSFW" ]
, div
[ class <|
if limitExceeded then