-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gui/elm: Configure partial sync during Onboarding (#2175)
Once the OAuth client used to communicate with the remote Cozy has been created, we can offer users to configure the partial synchronization of their remote folders. To this end, we modify the Folder page of the Onboarding to display a link to the OAuth client's configuration within the remote Settings app. For now, this link will only be displayed if the partial synchronization flag is enabled on the Cozy.
- Loading branch information
Showing
25 changed files
with
481 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
module Data.AddressConfig exposing (AddressConfig, init, setError) | ||
|
||
|
||
type alias AddressConfig = | ||
{ address : String | ||
, error : String | ||
, busy : Bool | ||
} | ||
|
||
|
||
init : AddressConfig | ||
init = | ||
{ address = "" | ||
, error = "" | ||
, busy = False | ||
} | ||
|
||
|
||
setError : AddressConfig -> String -> AddressConfig | ||
setError addressConfig error = | ||
{ addressConfig | error = error, busy = False } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
module Window.Onboarding.Context exposing (Context, init, setAddressConfig, setFolderConfig, setSyncConfig) | ||
|
||
import Data.AddressConfig as AddressConfig exposing (AddressConfig) | ||
import Data.SyncConfig as SyncConfig exposing (SyncConfig) | ||
import Data.SyncFolderConfig as SyncFolderConfig exposing (SyncFolderConfig) | ||
import Url exposing (Url) | ||
|
||
|
||
type alias Context = | ||
{ platform : String | ||
, addressConfig : AddressConfig | ||
, folderConfig : SyncFolderConfig | ||
, syncConfig : SyncConfig | ||
} | ||
|
||
|
||
init : String -> String -> Context | ||
init platform folder = | ||
{ platform = platform | ||
, addressConfig = AddressConfig.init | ||
, folderConfig = SyncFolderConfig.valid folder | ||
, syncConfig = SyncConfig.init | ||
} | ||
|
||
|
||
setAddressConfig : Context -> AddressConfig -> Context | ||
setAddressConfig context addressConfig = | ||
{ context | addressConfig = addressConfig } | ||
|
||
|
||
setSyncConfig : Context -> SyncConfig -> Context | ||
setSyncConfig context syncConfig = | ||
{ context | syncConfig = syncConfig } | ||
|
||
|
||
setFolderConfig : Context -> SyncFolderConfig -> Context | ||
setFolderConfig context folderConfig = | ||
{ context | folderConfig = folderConfig } |
Oops, something went wrong.