mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-04 18:29:29 +02:00
This patch adds a new dialog for disabling a backup's password protection. Steps to test this feature: 1. First ensure that the following prefs are enabled: browser.backup.enabled and browser.backup.preferences.ui.enabled 2. Then ensure that the existing backup for the current profile has encryption enabled (should have enc-state.json) 3. Else, access the debug page (chrome://browser/content/backup/debug.html) to enable encryption 4. Once encryption is enabled, the sensitive data checkbox should be checked in about:settings / about:preferences 5. Clicking the checked checkbox should now show the new dialog for removing password protection 6. If the dialog is confirmed, the checkbox should be unchecked in both the settings/preferences page and the debug page Other notes: - If the checkbox is *not* checked, nothing will happen. This is because the dialog for enabling password protection is not yet implemented - Added tests and Storybook entries as well Figma: https://www.figma.com/design/vNbX4c0ws0L1qr0mxpKvsW/Fx-Backup?node-id=147-4568&t=9NNUojWMeOLwe3rD-0 Differential Revision: https://phabricator.services.mozilla.com/D213171
73 lines
2 KiB
JavaScript
73 lines
2 KiB
JavaScript
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
// eslint-disable-next-line import/no-unresolved
|
|
import { html } from "lit.all.mjs";
|
|
import "./backup-settings.mjs";
|
|
|
|
window.MozXULElement.insertFTLIfNeeded("locales-preview/backupSettings.ftl");
|
|
window.MozXULElement.insertFTLIfNeeded("branding/brand.ftl");
|
|
|
|
export default {
|
|
title: "Domain-specific UI Widgets/Backup/Backup Settings",
|
|
component: "backup-settings",
|
|
argTypes: {},
|
|
};
|
|
|
|
const Template = ({ backupServiceState }) => html`
|
|
<backup-settings .backupServiceState=${backupServiceState}></backup-settings>
|
|
`;
|
|
|
|
export const BackingUpNotInProgress = Template.bind({});
|
|
BackingUpNotInProgress.args = {
|
|
backupServiceState: {
|
|
backupDirPath: "/Some/User/Documents",
|
|
backupInProgress: false,
|
|
defaultParent: {
|
|
path: "/Some/User/Documents",
|
|
fileName: "Documents",
|
|
},
|
|
scheduledBackupsEnabled: false,
|
|
},
|
|
};
|
|
|
|
export const BackingUpInProgress = Template.bind({});
|
|
BackingUpInProgress.args = {
|
|
backupServiceState: {
|
|
backupDirPath: "/Some/User/Documents",
|
|
backupInProgress: true,
|
|
defaultParent: {
|
|
path: "/Some/User/Documents",
|
|
fileName: "Documents",
|
|
},
|
|
scheduledBackupsEnabled: false,
|
|
},
|
|
};
|
|
|
|
export const ScheduledBackupsEnabled = Template.bind({});
|
|
ScheduledBackupsEnabled.args = {
|
|
backupServiceState: {
|
|
backupDirPath: "/Some/User/Documents",
|
|
backupInProgress: false,
|
|
defaultParent: {
|
|
path: "/Some/User/Documents",
|
|
fileName: "Documents",
|
|
},
|
|
scheduledBackupsEnabled: true,
|
|
},
|
|
};
|
|
|
|
export const EncryptionEnabled = Template.bind({});
|
|
EncryptionEnabled.args = {
|
|
backupServiceState: {
|
|
backupDirPath: "/Some/User/Documents",
|
|
backupInProgress: false,
|
|
defaultParent: {
|
|
path: "/Some/User/Documents",
|
|
fileName: "Documents",
|
|
},
|
|
scheduledBackupsEnabled: true,
|
|
encryptionEnabled: true,
|
|
},
|
|
};
|