2022-07-12 10:55:28 +02:00
|
|
|
import { RouteRecordRaw } from "vue-router";
|
2021-10-10 16:24:12 +02:00
|
|
|
import { i18n } from "@/utils/i18n";
|
2020-02-18 08:57:00 +01:00
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
const { t } = i18n.global;
|
|
|
|
|
2019-02-22 14:55:47 +01:00
|
|
|
export enum ActorRouteName {
|
2020-02-18 08:57:00 +01:00
|
|
|
GROUP = "Group",
|
|
|
|
CREATE_GROUP = "CreateGroup",
|
|
|
|
PROFILE = "Profile",
|
|
|
|
MY_GROUPS = "MY_GROUPS",
|
2019-06-17 17:15:27 +02:00
|
|
|
}
|
|
|
|
|
2022-07-12 10:55:28 +02:00
|
|
|
export const actorRoutes: RouteRecordRaw[] = [
|
2020-02-18 08:57:00 +01:00
|
|
|
{
|
|
|
|
path: "/groups/create",
|
|
|
|
name: ActorRouteName.CREATE_GROUP,
|
2022-07-12 10:55:28 +02:00
|
|
|
component: (): Promise<any> => import("@/views/Group/Create.vue"),
|
2021-10-10 16:24:12 +02:00
|
|
|
meta: {
|
|
|
|
requiredAuth: true,
|
2022-07-12 10:55:28 +02:00
|
|
|
announcer: { message: (): string => t("Create group") as string },
|
2021-10-10 16:24:12 +02:00
|
|
|
},
|
2020-02-18 08:57:00 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/@:preferredUsername",
|
|
|
|
name: ActorRouteName.GROUP,
|
2022-07-12 10:55:28 +02:00
|
|
|
component: (): Promise<any> => import("@/views/Group/Group.vue"),
|
2020-02-18 08:57:00 +01:00
|
|
|
props: true,
|
2021-10-10 16:24:12 +02:00
|
|
|
meta: { requiredAuth: false, announcer: { skip: true } },
|
2020-02-18 08:57:00 +01:00
|
|
|
},
|
|
|
|
{
|
|
|
|
path: "/groups/me",
|
|
|
|
name: ActorRouteName.MY_GROUPS,
|
2022-07-12 10:55:28 +02:00
|
|
|
component: (): Promise<any> => import("@/views/Group/MyGroups.vue"),
|
2021-10-10 16:24:12 +02:00
|
|
|
meta: {
|
|
|
|
requiredAuth: true,
|
2022-07-12 10:55:28 +02:00
|
|
|
announcer: { message: (): string => t("My groups") as string },
|
2021-10-10 16:24:12 +02:00
|
|
|
},
|
2020-02-18 08:57:00 +01:00
|
|
|
},
|
|
|
|
];
|