@@ -12,22 +12,6 @@ import Html.Events as E
12
12
import Types.Feed as Feed exposing (Feed )
13
13
14
14
15
- radio : msg -> a -> a -> String -> Html msg
16
- radio onClick currentValue value text =
17
- H . div []
18
- [ H . label
19
- []
20
- [ H . input
21
- [ A . type_ " radio"
22
- , A . checked ( value == currentValue)
23
- , E . onClick onClick
24
- ]
25
- []
26
- , H . text text
27
- ]
28
- ]
29
-
30
-
31
15
collapsible : Bool -> List (Html Msg ) -> Html Msg
32
16
collapsible show children =
33
17
if show then
@@ -37,77 +21,6 @@ collapsible show children =
37
21
H . div [] []
38
22
39
23
40
- actionsFieldset : Html Msg
41
- actionsFieldset =
42
- H . fieldset [ A . class " border-2 p-2" ]
43
- [ H . legend [] [ H . text " Actions" ]
44
- , H . button
45
- [ A . class " px-4 py-2 text-sm font-extrabold bg-blue-700 text-white"
46
- , A . type_ " button"
47
- , E . onClick GetFeeds
48
- ]
49
- [ H . text " Update feeds" ]
50
- ]
51
-
52
-
53
- visibilityRadio : Visibility -> Visibility -> String -> Html Msg
54
- visibilityRadio currentVisibility visibility text =
55
- radio ( SetVisibility visibility) currentVisibility visibility text
56
-
57
-
58
- visibilityFieldset : Visibility -> Html Msg
59
- visibilityFieldset visibility =
60
- H . fieldset [ A . class " border-2 p-4" ]
61
- [ H . legend [] [ H . text " Visibility" ]
62
- , visibilityRadio visibility
63
- ShowAllEntries
64
- " Show all entries"
65
- , visibilityRadio visibility
66
- HideReadEntries
67
- " Hide read entries"
68
- , visibilityRadio visibility
69
- AlwaysShowUnreadEntries
70
- " Smart: Show unread entries if feed is collapsed, show all entries if feed is not collapsed"
71
- ]
72
-
73
-
74
- filterByRadio : FilterBy -> FilterBy -> String -> Html Msg
75
- filterByRadio currentFilterBy filterBy text =
76
- radio ( SetFilterBy filterBy) currentFilterBy filterBy text
77
-
78
-
79
- filterByFieldset : FilterBy -> Html Msg
80
- filterByFieldset filterBy =
81
- H . fieldset [ A . class " border-2 p-4" ]
82
- [ H . legend [] [ H . text " Filter feeds by" ]
83
- , filterByRadio filterBy
84
- DontFilter
85
- " Don’t filter feeds"
86
- , filterByRadio filterBy
87
- FilterByErrorStatus
88
- " Only show feeds with error"
89
- ]
90
-
91
-
92
- sortByRadio : SortBy -> SortBy -> String -> Html Msg
93
- sortByRadio currentSortBy sortBy text =
94
- radio ( SetSortBy sortBy) currentSortBy sortBy text
95
-
96
-
97
- sortByFieldset : SortBy -> Html Msg
98
- sortByFieldset sortBy =
99
- H . fieldset [ A . class " border-2 p-4" ]
100
- [ H . legend [] [ H . text " Sort feeds by" ]
101
- , sortByRadio sortBy
102
- SortByNewest
103
- " Sort by newest entry"
104
- , sortByRadio sortBy
105
- SortByNewestUnread
106
- " Sort by newest unread entry"
107
- , H . p [] [ H . text " Feeds with unread entries will always be shown first" ]
108
- ]
109
-
110
-
111
24
requests : Dict String Model .Request -> Html Msg
112
25
requests =
113
26
Dict . map
@@ -210,11 +123,7 @@ view model =
210
123
, additionalInfo model. feeds
211
124
, collapsible
212
125
model. showOptions
213
- [ actionsFieldset
214
- , visibilityFieldset model. visibility
215
- , filterByFieldset model. filterBy
216
- , sortByFieldset model. sortBy
217
- , Discovery . discoverFeedsFieldset model. discoveryUrl
126
+ [ Discovery . discoverFeedsFieldset model. discoveryUrl
218
127
, Discovery . discoverFeedFieldset
219
128
, requests model. requests
220
129
]
0 commit comments