A music player that connects to your cloud/distributed storage.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Improve alfred & keyboard shortcuts

+35 -6
+20 -2
src/Applications/UI/Alfred/State.elm
··· 59 59 Return.singleton model 60 60 61 61 62 + scrollToFocus : Manager 63 + scrollToFocus model = 64 + let 65 + task = 66 + Task.map3 67 + (\innerE outerE outerV -> 68 + outerV.viewport.y + innerE.element.y - outerE.element.y - 9 69 + ) 70 + (Dom.getElement "alfred__results__focus") 71 + (Dom.getElement "alfred__results") 72 + (Dom.getViewportOf "alfred__results") 73 + in 74 + task 75 + |> Task.andThen (\a -> Dom.setViewportOf "alfred__results" 0 a) 76 + |> Task.attempt (\_ -> UI.Bypass) 77 + |> return model 78 + 79 + 62 80 selectNext : Manager 63 81 selectNext model = 64 82 case model.alfred of ··· 66 84 instance 67 85 |> (\i -> { i | focus = min (i.focus + 1) (List.length i.results - 1) }) 68 86 |> (\i -> { model | alfred = Just i }) 69 - |> Return.singleton 87 + |> scrollToFocus 70 88 71 89 Nothing -> 72 90 Return.singleton model ··· 79 97 instance 80 98 |> (\i -> { i | focus = max (i.focus - 1) 0 }) 81 99 |> (\i -> { model | alfred = Just i }) 82 - |> Return.singleton 100 + |> scrollToFocus 83 101 84 102 Nothing -> 85 103 Return.singleton model
+10 -1
src/Applications/UI/Alfred/View.elm
··· 103 103 ----------------------------------------- 104 104 -- Results 105 105 ----------------------------------------- 106 - , chunk 106 + , brick 107 + [ id "alfred__results" ] 107 108 [ C.rounded 108 109 , C.leading_none 109 110 , C.max_w_lg ··· 112 113 , C.overflow_x_hidden 113 114 , C.overflow_y_auto 114 115 , C.shadow_md 116 + , C.smooth_scrolling 115 117 , C.text_nearly_sm 116 118 , C.w_full 117 119 ··· 123 125 (\idx result -> 124 126 brick 125 127 [ onTapPreventDefault (UI.SelectAlfredItem idx) 128 + 129 + -- 130 + , if idx == instance.focus then 131 + id "alfred__results__focus" 132 + 133 + else 134 + id ("alfred__results__" ++ String.fromInt idx) 126 135 127 136 -- 128 137 , if idx == instance.focus then
+1 -1
src/Applications/UI/Interface/State.elm
··· 22 22 23 23 blur : Manager 24 24 blur model = 25 - Return.singleton { model | focusedOnInput = False } 25 + Return.singleton { model | focusedOnInput = False, pressedKeys = [] } 26 26 27 27 28 28 contextMenuConfirmation : String -> Msg -> Manager
+1
src/Css/Application.css
··· 49 49 .align-sub { vertical-align: sub } 50 50 .all-small-caps { font-variant-caps: all-small-caps } 51 51 .flex-basis-0 { flex-basis: 0 } 52 + .smooth-scrolling { scroll-behavior: smooth } 52 53 53 54 54 55 @screen dark {
+3 -2
src/Static/About/About.md
··· 230 230 The app should be usable with only the keyboard, there are various keyboard shortcuts: 231 231 232 232 ``` 233 + L - Select playlist 234 + N - Scroll to currently-playing track 233 235 P - Play / Pause 236 + R - Toggle Repeat 234 237 S - Toggle Shuffle 235 - R - Toggle Repeat 236 - N - Scroll to currently-playing track 237 238 238 239 Left / Right - Previous / Next 239 240 Up / Down - Seek forwards / Seek backwards