Skip to content

Commit f3493ae

Browse files
committed
remove import/export from overlay, make much more minimal
1 parent 31aa792 commit f3493ae

File tree

1 file changed

+20
-37
lines changed

1 file changed

+20
-37
lines changed

src/Debugger/Overlay.elm

Lines changed: 20 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ module Debugger.Overlay exposing
1010
, none
1111
, toBlockerType
1212
, view
13-
, viewImportExport
1413
)
1514

1615
import Debugger.Metadata as Metadata exposing (Metadata)
@@ -492,47 +491,31 @@ viewButtons buttons =
492491

493492
viewMiniControls : Config msg -> Int -> Html msg
494493
viewMiniControls config numMsgs =
494+
let
495+
dimensions =
496+
if numMsgs < 100 then
497+
"4ch"
498+
else if numMsgs < 1000 then
499+
"5ch"
500+
else
501+
"6ch"
502+
in
495503
div
496504
[ style "position" "fixed"
497-
, style "bottom" "0"
498-
, style "right" "6px"
499-
, style "border-radius" "4px"
500-
, style "background-color" "rgb(61, 61, 61)"
505+
, style "bottom" "2em"
506+
, style "right" "2em"
507+
, style "width" dimensions
508+
, style "height" dimensions
509+
, style "background-color" "#1293D8"
501510
, style "color" "white"
502511
, style "font-family" "monospace"
503512
, style "pointer-events" "auto"
504513
, style "z-index" "2147483647"
514+
, style "display" "flex"
515+
, style "justify-content" "center"
516+
, style "align-items" "center"
517+
, style "cursor" "pointer"
518+
, onClick config.open
505519
]
506-
[ div
507-
[ style "padding" "6px"
508-
, style "cursor" "pointer"
509-
, style "text-align" "center"
510-
, style "min-width" "24ch"
511-
, onClick config.open
512-
]
513-
[ text ("Explore History (" ++ String.fromInt numMsgs ++ ")")
514-
]
515-
, viewImportExport
516-
[ style "padding" "4px 0"
517-
, style "font-size" "0.8em"
518-
, style "text-align" "center"
519-
, style "background-color" "rgb(50, 50, 50)"
520-
]
521-
config.importHistory
522-
config.exportHistory
520+
[ text (String.fromInt numMsgs)
523521
]
524-
525-
526-
viewImportExport : List (Attribute msg) -> msg -> msg -> Html msg
527-
viewImportExport props importMsg exportMsg =
528-
div
529-
props
530-
[ button importMsg "Import"
531-
, text " / "
532-
, button exportMsg "Export"
533-
]
534-
535-
536-
button : msg -> String -> Html msg
537-
button msg label =
538-
span [ onClick msg, style "cursor" "pointer" ] [ text label ]

0 commit comments

Comments
 (0)