Compare commits

..

No commits in common. "da97f690b1f6215ac78d2dc7f00655d48dbd5c91" and "6a5db559ea78a3beb06ba675b0f2afe00ed54507" have entirely different histories.

9 changed files with 5 additions and 66 deletions

View File

@ -1,5 +1,5 @@
body {
font-family: sans-serif;
font-family: Roboto, sans-serif;
padding: 0;
margin: 0;
}
@ -688,20 +688,12 @@ form.search {
.draft-attachment-entry {
display: table-cell;
width: 25%;
height: 125px;
}
.draft-attachment-entry input {
height: 2em;
width: 100%;
background: rgba(255,255,255,0.5);
color: #000;
border: none;
height: 60px;
}
.draft-attachment-entry a {
display: block;
height: 100%;
height: 60px;
opacity: 0;
background: transparent;
font-size: 45px;
@ -946,30 +938,11 @@ input.form-control[type=file] {
animation-duration: 0.1s;
}
div.viewer-content {
display: flex;
flex-flow: column;
}
audio.viewer-content {
min-height: 0;
width: 75%;
}
.viewer-content img {
max-height: 100%;
max-width: 100%;
overflow: hidden;
object-fit: contain;
}
.viewer-content .alt-text {
text-align: center;
font-size: large;
margin: 1em auto 0 auto;
max-width: 1080px;
}
@keyframes zoom {
from { transform: scale(.9) }
to { transform: scale(1) }

View File

@ -30,7 +30,6 @@ module Mastodon.ApiUrl
, block
, unblock
, uploadMedia
, updateMedia
, streaming
, search
)
@ -210,8 +209,3 @@ streaming =
uploadMedia : String
uploadMedia =
apiPrefix ++ "/media"
updateMedia : String -> String
updateMedia id =
apiPrefix ++ "/media/" ++ id

View File

@ -155,7 +155,6 @@ attachmentDecoder =
|> Pipe.optional "remote_url" Decode.string ""
|> Pipe.optional "preview_url" Decode.string ""
|> Pipe.optional "text_url" (Decode.nullable Decode.string) Nothing
|> Pipe.optional "description" (Decode.nullable Decode.string) Nothing
contextDecoder : Decode.Decoder Context

View File

@ -161,7 +161,6 @@ type alias Attachment =
, remote_url : String
, preview_url : String
, text_url : Maybe String
, description : Maybe String
}

View File

@ -6,7 +6,6 @@ port module Ports
, saveClients
, setStatus
, uploadMedia
, updateMedia
, notify
, uploadSuccess
, uploadError
@ -33,9 +32,6 @@ port scrollIntoView : String -> Cmd msg
port uploadMedia : { id : String, url : String, token : String } -> Cmd msg
port updateMedia : { id : String, url : String, token : String, description : String } -> Cmd msg
port notify : { title : String, icon : String, body : String, clickUrl : String } -> Cmd msg

View File

@ -22,7 +22,6 @@ type DraftMsg
| SelectAccount String
| SetAutoState Autocomplete.Msg
| ToggleSpoiler Bool
| UpdateAltText String String
| UpdateInputInformation InputInformation
| UpdateSensitive Bool
| UpdateSpoiler String

View File

@ -101,17 +101,6 @@ update draftMsg currentUser ({ draft } as model) =
in
{ model | draft = newDraft } ! []
UpdateAltText id altText ->
{ model | draft = { draft | attachments =
draft.attachments |> List.map
(\a ->
if a.id == id then
{ a | description = Just altText }
else
a
)
} } ! []
UpdateSensitive sensitive ->
{ model | draft = { draft | sensitive = sensitive } } ! []

View File

@ -312,12 +312,7 @@ draftAttachments attachments =
[ href ""
, onClickWithPreventAndStop <| DraftEvent (RemoveMedia attachment.id)
]
[ text "×" ],
input
[ type_ "field"
, placeholder "Alt text",
onInput <| DraftEvent << (UpdateAltText attachment.id)]
[]
[ text "×" ]
]
in
div [ class "draft-attachments-field" ]

View File

@ -25,8 +25,6 @@ viewerView ({ attachments, attachment } as viewer) =
, onClickWithPreventAndStop event
]
[ text label ]
altText = Maybe.withDefault "No description. 😢" attachment.description
in
div
[ class "viewer"
@ -37,10 +35,7 @@ viewerView ({ attachments, attachment } as viewer) =
, navLink "" "prev" prev <| ViewerEvent NextAttachment
, case attachment.type_ of
"image" ->
div [ class "viewer-content" ] [
img [ src attachment.url, alt altText, title altText ] [],
span [ class "alt-text" ] [ text altText ]
]
img [ class "viewer-content", src attachment.url ] []
"audio" ->
audio