Add ability to update/create/delete identities
This commit is contained in:
committed by
Thomas Citharel
parent
69fb1ec828
commit
0e485b2388
@@ -4,13 +4,18 @@ import CreateGroup from '@/views/Group/Create.vue';
|
||||
import Group from '@/views/Group/Group.vue';
|
||||
import GroupList from '@/views/Group/GroupList.vue';
|
||||
import { RouteConfig } from 'vue-router';
|
||||
import EditIdentity from '@/views/Account/children/EditIdentity.vue';
|
||||
|
||||
export enum ActorRouteName {
|
||||
GROUP_LIST = 'GroupList',
|
||||
GROUP = 'Group',
|
||||
CREATE_GROUP = 'CreateGroup',
|
||||
PROFILE = 'Profile',
|
||||
MY_ACCOUNT = 'MyAccount',
|
||||
}
|
||||
|
||||
export enum MyAccountRouteName {
|
||||
CREATE_IDENTITY = 'CreateIdentity',
|
||||
UPDATE_IDENTITY = 'UpdateIdentity',
|
||||
}
|
||||
|
||||
export const actorRoutes: RouteConfig[] = [
|
||||
@@ -41,10 +46,23 @@ export const actorRoutes: RouteConfig[] = [
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: '/my-account',
|
||||
name: ActorRouteName.MY_ACCOUNT,
|
||||
path: '/my-account/identity',
|
||||
component: MyAccount,
|
||||
props: true,
|
||||
meta: { requiredAuth: true },
|
||||
children: [
|
||||
{
|
||||
path: 'create',
|
||||
name: MyAccountRouteName.CREATE_IDENTITY,
|
||||
component: EditIdentity,
|
||||
props: { isUpdate: false },
|
||||
},
|
||||
{
|
||||
path: 'update/:identityName?',
|
||||
name: MyAccountRouteName.UPDATE_IDENTITY,
|
||||
component: EditIdentity,
|
||||
props: { isUpdate: true },
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -4,7 +4,7 @@ import PageNotFound from '@/views/PageNotFound.vue';
|
||||
import Home from '@/views/Home.vue';
|
||||
import { UserRouteName, userRoutes } from './user';
|
||||
import { EventRouteName, eventRoutes } from '@/router/event';
|
||||
import { ActorRouteName, actorRoutes } from '@/router/actor';
|
||||
import { ActorRouteName, actorRoutes, MyAccountRouteName } from '@/router/actor';
|
||||
import { ErrorRouteName, errorRoutes } from '@/router/error';
|
||||
import { authGuardIfNeeded } from '@/router/guards/auth-guard';
|
||||
import Search from '@/views/Search.vue';
|
||||
@@ -34,6 +34,7 @@ export const RouteName = {
|
||||
...UserRouteName,
|
||||
...EventRouteName,
|
||||
...ActorRouteName,
|
||||
...MyAccountRouteName,
|
||||
...ErrorRouteName,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user