feat: Add Workspaces to Sync options

This commit adds Workspaces to the list of data types that can be synced.

This introduces the following changes:

- Adds a new preference `services.sync.engine.workspaces` to control syncing of Workspaces.
- Updates the `syncChooseWhatToSync.js` and `syncChooseWhatToSync.xhtml` files to include the new Workspaces option in the UI.
- Adds relevant localization strings to `preferences-ftl`.
- Updates CSS styling for the Workspaces option.
- Updates `zen-browser.js` to disable Workspace syncing by default.

This change allows users to choose whether to sync their Workspaces across devices.
This commit is contained in:
Kristijan Ribarić
2024-10-04 15:57:43 +02:00
parent 5488980bd9
commit 20f6dfafa1
6 changed files with 82 additions and 1 deletions

View File

@@ -0,0 +1,12 @@
diff --git a/browser/components/preferences/dialogs/syncChooseWhatToSync.js b/browser/components/preferences/dialogs/syncChooseWhatToSync.js
index 2cc965b4e1b20e1ae422bfb5c90a237dcd31fcf6..cfed9dfa67c7c34cd812885a72d66dd37ba414fc 100644
--- a/browser/components/preferences/dialogs/syncChooseWhatToSync.js
+++ b/browser/components/preferences/dialogs/syncChooseWhatToSync.js
@@ -13,6 +13,7 @@ Preferences.addAll([
{ id: "services.sync.engine.passwords", type: "bool" },
{ id: "services.sync.engine.addresses", type: "bool" },
{ id: "services.sync.engine.creditcards", type: "bool" },
+ { id: "services.sync.engine.workspaces", type: "bool" },
]);
let gSyncChooseWhatToSync = {

View File

@@ -0,0 +1,17 @@
diff --git a/browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml b/browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml
index 83bd09c0c3f8fd5febf1721e6b462ca90e54327b..71c9e8e4056edaeb354cf7844494bd83c2089561 100644
--- a/browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml
+++ b/browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml
@@ -82,6 +82,12 @@
preference="services.sync.engine.prefs"
/>
</html:div>
+ <html:div class="sync-engine-workspaces">
+ <checkbox
+ data-l10n-id="sync-engine-workspaces"
+ preference="services.sync.engine.workspaces"
+ />
+ </html:div>
</html:div>
</dialog>
</window>

View File

@@ -0,0 +1,15 @@
diff --git a/browser/components/preferences/sync.inc.xhtml b/browser/components/preferences/sync.inc.xhtml
index 492491a369b53797aded1d3e4cf24d6f11394267..b294aa3005b11276ba8f1c58730b85043a19bf3f 100644
--- a/browser/components/preferences/sync.inc.xhtml
+++ b/browser/components/preferences/sync.inc.xhtml
@@ -229,6 +229,10 @@
<image class="sync-engine-image sync-engine-prefs" alt=""/>
<label data-l10n-id="sync-currently-syncing-settings"/>
</html:div>
+ <html:div engine_preference="services.sync.engine.workspaces">
+ <image class="sync-engine-image sync-engine-workspaces" alt=""/>
+ <label data-l10n-id="sync-currently-syncing-workspaces"/>
+ </html:div>
</html:div>
<hbox>
<button id="syncChangeOptions"