···3333 False
3434 in
3535 if m.focusedOnInput || not authenticated then
3636- -- Stop here if using input or not authenticated
3737- skip
3636+ case m.pressedKeys of
3737+ [ Keyboard.Escape ] ->
3838+ hideOverlay m
3939+4040+ _ ->
4141+ skip
38423943 else if Maybe.isJust model.alfred then
4044 case m.pressedKeys of
···4751 [ Keyboard.Enter ] ->
4852 Alfred.runSelectedAction m
49535454+ [ Keyboard.Escape ] ->
5555+ hideOverlay m
5656+5057 _ ->
5158 skip
52595360 else
5461 case m.pressedKeys of
5555- [ Keyboard.Escape ] ->
5656- hideOverlay m
5757-5862 [ Keyboard.ArrowLeft ] ->
5963 Queue.rewind m
6064···78827983 [ Keyboard.Character "S" ] ->
8084 Queue.toggleShuffle m
8585+8686+ [ Keyboard.Escape ] ->
8787+ hideOverlay m
81888289 _ ->
8390 skip
+14-3
src/Applications/UI/Common/State.elm
···1010import Return exposing (return)
1111import Return.Ext as Return
1212import Task
1313+import Tracks
1314import UI.Notifications
1415import UI.Page as Page exposing (Page)
1516import UI.Playlists.Directory
1717+import UI.Tracks.Scene.Covers
1618import UI.Tracks.Scene.List
1719import UI.Types as UI exposing (Manager, Msg)
1820···373938403941forceTracksRerender : Manager
4040-forceTracksRerender =
4141- Browser.Dom.setViewportOf UI.Tracks.Scene.List.containerId 0 1
4242+forceTracksRerender model =
4343+ let
4444+ containerId =
4545+ case model.scene of
4646+ Tracks.Covers ->
4747+ UI.Tracks.Scene.Covers.containerId
4848+4949+ Tracks.List ->
5050+ UI.Tracks.Scene.List.containerId
5151+ in
5252+ Browser.Dom.setViewportOf containerId 0 1
4253 |> Task.attempt (always UI.Bypass)
4343- |> Return.communicate
5454+ |> return model
445545564657generateDirectoryPlaylists : Manager
+20-7
src/Applications/UI/Interface/State.elm
···2233import Common exposing (Switch(..))
44import Debouncer.Basic as Debouncer
55+import Maybe.Extra as Maybe
56import Notifications
67import Return exposing (return)
78import Return.Ext as Return
99+import Tracks
810import UI.DnD as DnD
911import UI.Page as Page
1012import UI.Playlists.State as Playlists
1113import UI.Ports as Ports
1214import UI.Queue.State as Queue
1313-import UI.Tracks.Types as Tracks
1415import UI.Types as UI exposing (..)
1516import User.Layer exposing (..)
1617···91929293 Page.Index ->
9394 case model.scene of
9595+ Tracks.Covers ->
9696+ -- TODO
9797+ Return.singleton m
9898+9499 Tracks.List ->
95100 Playlists.moveTrackInSelected
96101 { to = Maybe.withDefault 0 (DnD.modelTarget d) }
···110115111116hideOverlay : Manager
112117hideOverlay model =
113113- Return.singleton
114114- { model
115115- | alfred = Nothing
116116- , confirmation = Nothing
117117- , contextMenu = Nothing
118118- }
118118+ if Maybe.isJust model.contextMenu then
119119+ Return.singleton { model | contextMenu = Nothing }
120120+121121+ else if Maybe.isJust model.confirmation then
122122+ Return.singleton { model | confirmation = Nothing }
123123+124124+ else if Maybe.isJust model.alfred then
125125+ Return.singleton { model | alfred = Nothing }
126126+127127+ else if Maybe.isJust model.selectedCover then
128128+ Return.singleton { model | selectedCover = Nothing }
129129+130130+ else
131131+ Return.singleton model
119132120133121134preferredColorSchemaChanged : { dark : Bool } -> Manager
···414142424343sortByAlbum : IdentifiedTrack -> IdentifiedTrack -> Order
4444-sortByAlbum ( _, a ) ( _, b ) =
4444+sortByAlbum ( x, a ) ( y, b ) =
4545 EQ
4646 |> andThenCompare album a b
4747+ |> andThenCompare parentDir x y
4748 |> andThenCompare disc a b
4849 |> andThenCompare nr a b
4950 |> andThenCompare artist a b
···515252535354sortByArtist : IdentifiedTrack -> IdentifiedTrack -> Order
5454-sortByArtist ( _, a ) ( _, b ) =
5555+sortByArtist ( x, a ) ( y, b ) =
5556 EQ
5657 |> andThenCompare artist a b
5758 |> andThenCompare album a b
5959+ |> andThenCompare parentDir x y
5860 |> andThenCompare disc a b
5961 |> andThenCompare nr a b
6062 |> andThenCompare title a b
···102104 .tags >> .nr
103105104106107107+parentDir : Identifiers -> String
108108+parentDir =
109109+ .parentDirectory >> low
110110+111111+105112106113-- COMMON
107114···117124118125low : String -> String
119126low =
120120- String.toLower
127127+ String.trim >> String.toLower
···259259260260Left / Right - Previous / Next
261261Up / Down - Seek forwards / Seek backwards
262262+263263+ESC - Close overlay, close context-menu, deselect album cover, etc.
262264```
263265264266