From fb1a0cc784f88f5684b6c5f11a110cfdd60c7ea6 Mon Sep 17 00:00:00 2001 From: Wilfred Asomani Date: Thu, 27 Apr 2023 17:31:37 +0000 Subject: [PATCH] web/satellite: redesign and allow enter passphrase skip This change allows users to skip the enter passphrase modal and opt in for that choice to be remembered. The enter passphrase modal is also redesigned. Issue: https://github.com/storj/storj/issues/5818 Issue: https://github.com/storj/storj/issues/5616 Change-Id: Ie1cf6602682af3e9625656455fa3c096a24b95d3 --- web/satellite/src/api/auth.ts | 2 + .../components/modals/CreateProjectModal.vue | 4 +- .../modals/EnterPassphraseModal.vue | 77 ++++++----- .../modals/NewCreateProjectModal.vue | 7 +- .../components/modals/SkipPassphraseModal.vue | 120 ++++++++++++++++++ .../navigation/ProjectSelection.vue | 4 +- .../project/dashboard/ProjectDashboard.vue | 8 +- web/satellite/src/types/users.ts | 2 + .../utils/constants/analyticsEventNames.ts | 1 + .../src/utils/constants/appStatePopUps.ts | 3 + web/satellite/src/views/DashboardArea.vue | 2 +- .../views/all-dashboard/AllDashboardArea.vue | 2 +- .../all-dashboard/components/ProjectItem.vue | 7 +- 13 files changed, 200 insertions(+), 39 deletions(-) create mode 100644 web/satellite/src/components/modals/SkipPassphraseModal.vue diff --git a/web/satellite/src/api/auth.ts b/web/satellite/src/api/auth.ts index 376c8909b..d072b8405 100644 --- a/web/satellite/src/api/auth.ts +++ b/web/satellite/src/api/auth.ts @@ -264,6 +264,7 @@ export class AuthHttpApi implements UsersApi { responseData.sessionDuration, responseData.onboardingStart, responseData.onboardingEnd, + responseData.passphrasePrompt, responseData.onboardingStep, ); } @@ -288,6 +289,7 @@ export class AuthHttpApi implements UsersApi { responseData.sessionDuration, responseData.onboardingStart, responseData.onboardingEnd, + responseData.passphrasePrompt, responseData.onboardingStep, ); } diff --git a/web/satellite/src/components/modals/CreateProjectModal.vue b/web/satellite/src/components/modals/CreateProjectModal.vue index 1f926a798..228e8186c 100644 --- a/web/satellite/src/components/modals/CreateProjectModal.vue +++ b/web/satellite/src/components/modals/CreateProjectModal.vue @@ -151,7 +151,9 @@ async function onCreateProjectClick(): Promise { closeModal(); bucketsStore.clearS3Data(); - appStore.updateActiveModal(MODALS.createProjectPassphrase); + if (usersStore.state.settings.passphrasePrompt) { + appStore.updateActiveModal(MODALS.createProjectPassphrase); + } analytics.pageVisit(RouteConfig.ProjectDashboard.path); await router.push(RouteConfig.ProjectDashboard.path); diff --git a/web/satellite/src/components/modals/EnterPassphraseModal.vue b/web/satellite/src/components/modals/EnterPassphraseModal.vue index 1a61f362a..619531e1a 100644 --- a/web/satellite/src/components/modals/EnterPassphraseModal.vue +++ b/web/satellite/src/components/modals/EnterPassphraseModal.vue @@ -2,17 +2,20 @@ // See LICENSE for copying information.