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.

Refactor

+10 -19
+9 -13
src/Applications/UI/Authentication/State.elm
··· 104 104 case Dict.get "code" (Url.queryDictionary url) of 105 105 Just code -> 106 106 Dropbox.exchangeAuthCode 107 - (GotDropboxTokens Dropbox.Code) 107 + ExchangeDropboxAuthCode 108 108 url 109 109 code 110 110 ··· 146 146 CancelFlow -> 147 147 cancelFlow 148 148 149 + ExchangeDropboxAuthCode a -> 150 + exchangeDropboxAuthCode a 151 + 149 152 GetStarted -> 150 153 startFlow 151 - 152 - GotDropboxTokens a b -> 153 - gotDropboxTokens a b 154 154 155 155 NotAuthenticated -> 156 156 notAuthenticated ··· 319 319 Return.singleton model 320 320 321 321 322 - gotDropboxTokens : Dropbox.TokenFlow -> Result Http.Error Dropbox.Tokens -> Manager 323 - gotDropboxTokens flow result model = 324 - case ( flow, result ) of 325 - ( Dropbox.Code, Ok tokens ) -> 322 + exchangeDropboxAuthCode : Result Http.Error Dropbox.Tokens -> Manager 323 + exchangeDropboxAuthCode result model = 324 + case result of 325 + Ok tokens -> 326 326 case tokens.refreshToken of 327 327 Just refreshToken -> 328 328 Nothing ··· 342 342 |> showNotificationWithModel 343 343 (Lens.replace lens model Unauthenticated) 344 344 345 - ( Dropbox.Refresh, Ok tokens ) -> 346 - -- TODO 347 - Return.singleton model 348 - 349 - ( _, Err err ) -> 345 + Err err -> 350 346 [] 351 347 |> Notifications.errorWithCode 352 348 "Failed to authenticate with Dropbox"
+1 -1
src/Applications/UI/Authentication/Types.elm
··· 38 38 -- 39 39 | BootFailure String 40 40 | CancelFlow 41 + | ExchangeDropboxAuthCode (Result Http.Error Dropbox.Tokens) 41 42 | GetStarted 42 - | GotDropboxTokens Dropbox.TokenFlow (Result Http.Error Dropbox.Tokens) 43 43 | NotAuthenticated 44 44 | RemoteStorageWebfinger RemoteStorage.Attributes (Result Http.Error String) 45 45 | ShowMoreOptions Mouse.Event
-5
src/Library/User/Layer/Methods/Dropbox.elm
··· 13 13 -- 🌳 14 14 15 15 16 - type TokenFlow 17 - = Code 18 - | Refresh 19 - 20 - 21 16 type alias Tokens = 22 17 { accessToken : String 23 18 , expiresIn : Int -- Time in seconds the access token expires in