diff --git a/public/style.css b/public/style.css index 088fb6e..76e6a4f 100644 --- a/public/style.css +++ b/public/style.css @@ -769,6 +769,10 @@ input.form-control[type="file"] { position: relative; } +.account-detail .account-header-image a { + cursor: pointer; +} + .account-detail .account-header-image img { border-radius: 0; margin: 0; @@ -784,12 +788,15 @@ input.form-control[type="file"] { } .account-detail .account-header-bar { - margin-top: -40px; padding: 0 20px; position: relative; display: flex; } +.account-detail .account-header-bar > a { + margin-top: -40px; +} + .account-detail .account-header-actions { display: flex; flex-grow: 1; diff --git a/src/View/Account.elm b/src/View/Account.elm index 2324333..2a27ecb 100644 --- a/src/View/Account.elm +++ b/src/View/Account.elm @@ -10,6 +10,7 @@ import Mastodon.Helper exposing (extractStatusId) import Mastodon.Model exposing (..) import Types exposing (..) import View.Common as Common +import View.Events exposing (onClickWithPreventAndStop) import View.Formatter exposing (formatContentWithEmojis, getDisplayNameForAccount) import View.Status exposing (statusEntryView) @@ -272,7 +273,30 @@ accountView subView currentUser accountInfo = ) ) ] - [ img [ src account.header ] [] ] + [ a + [] + [ img + [ let + attachment = + { id = "header" + , type_ = "image" + , url = account.header + , remote_url = Nothing + , preview_url = Nothing + , text_url = Nothing + , description = Nothing + } + + attachments = + [ attachment ] + in + onClickWithPreventAndStop <| + ViewerEvent (OpenViewer attachments attachment) + , src account.header + ] + [] + ] + ] , div [ class "account-header-bar" ] [ Common.accountAvatarLink True (Just [ "avatar-detailed" ]) account , div [ class "account-header-actions" ]