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

Configure Feed

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

More mobile improvements

+72 -59
+31 -19
src/Applications/UI.elm
··· 187 187 , msg = debouncerMsg 188 188 } 189 189 190 - HideAlfred -> 191 - return { model | alfred = { instance = Nothing } } 192 - 193 - HideContextMenu -> 194 - return { model | contextMenu = Nothing } 195 - 196 190 HideOverlay -> 197 191 return { model | alfred = { instance = Nothing }, contextMenu = Nothing } 198 192 ··· 214 208 model 215 209 |> UserData.importHypaethral json 216 210 |> Return3.wield translateReply 211 + 212 + MsgViaContextMenu m -> 213 + update m { model | contextMenu = Nothing } 217 214 218 215 Reply reply -> 219 216 translateReply reply model ··· 1249 1246 body model = 1250 1247 section 1251 1248 (if Maybe.isJust model.contextMenu || Maybe.isJust model.alfred.instance then 1252 - [ if model.isTouchDevice then 1253 - on "tap" (Json.Decode.succeed HideOverlay) 1254 - 1255 - else 1256 - onClick HideOverlay 1249 + [ on 1250 + (ifThenElse model.isTouchDevice "tap" "click") 1251 + (Json.Decode.succeed HideOverlay) 1257 1252 ] 1258 1253 1259 1254 else if Maybe.isJust model.equalizer.activeKnob then ··· 1286 1281 -- Alfred 1287 1282 ----------------------------------------- 1288 1283 , model.alfred 1289 - |> Lazy.lazy Alfred.view 1284 + |> Lazy.lazy2 Alfred.view model.isTouchDevice 1290 1285 |> Html.map AlfredMsg 1291 1286 1292 1287 ----------------------------------------- ··· 1317 1312 ----------------------------------------- 1318 1313 -- Content 1319 1314 ----------------------------------------- 1320 - , case ( model.isLoading, model.authentication ) of 1315 + , let 1316 + opts = 1317 + { justifyCenter = False 1318 + , noPointerEvents = 1319 + False 1320 + || Maybe.isJust model.contextMenu 1321 + || Maybe.isJust model.alfred.instance 1322 + } 1323 + in 1324 + case ( model.isLoading, model.authentication ) of 1321 1325 ( True, _ ) -> 1322 - content { justifyCenter = True } [ loadingAnimation ] 1326 + content { opts | justifyCenter = True } [ loadingAnimation ] 1323 1327 1324 1328 ( False, Authentication.Authenticated _ ) -> 1325 - content { justifyCenter = False } (defaultScreen model) 1329 + content opts (defaultScreen model) 1326 1330 1327 1331 ( False, _ ) -> 1328 1332 model.authentication 1329 1333 |> Lazy.lazy Authentication.view 1330 1334 |> Html.map AuthenticationMsg 1331 1335 |> List.singleton 1332 - |> content { justifyCenter = False } 1336 + |> content opts 1333 1337 ] 1334 1338 1335 1339 ··· 1401 1405 -- 🗺 ░░ BITS 1402 1406 1403 1407 1404 - content : { justifyCenter : Bool } -> List (Html msg) -> Html msg 1405 - content { justifyCenter } nodes = 1408 + content : { justifyCenter : Bool, noPointerEvents : Bool } -> List (Html msg) -> Html msg 1409 + content { justifyCenter, noPointerEvents } nodes = 1406 1410 brick 1407 1411 [ css contentStyles ] 1408 - [ T.overflow_scroll 1412 + [ T.overflow_x_hidden 1413 + , T.overflow_y_auto 1409 1414 , T.relative 1410 1415 , T.z_1 1416 + 1417 + -- 1418 + , if noPointerEvents then 1419 + C.pointer_events_none 1420 + 1421 + else 1422 + "" 1411 1423 ] 1412 1424 [ brick 1413 1425 [ css contentInnerStyles ]
+11 -5
src/Applications/UI/Alfred.elm
··· 9 9 import Html.Styled as Html exposing (Html, fromUnstyled, text) 10 10 import Html.Styled.Attributes exposing (autofocus, css, id, placeholder, type_) 11 11 import Html.Styled.Events exposing (onClick, onInput) 12 + import Html.Styled.Ext exposing (onTap) 12 13 import Json.Decode 13 14 import Keyboard 14 15 import List.Extra as List ··· 157 158 -- 🗺 158 159 159 160 160 - view : Model -> Html Msg 161 - view model = 161 + view : Bool -> Model -> Html Msg 162 + view isTouchDevice model = 162 163 case model.instance of 163 164 Just instance -> 164 165 chunk ··· 183 184 ----------------------------------------- 184 185 , brick 185 186 [ Html.Styled.Events.custom 186 - "click" 187 + (ifThenElse isTouchDevice "tap" "click") 187 188 (Json.Decode.succeed 188 189 { message = Bypass 189 190 , stopPropagation = True ··· 223 224 ----------------------------------------- 224 225 , brick 225 226 [ Html.Styled.Events.custom 226 - "click" 227 + (ifThenElse isTouchDevice "tap" "click") 227 228 (Json.Decode.succeed 228 229 { message = Bypass 229 230 , stopPropagation = True ··· 245 246 (List.indexedMap 246 247 (\idx result -> 247 248 brick 248 - [ onClick (RunAction idx) ] 249 + [ if isTouchDevice then 250 + onTap (RunAction idx) 251 + 252 + else 253 + onClick (RunAction idx) 254 + ] 249 255 [ T.pa3 250 256 , T.relative 251 257 , T.truncate
+12 -25
src/Applications/UI/ContextMenu.elm
··· 9 9 import Css 10 10 import Html.Styled exposing (Html, fromUnstyled, text) 11 11 import Html.Styled.Attributes exposing (css, style) 12 - import Html.Styled.Events exposing (on, onClick) 12 + import Html.Styled.Events exposing (custom, onClick) 13 13 import Json.Decode 14 14 import Material.Icons exposing (Coloring(..)) 15 15 import Svg exposing (Svg) ··· 27 27 case m of 28 28 Just (ContextMenu items coordinates) -> 29 29 brick 30 - [ css (menuStyles coordinates) 31 - 32 - -- 33 - , Html.Styled.Events.custom 34 - (if isTouchDevice then 35 - "tap" 36 - 37 - else 38 - "click" 39 - ) 40 - (Json.Decode.succeed 41 - { message = UI.Core.HideContextMenu 42 - , stopPropagation = True 43 - , preventDefault = True 44 - } 45 - ) 46 - ] 30 + [ css (menuStyles coordinates) ] 47 31 [ T.absolute 48 32 , T.br2 49 33 , T.bg_white ··· 62 46 itemView isTouchDevice lastIndex idx i 63 47 64 48 Divider -> 65 - -- TODO 49 + -- NOTE: Not needed at the moment 66 50 nothing 67 51 ) 68 52 items ··· 72 56 nothing 73 57 74 58 75 - itemView : Bool -> Int -> Int -> ContextMenu.ItemProperties msg -> Html msg 59 + itemView : Bool -> Int -> Int -> ContextMenu.ItemProperties UI.Core.Msg -> Html UI.Core.Msg 76 60 itemView isTouchDevice lastIndex index { icon, label, msg, active } = 77 61 let 78 62 isLast = 79 63 index == lastIndex 80 64 in 81 65 brick 82 - [ if isTouchDevice then 83 - on "tap" (Json.Decode.succeed msg) 84 - 85 - else 86 - onClick msg 66 + [ custom 67 + (ifThenElse isTouchDevice "tap" "click") 68 + (Json.Decode.succeed 69 + { message = UI.Core.MsgViaContextMenu msg 70 + , stopPropagation = True 71 + , preventDefault = True 72 + } 73 + ) 87 74 ] 88 75 [ T.bb 89 76 , T.pa3
+1 -2
src/Applications/UI/Core.elm
··· 94 94 type Msg 95 95 = Bypass 96 96 | Debounce (Debouncer.Msg Msg) 97 - | HideAlfred 98 - | HideContextMenu 99 97 | HideOverlay 100 98 | IndicateTouchDevice 101 99 | KeyboardMsg Keyboard.Msg 102 100 | LoadEnclosedUserData Json.Value 103 101 | LoadHypaethralUserData Json.Value 102 + | MsgViaContextMenu Msg 104 103 | Reply Reply 105 104 | ResizedWindow ( Int, Int ) 106 105 | SetCurrentTime Time.Posix
+1 -1
src/Applications/UI/Kit.elm
··· 415 415 , T.flex 416 416 , T.flex_column 417 417 , T.overflow_x_hidden 418 - , T.overflow_y_scroll 418 + , T.overflow_y_auto 419 419 , T.z_999 420 420 ] 421 421
+2 -1
src/Applications/UI/Tracks/Scene/List.elm
··· 75 75 , T.flex_grow_1 76 76 , T.outline_0 77 77 , T.overflow_x_hidden 78 - , T.overflow_y_scroll 78 + , T.overflow_y_auto 79 79 , T.vh_25 80 80 ] 81 81 [ -- Header ··· 469 469 (Decode.map2 470 470 (\x y -> 471 471 { message = 472 + -- Only show menu when not dragging something 472 473 case Maybe.andThen (.model >> DnD.modelTarget) maybeDragEnv of 473 474 Just _ -> 474 475 Bypass
+2 -2
src/Javascript/audio-engine.js
··· 150 150 151 151 const timeUpdateFunc = bind(audioTimeUpdateEvent) 152 152 153 - audio = new window.Audio() 153 + audio = new Audio() 154 154 audio.setAttribute("crossorigin", "anonymous") 155 155 audio.setAttribute("preload", "auto") 156 156 audio.setAttribute("src", queueItem.url) ··· 324 324 const promise = element.play() || Promise.resolve() 325 325 326 326 promise.catch(err => { 327 - console.error(err) 327 + console.error("Could not play audio automatically. Please resume playback manually.") 328 328 }) 329 329 } 330 330
+12 -4
src/Library/Html/Styled/Ext.elm
··· 1 - module Html.Styled.Ext exposing (ifEnterKey, onDoubleTap, onEnterKey) 1 + module Html.Styled.Ext exposing (ifEnterKey, onDoubleTap, onEnterKey, onTap, onTapStopPropagation) 2 2 3 3 import Html.Styled exposing (Attribute) 4 - import Html.Styled.Events exposing (keyCode, on) 4 + import Html.Styled.Events exposing (keyCode, on, stopPropagationOn) 5 5 import Json.Decode as Json 6 6 7 7 ··· 10 10 on "dbltap" (Json.succeed msg) 11 11 12 12 13 - {-| Event binding for the `Enter` key. 14 - -} 15 13 onEnterKey : msg -> Attribute msg 16 14 onEnterKey msg = 17 15 on "keydown" (Json.andThen (ifEnterKey msg) keyCode) ··· 25 23 26 24 _ -> 27 25 Json.fail "Another key, that isn't enter, was pressed" 26 + 27 + 28 + onTap : msg -> Attribute msg 29 + onTap msg = 30 + on "tap" (Json.succeed msg) 31 + 32 + 33 + onTapStopPropagation : msg -> Attribute msg 34 + onTapStopPropagation msg = 35 + stopPropagationOn "tap" (Json.succeed ( msg, True ))