Minor code cleanups.
This commit is contained in:
parent
09b52a2c7f
commit
4385aed0a2
13
src/View.elm
13
src/View.elm
@ -9,8 +9,8 @@ import Mastodon
|
|||||||
import Model exposing (Model, Draft, DraftMsg(..), Viewer, ViewerMsg(..), Msg(..))
|
import Model exposing (Model, Draft, DraftMsg(..), Viewer, ViewerMsg(..), Msg(..))
|
||||||
import ViewHelper
|
import ViewHelper
|
||||||
import Date
|
import Date
|
||||||
import Date.Extra.Config.Config_en_au exposing (config)
|
import Date.Extra.Config.Config_en_au as DateEn
|
||||||
import Date.Extra.Format as Format exposing (format)
|
import Date.Extra.Format as DateFormat
|
||||||
|
|
||||||
|
|
||||||
visibilities : Dict.Dict String String
|
visibilities : Dict.Dict String String
|
||||||
@ -153,10 +153,9 @@ statusView ({ account, content, media_attachments, reblog, mentions } as status)
|
|||||||
let
|
let
|
||||||
accountLinkAttributes =
|
accountLinkAttributes =
|
||||||
[ href account.url
|
[ href account.url
|
||||||
|
-- When clicking on a status, we should not let the browser
|
||||||
-- When clicking on a status, we should not let the browser
|
-- redirect to a new page. That's why we're preventing the default
|
||||||
-- redirect to a new page. That's why we're preventing the default
|
-- behavior here
|
||||||
-- behavior here
|
|
||||||
, ViewHelper.onClickWithPreventAndStop (OnLoadUserAccount account.id)
|
, ViewHelper.onClickWithPreventAndStop (OnLoadUserAccount account.id)
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
@ -267,7 +266,7 @@ statusActionsView status =
|
|||||||
|> Result.withDefault (Date.fromTime 0)
|
|> Result.withDefault (Date.fromTime 0)
|
||||||
|
|
||||||
formatDate =
|
formatDate =
|
||||||
text <| format config "%m/%d/%Y %H:%M" tootDate
|
text <| DateFormat.format DateEn.config "%m/%d/%Y %H:%M" tootDate
|
||||||
in
|
in
|
||||||
div [ class "btn-group actions" ]
|
div [ class "btn-group actions" ]
|
||||||
[ a
|
[ a
|
||||||
|
Loading…
Reference in New Issue
Block a user