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.

Don't store the auth method if retrieving the hypaethral data fails

+20 -20
+1 -1
src/Applications/Brain.elm
··· 389 389 translateAlienError event err = 390 390 case Alien.tagFromString event.tag of 391 391 Just Alien.AuthIpfs -> 392 - report Alien.AuthIpfs "I can't seem to connect with IPFS. Maybe you used the wrong passphrase, or your IPFS node is offline?" 392 + report Alien.AuthIpfs "Something went wrong regarding the IPFS storage. Maybe you used the wrong passphrase, or your IPFS node is offline?" 393 393 394 394 Just tag -> 395 395 report tag err
+19 -19
src/Applications/Brain/Authentication.elm
··· 35 35 36 36 type alias Model = 37 37 { method : Maybe Method 38 + , performingSignIn : Bool 38 39 } 39 40 40 41 41 42 initialModel : Model 42 43 initialModel = 43 44 { method = Nothing 45 + , performingSignIn = False 44 46 } 45 47 46 48 ··· 81 83 PerformSignIn json -> 82 84 case decodeMethod json of 83 85 Just method -> 84 - ( { model | method = Just method } 85 - , Cmd.batch 86 - [ do RetrieveHypaethralData 87 - , json 88 - |> Alien.broadcast Alien.AuthMethod 89 - |> Ports.toCache 90 - ] 86 + ( { model | method = Just method, performingSignIn = True } 87 + , do RetrieveHypaethralData 91 88 , Nothing 92 89 ) 93 90 94 91 Nothing -> 95 92 ( model 96 - , noCmd 93 + , Cmd.none 97 94 , Nothing 98 95 ) 99 96 ··· 130 127 -- ✋ 131 128 _ -> 132 129 ( model 133 - , noCmd 130 + , Cmd.none 134 131 , terminate NotAuthenticated 135 132 ) 136 133 ··· 149 146 150 147 -- ✋ 151 148 Nothing -> 152 - noCmd 149 + Cmd.none 153 150 , Nothing 154 151 ) 155 152 156 153 HypaethralDataRetrieved json -> 157 - ( model 158 - , noCmd 154 + ( { model | performingSignIn = False } 155 + -- 156 + , if model.performingSignIn then 157 + json 158 + |> Alien.broadcast Alien.AuthMethod 159 + |> Ports.toCache 160 + 161 + else 162 + Cmd.none 163 + -- 159 164 , Maybe.andThen 160 165 (\method -> terminate <| Authenticated method json) 161 166 model.method ··· 172 177 173 178 EnclosedDataRetrieved json -> 174 179 ( model 175 - , noCmd 180 + , Cmd.none 176 181 , Just [ GiveUI Alien.LoadEnclosedUserData json ] 177 182 ) 178 183 ··· 196 201 197 202 -- ✋ 198 203 Nothing -> 199 - noCmd 204 + Cmd.none 200 205 , Nothing 201 206 ) 202 - 203 - 204 - noCmd : Cmd msg 205 - noCmd = 206 - Cmd.none 207 207 208 208 209 209