Add a button to close the account view.
This commit is contained in:
parent
d8f5270128
commit
82ada5ede8
@ -28,7 +28,8 @@ body {
|
||||
.panel-heading {
|
||||
font-weight: bold;
|
||||
}
|
||||
.panel-heading > .glyphicon {
|
||||
.panel-heading > .glyphicon,
|
||||
.panel-heading > .row > .heading > .glyphicon {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ type Msg
|
||||
| UrlChange Navigation.Location
|
||||
| UseGlobalTimeline Bool
|
||||
| UserAccount (Result Mastodon.Error Mastodon.Account)
|
||||
| ClearOpenedAccount
|
||||
| UserTimeline (Result Mastodon.Error (List Mastodon.Status))
|
||||
|
||||
|
||||
@ -305,6 +306,9 @@ update msg model =
|
||||
Err error ->
|
||||
{ model | account = Nothing, errors = (errorText error) :: model.errors } ! []
|
||||
|
||||
ClearOpenedAccount ->
|
||||
{ model | account = Nothing } ! []
|
||||
|
||||
StatusPosted _ ->
|
||||
{ model | draft = defaultDraft } ! [ loadTimelines model.client ]
|
||||
|
||||
|
12
src/View.elm
12
src/View.elm
@ -168,8 +168,16 @@ accountTimelineView account statuses label iconName =
|
||||
div [ class "col-md-3" ]
|
||||
[ div [ class "panel panel-default" ]
|
||||
[ div [ class "panel-heading" ]
|
||||
[ icon iconName
|
||||
, text label
|
||||
[ div [ class "row" ]
|
||||
[ div [ class "col-xs-9 heading" ] [ icon iconName, text label ]
|
||||
, div [ class "col-xs-3 text-right" ]
|
||||
[ a
|
||||
[ href ""
|
||||
, ViewHelper.onClickWithPreventAndStop ClearOpenedAccount
|
||||
]
|
||||
[ icon "remove" ]
|
||||
]
|
||||
]
|
||||
]
|
||||
, div [ class "account-detail", style [ ( "background-image", "url('" ++ account.header ++ "')" ) ] ]
|
||||
[ div [ class "opacity-layer" ]
|
||||
|
Loading…
Reference in New Issue
Block a user