tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

backup-settings.stories.mjs (2448B)


      1 /* This Source Code Form is subject to the terms of the Mozilla Public
      2 * License, v. 2.0. If a copy of the MPL was not distributed with this
      3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      4 
      5 // eslint-disable-next-line import/no-unresolved
      6 import { html } from "lit.all.mjs";
      7 import "./backup-settings.mjs";
      8 
      9 window.MozXULElement.insertFTLIfNeeded("browser/backupSettings.ftl");
     10 window.MozXULElement.insertFTLIfNeeded("branding/brand.ftl");
     11 
     12 export default {
     13  title: "Domain-specific UI Widgets/Backup/Backup Settings",
     14  component: "backup-settings",
     15  argTypes: {},
     16 };
     17 
     18 const Template = ({ backupServiceState }) => html`
     19  <backup-settings .backupServiceState=${backupServiceState}></backup-settings>
     20 `;
     21 
     22 export const ScheduledBackupsDisabled = Template.bind({});
     23 ScheduledBackupsDisabled.args = {
     24  backupServiceState: {
     25    backupDirPath: "/Some/User/Documents",
     26    defaultParent: {
     27      path: "/Some/User/Documents",
     28      fileName: "Documents",
     29    },
     30    scheduledBackupsEnabled: false,
     31    backupErrorCode: 0,
     32    archiveEnabledStatus: true,
     33    restoreEnabledStatus: true,
     34  },
     35 };
     36 
     37 export const ScheduledBackupsEnabled = Template.bind({});
     38 ScheduledBackupsEnabled.args = {
     39  backupServiceState: {
     40    backupDirPath: "/Some/User/Documents",
     41    defaultParent: {
     42      path: "/Some/User/Documents",
     43      fileName: "Documents",
     44    },
     45    scheduledBackupsEnabled: true,
     46    backupErrorCode: 0,
     47    archiveEnabledStatus: true,
     48    restoreEnabledStatus: true,
     49  },
     50 };
     51 
     52 export const ExistingBackup = Template.bind({});
     53 ExistingBackup.args = {
     54  backupServiceState: {
     55    backupDirPath: "/Some/User/Documents",
     56    defaultParent: {
     57      path: "/Some/User/Documents",
     58      fileName: "Documents",
     59    },
     60    scheduledBackupsEnabled: true,
     61    lastBackupDate: 1719625747,
     62    lastBackupFileName: "FirefoxBackup_default_123123123.html",
     63    backupErrorCode: 0,
     64    archiveEnabledStatus: true,
     65    restoreEnabledStatus: true,
     66  },
     67 };
     68 
     69 export const EncryptionEnabled = Template.bind({});
     70 EncryptionEnabled.args = {
     71  backupServiceState: {
     72    backupDirPath: "/Some/User/Documents",
     73    defaultParent: {
     74      path: "/Some/User/Documents",
     75      fileName: "Documents",
     76    },
     77    scheduledBackupsEnabled: true,
     78    encryptionEnabled: true,
     79    lastBackupDate: 1719625747,
     80    lastBackupFileName: "FirefoxBackup_default_123123123.html",
     81    backupErrorCode: 0,
     82    archiveEnabledStatus: true,
     83    restoreEnabledStatus: true,
     84  },
     85 };