web/satellite: access grant routing (#3966)

This commit is contained in:
Malcolm Bouzi 2020-11-11 11:41:46 -05:00 committed by GitHub
parent 5a337c48ec
commit 592d0bd6bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 129 additions and 2 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,6 +4,11 @@
import Vue from 'vue'; import Vue from 'vue';
import Router, { RouteRecord } from 'vue-router'; import Router, { RouteRecord } from 'vue-router';
import AccessGrants from '@/components/accessGrants/AccessGrants.vue';
import CreateAccessNameStep from '@/components/accessGrants/steps/CreateAccessNameStep.vue';
import CreateAccessPassphraseStep from '@/components/accessGrants/steps/CreateAccessPassphraseStep.vue';
import CreateAccessPermissionsStep from '@/components/accessGrants/steps/CreateAccessPermissionsStep.vue';
import CreateAccessUplinkStep from '@/components/accessGrants/steps/CreateAccessUplinkStep.vue';
import AccountArea from '@/components/account/AccountArea.vue'; import AccountArea from '@/components/account/AccountArea.vue';
import AccountBilling from '@/components/account/billing/BillingArea.vue'; import AccountBilling from '@/components/account/billing/BillingArea.vue';
import DetailedHistory from '@/components/account/billing/depositAndBillingHistory/DetailedHistory.vue'; import DetailedHistory from '@/components/account/billing/depositAndBillingHistory/DetailedHistory.vue';
@ -42,6 +47,7 @@ export abstract class RouteConfig {
public static OnboardingTour = new NavigationLink('/onboarding-tour', 'Onboarding Tour'); public static OnboardingTour = new NavigationLink('/onboarding-tour', 'Onboarding Tour');
public static CreateProject = new NavigationLink('/create-project', 'Create Project'); public static CreateProject = new NavigationLink('/create-project', 'Create Project');
public static EditProjectDetails = new NavigationLink('/edit-project-details', 'Edit Project Details'); public static EditProjectDetails = new NavigationLink('/edit-project-details', 'Edit Project Details');
public static AccessGrants = new NavigationLink('/access-grants', 'Access Grants');
// child paths // child paths
public static Settings = new NavigationLink('settings', 'Settings'); public static Settings = new NavigationLink('settings', 'Settings');
@ -49,6 +55,11 @@ export abstract class RouteConfig {
public static BillingHistory = new NavigationLink('billing-history', 'Billing History'); public static BillingHistory = new NavigationLink('billing-history', 'Billing History');
public static DepositHistory = new NavigationLink('deposit-history', 'Deposit History'); public static DepositHistory = new NavigationLink('deposit-history', 'Deposit History');
public static CreditsHistory = new NavigationLink('credits-history', 'Credits History'); public static CreditsHistory = new NavigationLink('credits-history', 'Credits History');
public static NameStep = new NavigationLink('access-create-name', 'Name Your Access');
public static PermissionsStep = new NavigationLink('access-create-permissions', 'Access Permissions');
public static PassphraseStep = new NavigationLink('access-create-passphrase', 'Encryption Passphrase');
public static UplinkStep = new NavigationLink('access-create-uplink', 'Upload Data');
// TODO: disabled until implementation // TODO: disabled until implementation
// public static Referral = new NavigationLink('referral', 'Referral'); // public static Referral = new NavigationLink('referral', 'Referral');
@ -65,6 +76,7 @@ export const notProjectRelatedRoutes = [
RouteConfig.DepositHistory.name, RouteConfig.DepositHistory.name,
RouteConfig.CreditsHistory.name, RouteConfig.CreditsHistory.name,
RouteConfig.Settings.name, RouteConfig.Settings.name,
RouteConfig.AccessGrants.name,
// RouteConfig.Referral.name, // RouteConfig.Referral.name,
]; ];
@ -165,8 +177,38 @@ export const router = new Router({
name: RouteConfig.EditProjectDetails.name, name: RouteConfig.EditProjectDetails.name,
component: EditProjectDetails, component: EditProjectDetails,
}, },
], {
}, path: RouteConfig.AccessGrants.path,
name: RouteConfig.AccessGrants.name,
meta: {
requiresAuth: true,
},
component: AccessGrants,
children: [
{
path: RouteConfig.NameStep.path,
name: RouteConfig.NameStep.name,
component: CreateAccessNameStep,
},
{
path: RouteConfig.PermissionsStep.path,
name: RouteConfig.PermissionsStep.name,
component: CreateAccessPermissionsStep,
},
{
path: RouteConfig.PassphraseStep.path,
name: RouteConfig.PassphraseStep.name,
component: CreateAccessPassphraseStep,
},
{
path: RouteConfig.UplinkStep.path,
name: RouteConfig.UplinkStep.name,
component: CreateAccessUplinkStep,
},
],
},
],
},
{ {
path: '*', path: '*',
name: '404', name: '404',