mirror of
https://github.com/jhillyerd/inbucket.git
synced 2025-12-18 18:17:03 +00:00
ui: Make the error flash look nice
This commit is contained in:
@@ -63,8 +63,8 @@ errorFlash error =
|
|||||||
{ flash
|
{ flash
|
||||||
| table =
|
| table =
|
||||||
flash.table
|
flash.table
|
||||||
++ [ ( "Method", error.request.method )
|
++ [ ( "Request URL", error.request.url )
|
||||||
, ( "URL", error.request.url )
|
, ( "HTTP Method", error.request.method )
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
in
|
in
|
||||||
@@ -92,7 +92,7 @@ errorFlash error =
|
|||||||
|
|
||||||
Http.BadBody body ->
|
Http.BadBody body ->
|
||||||
{ title = "Bad HTTP body"
|
{ title = "Bad HTTP body"
|
||||||
, table = [ ( "Body", body ) ]
|
, table = [ ( "Error", body ) ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -90,10 +90,9 @@ errorFlash : FrameControls msg -> Maybe Session.Flash -> Html msg
|
|||||||
errorFlash controls maybeFlash =
|
errorFlash controls maybeFlash =
|
||||||
let
|
let
|
||||||
row ( heading, message ) =
|
row ( heading, message ) =
|
||||||
pre []
|
tr []
|
||||||
[ text heading
|
[ th [] [ text (heading ++ ":") ]
|
||||||
, text ": "
|
, td [] [ pre [] [ text message ] ]
|
||||||
, text message
|
|
||||||
]
|
]
|
||||||
in
|
in
|
||||||
case maybeFlash of
|
case maybeFlash of
|
||||||
|
|||||||
@@ -136,13 +136,18 @@ h1 {
|
|||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
.error {
|
.error {
|
||||||
background-color: #f58080;
|
background-color: #f58080;
|
||||||
background-image: linear-gradient(to bottom, #e86060 0, #f58080 100%);
|
background-image: linear-gradient(to bottom, #e86060 0, #f58080 100%);
|
||||||
border: 1px solid #e86060;
|
border: 1px solid #e86060;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
box-shadow: 0 1px 2px rgba(0,0,0,.05);
|
||||||
padding: 4px 10px;
|
padding: 6px 10px;
|
||||||
margin: 20px 0;
|
margin: 20px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,13 +160,22 @@ h1 {
|
|||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.error th {
|
||||||
|
padding-right: 5px;
|
||||||
|
text-align: left;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
.flash-header {
|
.flash-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.flash-table {
|
.flash-table {
|
||||||
|
border-left: 4px solid rgba(0,0,0,0.2);
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
|
padding-bottom: 4px;
|
||||||
|
padding-left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.greeting {
|
.greeting {
|
||||||
|
|||||||
Reference in New Issue
Block a user