build: switch from yarn to npm to manage js dependencies and move js contents to root

yarn v1 is being deprecated and starts to have some issues

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2023-11-14 17:24:42 +01:00
parent 32055122c3
commit 2e72f6faf4
595 changed files with 12078 additions and 7843 deletions

39
src/router/actor.ts Normal file
View File

@@ -0,0 +1,39 @@
import { RouteRecordRaw } from "vue-router";
import { i18n } from "@/utils/i18n";
const { t } = i18n.global;
export enum ActorRouteName {
GROUP = "Group",
CREATE_GROUP = "CreateGroup",
PROFILE = "Profile",
MY_GROUPS = "MY_GROUPS",
}
export const actorRoutes: RouteRecordRaw[] = [
{
path: "/groups/create",
name: ActorRouteName.CREATE_GROUP,
component: (): Promise<any> => import("@/views/Group/CreateView.vue"),
meta: {
requiredAuth: true,
announcer: { message: (): string => t("Create group") as string },
},
},
{
path: "/@:preferredUsername",
name: ActorRouteName.GROUP,
component: (): Promise<any> => import("@/views/Group/GroupView.vue"),
props: true,
meta: { requiredAuth: false, announcer: { skip: true } },
},
{
path: "/groups/me",
name: ActorRouteName.MY_GROUPS,
component: (): Promise<any> => import("@/views/Group/MyGroups.vue"),
meta: {
requiredAuth: true,
announcer: { message: (): string => t("My groups") as string },
},
},
];