web/satellite: initial setup for onboarding CLI flow

Added components for the new flow.
Removed onboarding logic from regular access grant wizard.
Updated routes to include new flow.

Change-Id: I52ca6eb3da1e4e3a4b465ed58cd45398d10fd268
This commit is contained in:
Vitalii Shpital 2021-08-12 15:45:44 +03:00
parent cd973fcb78
commit 7a08c19c53
25 changed files with 302 additions and 348 deletions

View File

@ -38,35 +38,35 @@ export default class ProgressBar extends Vue {
* Indicates if current route is on name step. * Indicates if current route is on name step.
*/ */
public get isNameStep(): boolean { public get isNameStep(): boolean {
return this.$route.name === RouteConfig.NameStep.name || this.$route.name === RouteConfig.AccessGrantName.name; return this.$route.name === RouteConfig.NameStep.name;
} }
/** /**
* Indicates if current route is on permissions step. * Indicates if current route is on permissions step.
*/ */
public get isPermissionsStep(): boolean { public get isPermissionsStep(): boolean {
return this.$route.name === RouteConfig.PermissionsStep.name || this.$route.name === RouteConfig.AccessGrantPermissions.name; return this.$route.name === RouteConfig.PermissionsStep.name;
} }
/** /**
* Indicates if current route is on passphrase step. * Indicates if current route is on passphrase step.
*/ */
public get isPassphraseStep(): boolean { public get isPassphraseStep(): boolean {
return this.$route.name === RouteConfig.CreatePassphraseStep.name || this.$route.name === RouteConfig.EnterPassphraseStep.name || this.$route.name === RouteConfig.AccessGrantPassphrase.name; return this.$route.name === RouteConfig.CreatePassphraseStep.name || this.$route.name === RouteConfig.EnterPassphraseStep.name;
} }
/** /**
* Indicates if current route is on result step. * Indicates if current route is on result step.
*/ */
public get isResultStep(): boolean { public get isResultStep(): boolean {
return this.$route.name === RouteConfig.ResultStep.name || this.$route.name === RouteConfig.AccessGrantResult.name; return this.$route.name === RouteConfig.ResultStep.name;
} }
/** /**
* Indicates if current route is on gateway step. * Indicates if current route is on gateway step.
*/ */
public get isGatewayStep(): boolean { public get isGatewayStep(): boolean {
return this.$route.name === RouteConfig.GatewayStep.name || this.$route.name === RouteConfig.AccessGrantGateway.name; return this.$route.name === RouteConfig.GatewayStep.name;
} }
} }
</script> </script>

View File

@ -2,7 +2,7 @@
// See LICENSE for copying information. // See LICENSE for copying information.
<template> <template>
<div class="cli-container" :class="{ 'border-radius': isOnboardingTour }"> <div class="cli-container">
<BackIcon class="cli-container__back-icon" @click="onBackClick" /> <BackIcon class="cli-container__back-icon" @click="onBackClick" />
<h1 class="cli-container__title">Create Access Grant in CLI</h1> <h1 class="cli-container__title">Create Access Grant in CLI</h1>
<p class="cli-container__sub-title"> <p class="cli-container__sub-title">
@ -82,12 +82,6 @@ export default class CLIStep extends Vue {
*/ */
public mounted(): void { public mounted(): void {
if (!this.$route.params.key && !this.$route.params.restrictedKey) { if (!this.$route.params.key && !this.$route.params.restrictedKey) {
if (this.isOnboardingTour) {
this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantName)).path);
return;
}
this.$router.push(RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.NameStep)).path); this.$router.push(RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.NameStep)).path);
return; return;
@ -102,17 +96,6 @@ export default class CLIStep extends Vue {
* Redirects to previous step. * Redirects to previous step.
*/ */
public onBackClick(): void { public onBackClick(): void {
if (this.isOnboardingTour) {
this.$router.push({
name: RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantPermissions)).name,
params: {
key: this.key,
},
});
return;
}
this.$router.push({ this.$router.push({
name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.PermissionsStep)).name, name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.PermissionsStep)).name,
params: { params: {
@ -126,7 +109,7 @@ export default class CLIStep extends Vue {
* Redirects to upload step. * Redirects to upload step.
*/ */
public onDoneClick(): void { public onDoneClick(): void {
this.isOnboardingTour ? this.$router.push(RouteConfig.ProjectDashboard.path) : this.$router.push(RouteConfig.AccessGrants.path); this.$router.push(RouteConfig.AccessGrants.path);
} }
/** /**
@ -161,13 +144,6 @@ export default class CLIStep extends Vue {
this.$copyText(this.restrictedKey); this.$copyText(this.restrictedKey);
this.$notify.success('Token was copied successfully'); this.$notify.success('Token was copied successfully');
} }
/**
* Indicates if current route is onboarding tour.
*/
public get isOnboardingTour(): boolean {
return this.$route.path.includes(RouteConfig.OnboardingTour.path);
}
} }
</script> </script>

View File

@ -44,12 +44,6 @@ export default class CreatePassphraseStep extends Vue {
*/ */
public async mounted(): Promise<void> { public async mounted(): Promise<void> {
if (!this.$route.params.key && !this.$route.params.restrictedKey) { if (!this.$route.params.key && !this.$route.params.restrictedKey) {
if (this.isOnboardingTour) {
await this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantName)).path);
return;
}
await this.$router.push(RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.NameStep)).path); await this.$router.push(RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.NameStep)).path);
return; return;
@ -113,19 +107,6 @@ export default class CreatePassphraseStep extends Vue {
this.isLoading = false; this.isLoading = false;
if (this.isOnboardingTour) {
await this.$router.push({
name: RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantResult)).name,
params: {
access: this.access,
key: this.key,
restrictedKey: this.restrictedKey,
},
});
return;
}
await this.$router.push({ await this.$router.push({
name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.ResultStep)).name, name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.ResultStep)).name,
params: { params: {
@ -141,17 +122,6 @@ export default class CreatePassphraseStep extends Vue {
* Redirects to previous step. * Redirects to previous step.
*/ */
public onBackClick(): void { public onBackClick(): void {
if (this.isOnboardingTour) {
this.$router.push({
name: RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantPermissions)).name,
params: {
key: this.key,
},
});
return;
}
this.$router.push({ this.$router.push({
name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.PermissionsStep)).name, name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.PermissionsStep)).name,
params: { params: {
@ -159,13 +129,6 @@ export default class CreatePassphraseStep extends Vue {
}, },
}); });
} }
/**
* Indicates if current route is onboarding tour.
*/
private get isOnboardingTour(): boolean {
return this.$route.path.includes(RouteConfig.OnboardingTour.path);
}
} }
</script> </script>

View File

@ -2,7 +2,7 @@
// See LICENSE for copying information. // See LICENSE for copying information.
<template> <template>
<div class="enter-passphrase" :class="{ 'border-radius': isOnboardingTour }"> <div class="enter-passphrase">
<BackIcon class="enter-passphrase__back-icon" @click="onBackClick" /> <BackIcon class="enter-passphrase__back-icon" @click="onBackClick" />
<h1 class="enter-passphrase__title">Enter Encryption Passphrase</h1> <h1 class="enter-passphrase__title">Enter Encryption Passphrase</h1>
<p class="enter-passphrase__sub-title">Enter the passphrase you most recently generated for Access Grants</p> <p class="enter-passphrase__sub-title">Enter the passphrase you most recently generated for Access Grants</p>

View File

@ -2,7 +2,7 @@
// See LICENSE for copying information. // See LICENSE for copying information.
<template> <template>
<div class="gateway" :class="{ 'border-radius': isOnboardingTour }"> <div class="gateway">
<BackIcon class="gateway__back-icon" @click="onBackClick" /> <BackIcon class="gateway__back-icon" @click="onBackClick" />
<h1 class="gateway__title">S3 Gateway</h1> <h1 class="gateway__title">S3 Gateway</h1>
<div class="gateway__container"> <div class="gateway__container">
@ -131,12 +131,6 @@ export default class GatewayStep extends Vue {
*/ */
public mounted(): void { public mounted(): void {
if (!this.$route.params.access && !this.$route.params.key && !this.$route.params.resctrictedKey) { if (!this.$route.params.access && !this.$route.params.key && !this.$route.params.resctrictedKey) {
if (this.isOnboardingTour) {
this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantName)).path);
return;
}
this.$router.push(RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.NameStep)).path); this.$router.push(RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.NameStep)).path);
return; return;
@ -179,19 +173,6 @@ export default class GatewayStep extends Vue {
* Redirects to previous step. * Redirects to previous step.
*/ */
public onBackClick(): void { public onBackClick(): void {
if (this.isOnboardingTour) {
this.$router.push({
name: RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantResult)).name,
params: {
access: this.access,
key: this.key,
restrictedKey: this.restrictedKey,
},
});
return;
}
this.$router.push({ this.$router.push({
name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.ResultStep)).name, name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.ResultStep)).name,
params: { params: {
@ -207,7 +188,7 @@ export default class GatewayStep extends Vue {
* Proceed to upload data step. * Proceed to upload data step.
*/ */
public onDoneClick(): void { public onDoneClick(): void {
this.isOnboardingTour ? this.$router.push(RouteConfig.ProjectDashboard.path) : this.$router.push(RouteConfig.AccessGrants.path); this.$router.push(RouteConfig.AccessGrants.path);
} }
/** /**
@ -234,13 +215,6 @@ export default class GatewayStep extends Vue {
this.isLoading = false; this.isLoading = false;
} }
/**
* Indicates if current route is onboarding tour.
*/
public get isOnboardingTour(): boolean {
return this.$route.path.includes(RouteConfig.OnboardingTour.path);
}
/** /**
* Returns generated gateway credentials from store. * Returns generated gateway credentials from store.
*/ */

View File

@ -2,7 +2,7 @@
// See LICENSE for copying information. // See LICENSE for copying information.
<template> <template>
<div class="name-step" :class="{ 'border-radius': isOnboardingTour }"> <div class="name-step">
<h1 class="name-step__title">Name Your Access Grant</h1> <h1 class="name-step__title">Name Your Access Grant</h1>
<p class="name-step__sub-title">Enter a name for your new Access grant to get started.</p> <p class="name-step__sub-title">Enter a name for your new Access grant to get started.</p>
<HeaderedInput <HeaderedInput
@ -14,7 +14,6 @@
/> />
<div class="name-step__buttons-area"> <div class="name-step__buttons-area">
<VButton <VButton
v-if="!isOnboardingTour"
class="cancel-button" class="cancel-button"
label="Cancel" label="Cancel"
width="50%" width="50%"
@ -130,17 +129,6 @@ export default class NameStep extends Vue {
this.isLoading = false; this.isLoading = false;
if (this.isOnboardingTour) {
await this.$router.push({
name: RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantPermissions)).name,
params: {
key: this.key,
},
});
return;
}
await this.$router.push({ await this.$router.push({
name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.PermissionsStep)).name, name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.PermissionsStep)).name,
params: { params: {
@ -148,13 +136,6 @@ export default class NameStep extends Vue {
}, },
}); });
} }
/**
* Indicates if current route is onboarding tour.
*/
public get isOnboardingTour(): boolean {
return this.$route.path.includes(RouteConfig.OnboardingTour.path);
}
} }
</script> </script>

View File

@ -2,7 +2,7 @@
// See LICENSE for copying information. // See LICENSE for copying information.
<template> <template>
<div class="permissions" :class="{ 'border-radius': isOnboardingTour }"> <div class="permissions">
<BackIcon class="permissions__back-icon" @click="onBackClick" /> <BackIcon class="permissions__back-icon" @click="onBackClick" />
<h1 class="permissions__title">Access Permissions</h1> <h1 class="permissions__title">Access Permissions</h1>
<p class="permissions__sub-title"> <p class="permissions__sub-title">
@ -112,12 +112,6 @@ export default class PermissionsStep extends Vue {
*/ */
public async mounted(): Promise<void> { public async mounted(): Promise<void> {
if (!this.$route.params.key) { if (!this.$route.params.key) {
if (this.isOnboardingTour) {
await this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantName)).path);
return;
}
this.onBackClick(); this.onBackClick();
return; return;
@ -143,8 +137,6 @@ export default class PermissionsStep extends Vue {
* Redirects to previous step. * Redirects to previous step.
*/ */
public onBackClick(): void { public onBackClick(): void {
this.isOnboardingTour ?
this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantName)).path) :
this.$router.push(RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.NameStep)).path); this.$router.push(RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.NameStep)).path);
} }
@ -178,18 +170,6 @@ export default class PermissionsStep extends Vue {
this.isLoading = false; this.isLoading = false;
if (this.isOnboardingTour) {
await this.$router.push({
name: RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantCLI)).name,
params: {
key: this.key,
restrictedKey: this.restrictedKey,
},
});
return;
}
await this.$router.push({ await this.$router.push({
name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.CLIStep)).name, name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.CLIStep)).name,
params: { params: {
@ -218,18 +198,6 @@ export default class PermissionsStep extends Vue {
this.isLoading = false; this.isLoading = false;
if (this.isOnboardingTour) {
await this.$router.push({
name: RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantPassphrase)).name,
params: {
key: this.key,
restrictedKey: this.restrictedKey,
},
});
return;
}
if (this.accessGrantsAmount > 1) { if (this.accessGrantsAmount > 1) {
await this.$router.push({ await this.$router.push({
name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.EnterPassphraseStep)).name, name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.EnterPassphraseStep)).name,
@ -258,13 +226,6 @@ export default class PermissionsStep extends Vue {
return this.$store.state.accessGrantsModule.isAccessGrantsWebWorkerReady; return this.$store.state.accessGrantsModule.isAccessGrantsWebWorkerReady;
} }
/**
* Indicates if current route is onboarding tour.
*/
public get isOnboardingTour(): boolean {
return this.$route.path.includes(RouteConfig.OnboardingTour.path);
}
/** /**
* Returns selected bucket names. * Returns selected bucket names.
*/ */

View File

@ -2,7 +2,7 @@
// See LICENSE for copying information. // See LICENSE for copying information.
<template> <template>
<div class="generate-grant" :class="{ 'border-radius': isOnboardingTour }"> <div class="generate-grant">
<BackIcon class="generate-grant__back-icon" @click="onBackClick" /> <BackIcon class="generate-grant__back-icon" @click="onBackClick" />
<h1 class="generate-grant__title">Generate Access Grant</h1> <h1 class="generate-grant__title">Generate Access Grant</h1>
<div class="generate-grant__warning"> <div class="generate-grant__warning">
@ -79,12 +79,6 @@ export default class ResultStep extends Vue {
*/ */
public mounted(): void { public mounted(): void {
if (!this.$route.params.access && !this.$route.params.key && !this.$route.params.resctrictedKey) { if (!this.$route.params.access && !this.$route.params.key && !this.$route.params.resctrictedKey) {
if (this.isOnboardingTour) {
this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantName)).path);
return;
}
this.$router.push(RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.NameStep)).path); this.$router.push(RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.NameStep)).path);
return; return;
@ -137,18 +131,6 @@ export default class ResultStep extends Vue {
* Redirects to previous step. * Redirects to previous step.
*/ */
public onBackClick(): void { public onBackClick(): void {
if (this.isOnboardingTour) {
this.$router.push({
name: RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantPassphrase)).name,
params: {
key: this.key,
restrictedKey: this.restrictedKey,
},
});
return;
}
if (this.accessGrantsAmount > 1) { if (this.accessGrantsAmount > 1) {
this.$router.push({ this.$router.push({
name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.EnterPassphraseStep)).name, name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.EnterPassphraseStep)).name,
@ -175,7 +157,7 @@ export default class ResultStep extends Vue {
* Proceed to upload data step. * Proceed to upload data step.
*/ */
public onDoneClick(): void { public onDoneClick(): void {
this.isOnboardingTour ? this.$router.push(RouteConfig.ProjectDashboard.path) : this.$router.push(RouteConfig.AccessGrants.path); this.$router.push(RouteConfig.AccessGrants.path);
} }
/** /**
@ -183,19 +165,6 @@ export default class ResultStep extends Vue {
* Proceed to gateway step. * Proceed to gateway step.
*/ */
public navigateToGatewayStep(): void { public navigateToGatewayStep(): void {
if (this.isOnboardingTour) {
this.$router.push({
name: RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant.with(RouteConfig.AccessGrantGateway)).name,
params: {
access: this.access,
key: this.key,
restrictedKey: this.restrictedKey,
},
});
return;
}
this.$router.push({ this.$router.push({
name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.GatewayStep)).name, name: RouteConfig.AccessGrants.with(RouteConfig.CreateAccessGrant.with(RouteConfig.GatewayStep)).name,
params: { params: {
@ -206,13 +175,6 @@ export default class ResultStep extends Vue {
}); });
} }
/**
* Indicates if current route is onboarding tour.
*/
public get isOnboardingTour(): boolean {
return this.$route.path.includes(RouteConfig.OnboardingTour.path);
}
/** /**
* Returns amount of access grants from store. * Returns amount of access grants from store.
*/ */

View File

@ -0,0 +1,18 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="onboarding-cli">
<div class="onboarding-cli__container">
<router-view />
</div>
</div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
// @vue/component
@Component
export default class OnbCLIStep extends Vue {}
</script>

View File

@ -1,113 +0,0 @@
// Copyright (C) 2020 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="onboarding-access">
<h1 class="onboarding-access__title">Create an Access Grant</h1>
<p class="onboarding-access__sub-title">
Access Grants are keys that allow access to upload, delete, and view your projects data.
</p>
<div
class="onboarding-access__content"
:class="{
'permissions-margin': isPermissionsStep,
'passphrase-margin': isPassphraseStep,
'result-margin': isResultStep,
'cli-margin': isCLIStep,
}"
>
<ProgressBar v-if="!isCLIStep" />
<router-view />
</div>
</div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import ProgressBar from '@/components/accessGrants/ProgressBar.vue';
import { RouteConfig } from '@/router';
// @vue/component
@Component({
components: {
ProgressBar,
},
})
export default class CreateAccessGrantStep extends Vue {
/**
* Indicates if current route is access grant permissions step.
*/
public get isPermissionsStep(): boolean {
return this.$route.name === RouteConfig.AccessGrantPermissions.name;
}
/**
* Indicates if current route is access grant passphrase step.
*/
public get isPassphraseStep(): boolean {
return this.$route.name === RouteConfig.AccessGrantPassphrase.name;
}
/**
* Indicates if current route is access grant CLI step.
*/
public get isCLIStep(): boolean {
return this.$route.name === RouteConfig.AccessGrantCLI.name;
}
/**
* Indicates if current route is access grant result step.
*/
public get isResultStep(): boolean {
return this.$route.name === RouteConfig.AccessGrantResult.name;
}
}
</script>
<style scoped lang="scss">
.onboarding-access {
font-family: 'font_regular', sans-serif;
font-style: normal;
&__title {
font-family: 'font_bold', sans-serif;
font-size: 32px;
line-height: 39px;
text-align: center;
color: #1b2533;
margin: 0 0 15px 0;
}
&__sub-title {
font-size: 16px;
line-height: 21px;
color: #000;
margin: 0 0 50px 0;
}
&__content {
display: flex;
align-items: center;
justify-content: center;
margin-left: -205px;
}
}
.permissions-margin {
margin-left: -210px;
}
.passphrase-margin {
margin-left: -190px;
}
.result-margin {
margin-left: -195px;
}
.cli-margin {
margin-left: 0;
}
</style>

View File

@ -75,7 +75,7 @@ export default class OverviewStep extends Vue {
this.isLoading = true; this.isLoading = true;
await this.analytics.linkEventTriggered(AnalyticsEvent.PATH_SELECTED, 'CLI'); await this.analytics.linkEventTriggered(AnalyticsEvent.PATH_SELECTED, 'CLI');
await this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant).with(RouteConfig.AccessGrantName).path); await this.$router.push(RouteConfig.OnboardingTour.with(RouteConfig.CLIStep).with(RouteConfig.EncryptYourData).path);
this.isLoading = false; this.isLoading = false;
} }

View File

@ -0,0 +1,14 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="key" />
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
// @vue/component
@Component
export default class APIKey extends Vue {}
</script>

View File

@ -0,0 +1,14 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="cli-install" />
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
// @vue/component
@Component
export default class CLIInstall extends Vue {}
</script>

View File

@ -0,0 +1,14 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="cli-setup" />
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
// @vue/component
@Component
export default class CLISetup extends Vue {}
</script>

View File

@ -0,0 +1,14 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="create-bucket" />
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
// @vue/component
@Component
export default class CreateBucket extends Vue {}
</script>

View File

@ -0,0 +1,14 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="download-object" />
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
// @vue/component
@Component
export default class DownloadObject extends Vue {}
</script>

View File

@ -0,0 +1,14 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="encrypt" />
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
// @vue/component
@Component
export default class EncryptYourData extends Vue {}
</script>

View File

@ -0,0 +1,14 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="generate-ag" />
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
// @vue/component
@Component
export default class GenerateAG extends Vue {}
</script>

View File

@ -0,0 +1,14 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="generated" />
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
// @vue/component
@Component
export default class GeneratedAG extends Vue {}
</script>

View File

@ -0,0 +1,14 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="import" />
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
// @vue/component
@Component
export default class ImportAG extends Vue {}
</script>

View File

@ -0,0 +1,14 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="list-object" />
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
// @vue/component
@Component
export default class ListObject extends Vue {}
</script>

View File

@ -0,0 +1,14 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="share-object" />
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
// @vue/component
@Component
export default class ShareObject extends Vue {}
</script>

View File

@ -0,0 +1,14 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="success-screen" />
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
// @vue/component
@Component
export default class SuccessScreen extends Vue {}
</script>

View File

@ -0,0 +1,14 @@
// Copyright (C) 2021 Storj Labs, Inc.
// See LICENSE for copying information.
<template>
<div class="upload-object" />
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
// @vue/component
@Component
export default class UploadObject extends Vue {}
</script>

View File

@ -26,13 +26,26 @@ import ObjectsArea from '@/components/objects/ObjectsArea.vue';
import UploadFile from '@/components/objects/UploadFile.vue'; import UploadFile from '@/components/objects/UploadFile.vue';
import WarningView from '@/components/objects/WarningView.vue'; import WarningView from '@/components/objects/WarningView.vue';
import OnboardingTourArea from '@/components/onboardingTour/OnboardingTourArea.vue'; import OnboardingTourArea from '@/components/onboardingTour/OnboardingTourArea.vue';
import CreateAccessGrantStep from '@/components/onboardingTour/steps/CreateAccessGrantStep.vue'; import OnbCLIStep from '@/components/onboardingTour/steps/CLIStep.vue';
import OverviewStep from '@/components/onboardingTour/steps/OverviewStep.vue'; import OverviewStep from '@/components/onboardingTour/steps/OverviewStep.vue';
import CreateProject from '@/components/project/CreateProject.vue'; import CreateProject from '@/components/project/CreateProject.vue';
import EditProjectDetails from '@/components/project/EditProjectDetails.vue'; import EditProjectDetails from '@/components/project/EditProjectDetails.vue';
import ProjectDashboard from '@/components/project/ProjectDashboard.vue'; import ProjectDashboard from '@/components/project/ProjectDashboard.vue';
import ProjectsList from '@/components/projectsList/ProjectsList.vue'; import ProjectsList from '@/components/projectsList/ProjectsList.vue';
import ProjectMembersArea from '@/components/team/ProjectMembersArea.vue'; import ProjectMembersArea from '@/components/team/ProjectMembersArea.vue';
import CLIInstall from "@/components/onboardingTour/steps/cliFlow/CLIInstall.vue";
import APIKey from "@/components/onboardingTour/steps/cliFlow/APIKey.vue";
import CLISetup from "@/components/onboardingTour/steps/cliFlow/CLISetup.vue";
import GenerateAG from "@/components/onboardingTour/steps/cliFlow/GenerateAG.vue";
import CreateBucket from "@/components/onboardingTour/steps/cliFlow/CreateBucket.vue";
import UploadObject from "@/components/onboardingTour/steps/cliFlow/UploadObject.vue";
import ListObject from "@/components/onboardingTour/steps/cliFlow/ListObject.vue";
import DownloadObject from "@/components/onboardingTour/steps/cliFlow/DownloadObject.vue";
import ShareObject from "@/components/onboardingTour/steps/cliFlow/ShareObject.vue";
import SuccessScreen from "@/components/onboardingTour/steps/cliFlow/SuccessScreen.vue";
import EncryptYourData from "@/components/onboardingTour/steps/cliFlow/EncryptYourData.vue";
import GeneratedAG from "@/components/onboardingTour/steps/cliFlow/GeneratedAG.vue";
import ImportAG from "@/components/onboardingTour/steps/cliFlow/ImportAG.vue";
import store from '@/store'; import store from '@/store';
import { OBJECTS_ACTIONS } from '@/store/modules/objects'; import { OBJECTS_ACTIONS } from '@/store/modules/objects';
@ -86,13 +99,20 @@ export abstract class RouteConfig {
// onboarding tour child paths // onboarding tour child paths
public static OverviewStep = new NavigationLink('overview', 'Onboarding Overview'); public static OverviewStep = new NavigationLink('overview', 'Onboarding Overview');
public static AccessGrant = new NavigationLink('access', 'Onboarding Access Grant'); public static OnbCLIStep = new NavigationLink('cli', 'Onboarding CLI');
public static AccessGrantName = new NavigationLink('name', 'Onboarding Name Access Grant'); public static EncryptYourData = new NavigationLink('encrypt', 'Onboarding Encrypt Data');
public static AccessGrantPermissions = new NavigationLink('permissions', 'Onboarding Access Grant Permissions'); public static GeneratedAG = new NavigationLink('generated-ag', 'Onboarding Generated AG');
public static AccessGrantCLI = new NavigationLink('cli', 'Onboarding Access Grant CLI'); public static APIKey = new NavigationLink('api-key', 'Onboarding API Key');
public static AccessGrantPassphrase = new NavigationLink('create-passphrase', 'Onboarding Access Grant Create Passphrase'); public static CLIInstall = new NavigationLink('cli-install', 'Onboarding CLI Install');
public static AccessGrantResult = new NavigationLink('result', 'Onboarding Access Grant Result'); public static CLISetup = new NavigationLink('cli-setup', 'Onboarding CLI Setup');
public static AccessGrantGateway = new NavigationLink('gateway', 'Onboarding Access Grant Gateway'); public static ImportAG = new NavigationLink('import', 'Onboarding Import AG');
public static GenerateAG = new NavigationLink('generate-ag', 'Onboarding Generate AG');
public static CreateBucket = new NavigationLink('create-bucket', 'Onboarding Create Bucket');
public static UploadObject = new NavigationLink('upload-object', 'Onboarding Upload Object');
public static ListObject = new NavigationLink('list-object', 'Onboarding List Object');
public static DownloadObject = new NavigationLink('download-object', 'Onboarding Download Object');
public static ShareObject = new NavigationLink('share-object', 'Onboarding Share Object');
public static SuccessScreen = new NavigationLink('success', 'Onboarding Success Screen');
// objects child paths. // objects child paths.
public static Warning = new NavigationLink('warning', 'Objects Warning'); public static Warning = new NavigationLink('warning', 'Objects Warning');
@ -208,44 +228,74 @@ export const router = new Router({
component: OverviewStep, component: OverviewStep,
}, },
{ {
path: RouteConfig.AccessGrant.path, path: RouteConfig.OnbCLIStep.path,
name: RouteConfig.AccessGrant.name, name: RouteConfig.OnbCLIStep.name,
component: CreateAccessGrantStep, component: OnbCLIStep,
children: [ children: [
{ {
path: RouteConfig.AccessGrantName.path, path: RouteConfig.EncryptYourData.path,
name: RouteConfig.AccessGrantName.name, name: RouteConfig.EncryptYourData.name,
component: NameStep, component: EncryptYourData,
}, },
{ {
path: RouteConfig.AccessGrantPermissions.path, path: RouteConfig.GeneratedAG.path,
name: RouteConfig.AccessGrantPermissions.name, name: RouteConfig.GeneratedAG.name,
component: PermissionsStep, component: GeneratedAG,
props: true,
}, },
{ {
path: RouteConfig.AccessGrantCLI.path, path: RouteConfig.ImportAG.path,
name: RouteConfig.AccessGrantCLI.name, name: RouteConfig.ImportAG.name,
component: CLIStep, component: ImportAG,
props: true,
}, },
{ {
path: RouteConfig.AccessGrantPassphrase.path, path: RouteConfig.APIKey.path,
name: RouteConfig.AccessGrantPassphrase.name, name: RouteConfig.APIKey.name,
component: CreatePassphraseStep, component: APIKey,
props: true,
}, },
{ {
path: RouteConfig.AccessGrantResult.path, path: RouteConfig.CLIInstall.path,
name: RouteConfig.AccessGrantResult.name, name: RouteConfig.CLIInstall.name,
component: ResultStep, component: CLIInstall,
props: true,
}, },
{ {
path: RouteConfig.AccessGrantGateway.path, path: RouteConfig.CLISetup.path,
name: RouteConfig.AccessGrantGateway.name, name: RouteConfig.CLISetup.name,
component: GatewayStep, component: CLISetup,
props: true, },
{
path: RouteConfig.GenerateAG.path,
name: RouteConfig.GenerateAG.name,
component: GenerateAG,
},
{
path: RouteConfig.CreateBucket.path,
name: RouteConfig.CreateBucket.name,
component: CreateBucket,
},
{
path: RouteConfig.UploadObject.path,
name: RouteConfig.UploadObject.name,
component: UploadObject,
},
{
path: RouteConfig.ListObject.path,
name: RouteConfig.ListObject.name,
component: ListObject,
},
{
path: RouteConfig.DownloadObject.path,
name: RouteConfig.DownloadObject.name,
component: DownloadObject,
},
{
path: RouteConfig.ShareObject.path,
name: RouteConfig.ShareObject.name,
component: ShareObject,
},
{
path: RouteConfig.SuccessScreen.path,
name: RouteConfig.SuccessScreen.name,
component: SuccessScreen,
}, },
], ],
}, },
@ -377,8 +427,8 @@ router.beforeEach(async (to, from, next) => {
return; return;
} }
if (navigateToDefaultSubTab(to.matched, RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant))) { if (navigateToDefaultSubTab(to.matched, RouteConfig.OnboardingTour.with(RouteConfig.CLIStep))) {
next(RouteConfig.OnboardingTour.with(RouteConfig.AccessGrant).with(RouteConfig.NameStep).path); next(RouteConfig.OnboardingTour.path);
return; return;
} }