-
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: Add complete sync reinitialization action (#2197)
When the local PouchDB is corrupted, that files and folders are out of sync between the local filesystem and the remote Cozy, the only systemic recourse for the user is to disconnect their Desktop client and reconnect it. This process is tedious and users can forget to re-configure their selective synchronization exclusions for the current computer leading to misunderstanding and frustration. Besides, it's also not intuitive and is usually the result of a contact with our support. To give users more autonomy and streamline the process, we will now present a button in the Settings tab which will simply stop the current synchronization, wipe the local PouchDB and restart from scratch while reusing the current OAuth client and selective synchronization configuration.
- Loading branch information
Showing
19 changed files
with
485 additions
and
252 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,49 @@ | ||
port module Data.Confirmation exposing (ConfirmationID, askForConfirmation, gotConfirmation, newId) | ||
|
||
-- Careful! To be sure to match requests with responses, you need to have the | ||
-- same ConfirmationID as the first tuple member in both functions. | ||
-- | ||
-- e.g. | ||
-- id = ConfirmationID "AreYouOK" | ||
-- | ||
-- askForConfirmation (id, "Are you OK?") | ||
-- gotConfirmation (id, True) | ||
|
||
|
||
type ConfirmationID | ||
= ConfirmationID String | ||
|
||
|
||
type alias EncodedConfirmationID = | ||
String | ||
|
||
|
||
newId : String -> ConfirmationID | ||
newId id = | ||
ConfirmationID id | ||
|
||
|
||
port confirm : ( EncodedConfirmationID, String ) -> Cmd msg | ||
|
||
|
||
port confirmations : (( EncodedConfirmationID, Bool ) -> msg) -> Sub msg | ||
|
||
|
||
askForConfirmation : ConfirmationID -> String -> Cmd msg | ||
askForConfirmation id message = | ||
confirm ( encode id, message ) | ||
|
||
|
||
gotConfirmation : (( ConfirmationID, Bool ) -> msg) -> Sub msg | ||
gotConfirmation msg = | ||
confirmations (msg << decode) | ||
|
||
|
||
encode : ConfirmationID -> EncodedConfirmationID | ||
encode (ConfirmationID id) = | ||
id | ||
|
||
|
||
decode : ( EncodedConfirmationID, Bool ) -> ( ConfirmationID, Bool ) | ||
decode ( id, confirmed ) = | ||
( ConfirmationID id, confirmed ) |
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
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
Oops, something went wrong.