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.

Mobile context-menu fix

+27 -12
+8 -3
src/Applications/UI.elm
··· 26 26 import Html.Events.Extra.Touch as Touch 27 27 import Html.Styled as Html exposing (Html, section, toUnstyled) 28 28 import Html.Styled.Attributes as Attributes exposing (css, id, style) 29 - import Html.Styled.Events exposing (onClick) 29 + import Html.Styled.Events exposing (on, onClick) 30 30 import Html.Styled.Lazy as Lazy 31 31 import Json.Decode 32 32 import Json.Encode ··· 1248 1248 body model = 1249 1249 section 1250 1250 (if Maybe.isJust model.contextMenu || Maybe.isJust model.alfred.instance then 1251 - [ onClick HideOverlay ] 1251 + [ if model.isTouchDevice then 1252 + on "tap" (Json.Decode.succeed HideOverlay) 1253 + 1254 + else 1255 + onClick HideOverlay 1256 + ] 1252 1257 1253 1258 else if Maybe.isJust model.equalizer.activeKnob then 1254 1259 [ (EqualizerMsg << Equalizer.AdjustKnob) ··· 1294 1299 -- Context Menu 1295 1300 ----------------------------------------- 1296 1301 , model.contextMenu 1297 - |> Lazy.lazy UI.ContextMenu.view 1302 + |> Lazy.lazy2 UI.ContextMenu.view model.isTouchDevice 1298 1303 1299 1304 ----------------------------------------- 1300 1305 -- Notifications
+18 -8
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 (onClick) 12 + import Html.Styled.Events exposing (on, onClick) 13 13 import Json.Decode 14 14 import Material.Icons exposing (Coloring(..)) 15 15 import Svg exposing (Svg) ··· 22 22 -- 🗺 23 23 24 24 25 - view : Maybe (ContextMenu UI.Core.Msg) -> Html UI.Core.Msg 26 - view m = 25 + view : Bool -> Maybe (ContextMenu UI.Core.Msg) -> Html UI.Core.Msg 26 + view isTouchDevice m = 27 27 case m of 28 28 Just (ContextMenu items coordinates) -> 29 29 brick ··· 31 31 32 32 -- 33 33 , Html.Styled.Events.custom 34 - "click" 34 + (if isTouchDevice then 35 + "tap" 36 + 37 + else 38 + "click" 39 + ) 35 40 (Json.Decode.succeed 36 41 { message = UI.Core.HideContextMenu 37 42 , stopPropagation = True ··· 54 59 (\idx item -> 55 60 case item of 56 61 Item i -> 57 - itemView lastIndex idx i 62 + itemView isTouchDevice lastIndex idx i 58 63 59 64 Divider -> 60 65 -- TODO ··· 67 72 nothing 68 73 69 74 70 - itemView : Int -> Int -> ContextMenu.ItemProperties msg -> Html msg 71 - itemView lastIndex index { icon, label, msg, active } = 75 + itemView : Bool -> Int -> Int -> ContextMenu.ItemProperties msg -> Html msg 76 + itemView isTouchDevice lastIndex index { icon, label, msg, active } = 72 77 let 73 78 isLast = 74 79 index == lastIndex 75 80 in 76 81 brick 77 - [ onClick msg ] 82 + [ if isTouchDevice then 83 + on "tap" (Json.Decode.succeed msg) 84 + 85 + else 86 + onClick msg 87 + ] 78 88 [ T.bb 79 89 , T.pa3 80 90 , T.pr4
+1 -1
src/Javascript/index.js
··· 277 277 } 278 278 279 279 const eventClass = 280 - PointerEvent || MouseEvent 280 + self.PointerEvent || self.MouseEvent 281 281 282 282 enteredElement && enteredElement.dispatchEvent(new eventClass("pointerleave", eventOpts)) 283 283 node.dispatchEvent(new eventClass("pointerenter", eventOpts))