2019-02-22 14:55:47 +01:00
|
|
|
import Profile from '@/views/Account/Profile.vue';
|
2019-04-26 15:22:16 +02:00
|
|
|
import MyAccount from '@/views/Account/MyAccount.vue';
|
2019-02-22 14:55:47 +01:00
|
|
|
import CreateGroup from '@/views/Group/Create.vue';
|
|
|
|
import Group from '@/views/Group/Group.vue';
|
|
|
|
import GroupList from '@/views/Group/GroupList.vue';
|
2019-04-01 11:49:54 +02:00
|
|
|
import { RouteConfig } from 'vue-router';
|
2019-06-17 17:15:27 +02:00
|
|
|
import EditIdentity from '@/views/Account/children/EditIdentity.vue';
|
2019-02-22 14:55:47 +01:00
|
|
|
|
|
|
|
export enum ActorRouteName {
|
|
|
|
GROUP_LIST = 'GroupList',
|
|
|
|
GROUP = 'Group',
|
|
|
|
CREATE_GROUP = 'CreateGroup',
|
|
|
|
PROFILE = 'Profile',
|
2019-06-17 17:15:27 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export enum MyAccountRouteName {
|
|
|
|
CREATE_IDENTITY = 'CreateIdentity',
|
|
|
|
UPDATE_IDENTITY = 'UpdateIdentity',
|
2019-02-22 14:55:47 +01:00
|
|
|
}
|
|
|
|
|
2019-04-01 11:49:54 +02:00
|
|
|
export const actorRoutes: RouteConfig[] = [
|
2019-10-03 12:32:20 +02:00
|
|
|
// {
|
|
|
|
// path: '/groups',
|
|
|
|
// name: ActorRouteName.GROUP_LIST,
|
|
|
|
// component: GroupList,
|
|
|
|
// meta: { requiredAuth: false },
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// path: '/groups/create',
|
|
|
|
// name: ActorRouteName.CREATE_GROUP,
|
|
|
|
// component: CreateGroup,
|
|
|
|
// meta: { requiredAuth: true },
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// path: '/~:preferredUsername',
|
|
|
|
// name: ActorRouteName.GROUP,
|
|
|
|
// component: Group,
|
|
|
|
// props: true,
|
|
|
|
// meta: { requiredAuth: false },
|
|
|
|
// },
|
|
|
|
// {
|
|
|
|
// path: '/@:name',
|
|
|
|
// name: ActorRouteName.PROFILE,
|
|
|
|
// component: Profile,
|
|
|
|
// props: true,
|
|
|
|
// meta: { requiredAuth: false },
|
|
|
|
// },
|
2019-04-26 15:22:16 +02:00
|
|
|
{
|
2019-06-17 17:15:27 +02:00
|
|
|
path: '/my-account/identity',
|
2019-04-26 15:22:16 +02:00
|
|
|
component: MyAccount,
|
|
|
|
props: true,
|
|
|
|
meta: { requiredAuth: true },
|
2019-06-17 17:15:27 +02:00
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: 'create',
|
|
|
|
name: MyAccountRouteName.CREATE_IDENTITY,
|
|
|
|
component: EditIdentity,
|
2019-12-17 19:32:48 +01:00
|
|
|
props: (route) => ({ identityName: route.params.identityName, isUpdate: false }),
|
2019-06-17 17:15:27 +02:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'update/:identityName?',
|
|
|
|
name: MyAccountRouteName.UPDATE_IDENTITY,
|
|
|
|
component: EditIdentity,
|
2019-12-17 19:32:48 +01:00
|
|
|
props: (route) => ({ identityName: route.params.identityName, isUpdate: true }),
|
2019-06-17 17:15:27 +02:00
|
|
|
},
|
|
|
|
],
|
2019-04-26 15:22:16 +02:00
|
|
|
},
|
2019-02-22 14:55:47 +01:00
|
|
|
];
|