diff --git a/components/DeleteUserModal.vue b/components/DeleteUserModal.vue
new file mode 100644
index 0000000..ce78006
--- /dev/null
+++ b/components/DeleteUserModal.vue
@@ -0,0 +1,75 @@
+
+
+
+
+
+ {{ $t("users.admin.deleteUser", [user?.username]) }}
+
+
+ {{ $t("common.deleteConfirm", [user?.username]) }}
+
+
+ {{ $t("common.cannotUndo") }}
+
+
+
+
+ deleteUser()"
+ >
+ {{ $t("delete") }}
+
+
+
+
+
+
+
diff --git a/composables/users.ts b/composables/users.ts
new file mode 100644
index 0000000..28761c5
--- /dev/null
+++ b/composables/users.ts
@@ -0,0 +1,24 @@
+import type { SerializeObject } from "nitropack";
+import type { User, AuthMec } from "~/prisma/client";
+
+export const useUsers = () =>
+ useState<
+ | Array<
+ SerializeObject<
+ User & {
+ authMecs?: Array<{ id: string; mec: AuthMec }>;
+ }
+ >
+ >
+ | undefined
+ >("users", () => undefined);
+
+export const fetchUsers = async () => {
+ const users = useUsers();
+
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore forget why this ignor exists
+ const newValue: User[] = await $dropFetch("/api/v1/admin/users");
+ users.value = newValue;
+ return newValue;
+};
diff --git a/i18n/locales/en_us.json b/i18n/locales/en_us.json
index a9bfdf6..c7f9bda 100644
--- a/i18n/locales/en_us.json
+++ b/i18n/locales/en_us.json
@@ -118,6 +118,14 @@
"invalidInvite": "Invalid or expired invitation",
"usernameTaken": "Username already taken."
},
+ "admin": {
+ "user": {
+ "delete": {
+ "desc": "Drop couldn't delete this user: {0}",
+ "title": "Failed to delete user"
+ }
+ }
+ },
"backHome": "{arrow} Back to home",
"invalidBody": "Invalid request body: {0}",
"inviteRequired": "Invitation required to sign up.",
@@ -238,6 +246,10 @@
"srEditLabel": "Edit",
"adminUserLabel": "Admin user",
"normalUserLabel": "Normal user",
+
+ "delete": "Delete",
+ "deleteUser": "Delete user {0}",
+
"authentication": {
"title": "Authentication",
"description": "Drop supports a variety of \"authentication mechanisms\". As you enable or disable them, they are shown on the sign in screen for users to select from. Click the dot menu to configure the authentication mechanism.",
diff --git a/pages/admin/users/index.vue b/pages/admin/users/index.vue
index 3c84c85..548bfba 100644
--- a/pages/admin/users/index.vue
+++ b/pages/admin/users/index.vue
@@ -115,6 +115,14 @@
+
+
|