···2233## 2.2.0
4455-- Added dark mode
55+- **Added dark mode**
66+- **Added support for BTFS (an IPFS fork)**
77+- Added ability to rename sources (ie. after creation)
68- Added keyboard shortcuts for play/pause, toggle shuffle, etc.
79 See UI section on the about page for more info.
88-- Added support for BTFS (an IPFS fork)
910- Improved IPFS support as a music source (now uses paths instead of hashes)
1011- Improved text readability (contrast, etc.)
1112
+46-31
src/Applications/UI.elm
···758758 -----------------------------------------
759759 -- Page Transitions
760760 -----------------------------------------
761761+ -- Sources.NewThroughRedirect
762762+ -----------------------------
761763 PageChanged (Page.Sources (UI.Sources.Page.NewThroughRedirect service args)) ->
762764 let
763765 ( sources, form, defaultContext ) =
···785787 |> (\s -> { model | sources = s })
786788 |> return
787789790790+ -- Sources.Edit
791791+ ---------------
788792 PageChanged (Page.Sources (UI.Sources.Page.Edit sourceId)) ->
789789- let
790790- isLoading =
791791- model.isLoading
793793+ loadSourceForForm model sourceId
792794793793- maybeSource =
794794- List.find (.id >> (==) sourceId) model.sources.collection
795795- in
796796- case ( isLoading, maybeSource ) of
797797- ( False, Just source ) ->
798798- let
799799- ( sources, form ) =
800800- ( model.sources
801801- , model.sources.form
802802- )
795795+ -- Sources.Rename
796796+ -----------------
797797+ PageChanged (Page.Sources (UI.Sources.Page.Rename sourceId)) ->
798798+ loadSourceForForm model sourceId
803799804804- newForm =
805805- { form | context = source }
806806-807807- newSources =
808808- { sources | form = newForm }
809809- in
810810- return { model | sources = newSources }
811811-812812- ( False, Nothing ) ->
813813- return model
814814-815815- ( True, _ ) ->
816816- -- Redirect away from edit-source page
817817- UI.Sources.Page.Index
818818- |> Page.Sources
819819- |> ChangeUrlUsingPage
820820- |> updateWithModel model
821821-800800+ --
822801 PageChanged _ ->
823802 return model
824803···17071686 --
17081687 , Cmd.none
17091688 )
16891689+16901690+16911691+loadSourceForForm : Model -> String -> ( Model, Cmd Msg )
16921692+loadSourceForForm model sourceId =
16931693+ let
16941694+ isLoading =
16951695+ model.isLoading
16961696+16971697+ maybeSource =
16981698+ List.find (.id >> (==) sourceId) model.sources.collection
16991699+ in
17001700+ case ( isLoading, maybeSource ) of
17011701+ ( False, Just source ) ->
17021702+ let
17031703+ ( sources, form ) =
17041704+ ( model.sources
17051705+ , model.sources.form
17061706+ )
17071707+17081708+ newForm =
17091709+ { form | context = source }
17101710+17111711+ newSources =
17121712+ { sources | form = newForm }
17131713+ in
17141714+ return { model | sources = newSources }
17151715+17161716+ ( False, Nothing ) ->
17171717+ return model
17181718+17191719+ ( True, _ ) ->
17201720+ -- Redirect away from edit-source page
17211721+ UI.Sources.Page.Index
17221722+ |> Page.Sources
17231723+ |> ChangeUrlUsingPage
17241724+ |> updateWithModel model
171017251711172617121727resetUrl : Nav.Key -> Url -> Page.Page -> Cmd Msg
+4
src/Applications/UI/Page.elm
···125125 Sources (Sources.NewThroughRedirect _ _) ->
126126 "sources/new"
127127128128+ Sources (Sources.Rename sourceId) ->
129129+ "sources/rename/" ++ sourceId
130130+128131129132{-| Are the bases of these two pages the same?
130133-}
···208211 , map (Sources << Sources.Edit) (s "sources" </> s "edit" </> string)
209212 , map (Sources Sources.New) (s "sources" </> s "new")
210213 , map (Sources Sources.NewOnboarding) (s "sources" </> s "welcome")
214214+ , map (Sources << Sources.Rename) (s "sources" </> s "rename" </> string)
211215212216 -- Oauth
213217 --------