diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 352650a..cc5a133 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,12 +4,17 @@ - - + + + + + + - - - + + + + @@ -155,7 +160,6 @@ - @@ -180,7 +184,8 @@ - + + true diff --git a/web/src/components/admin/UserAssignPermsPanel.vue b/web/src/components/admin/UserAssignPermsPanel.vue new file mode 100644 index 0000000..ba6181f --- /dev/null +++ b/web/src/components/admin/UserAssignPermsPanel.vue @@ -0,0 +1,164 @@ + + !val && emits('close')"> + + + + + + + + + Key + + + Value + + + + + + + + {{ key }} + + deleteNode(key)" /> + changeNodeType(key)" /> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/web/src/components/admin/UserDetailPanel.vue b/web/src/components/admin/UserDetailPanel.vue new file mode 100644 index 0000000..487395f --- /dev/null +++ b/web/src/components/admin/UserDetailPanel.vue @@ -0,0 +1,46 @@ + + !val && emits('close')"> + + + + + + Name + {{ props.data?.name }} + + + Nick + {{ props.data?.nick }} + + + Entire Payload + + {{ JSON.stringify(props.data, null, 4) }} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/src/components/navigation/AppBar.vue b/web/src/components/navigation/AppBar.vue index a369aeb..fdfb806 100644 --- a/web/src/components/navigation/AppBar.vue +++ b/web/src/components/navigation/AppBar.vue @@ -3,7 +3,7 @@ - Solarpass + {{ props.title ?? "Solarpass" }} @@ -23,7 +23,7 @@ - + @@ -35,10 +35,13 @@ import NotificationList from "@/components/NotificationList.vue" import UserMenu from "@/components/UserMenu.vue" import { useNotifications } from "@/stores/notifications" -import { ref } from "vue" +import { ref, useSlots } from "vue" const notify = useNotifications() +const slots = useSlots() +const props = defineProps<{ title?: String }>() + const openNotify = ref(false) diff --git a/web/src/layouts/administrator.vue b/web/src/layouts/administrator.vue new file mode 100644 index 0000000..4d3c5d6 --- /dev/null +++ b/web/src/layouts/administrator.vue @@ -0,0 +1,30 @@ + + + + + + + + + + + diff --git a/web/src/layouts/user-center.vue b/web/src/layouts/user-center.vue index 67abb1a..5a2ee15 100755 --- a/web/src/layouts/user-center.vue +++ b/web/src/layouts/user-center.vue @@ -25,6 +25,6 @@ import Copyright from "@/components/Copyright.vue" \ No newline at end of file diff --git a/web/src/router/index.ts b/web/src/router/index.ts index f506750..9aea2a8 100755 --- a/web/src/router/index.ts +++ b/web/src/router/index.ts @@ -1,6 +1,7 @@ import { createRouter, createWebHistory } from "vue-router" import { useUserinfo } from "@/stores/userinfo" import UserCenterLayout from "@/layouts/user-center.vue" +import AdministratorLayout from "@/layouts/administrator.vue" const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), @@ -74,6 +75,22 @@ const router = createRouter({ }, ], }, + { + path: "/admin", + component: AdministratorLayout, + children: [ + { + path: "", + name: "admin.dashboard", + component: () => import("@/views/admin/dashboard.vue"), + }, + { + path: "users", + name: "admin.users", + component: () => import("@/views/admin/users.vue"), + }, + ] + } ], }) diff --git a/web/src/views/admin/dashboard.vue b/web/src/views/admin/dashboard.vue new file mode 100644 index 0000000..e3411a4 --- /dev/null +++ b/web/src/views/admin/dashboard.vue @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/web/src/views/admin/users.vue b/web/src/views/admin/users.vue new file mode 100644 index 0000000..f395d66 --- /dev/null +++ b/web/src/views/admin/users.vue @@ -0,0 +1,123 @@ + + + + + + + + Users + + + + + + + {{ item.id }} + {{ item.name }} + {{ item.nick }} + {{ new Date(item.created_at).toLocaleString() }} + + + + + + + + + + + + + + + + + + error = val" /> + + error = null"> + {{ error }} + + + + + diff --git a/web/src/views/security.vue b/web/src/views/security.vue index fa75c55..3787987 100755 --- a/web/src/views/security.vue +++ b/web/src/views/security.vue @@ -29,7 +29,7 @@ {{ new Date(item.created_at).toLocaleString() }} - +
{{ key }}
{{ props.data?.name }}
{{ props.data?.nick }}
{{ JSON.stringify(props.data, null, 4) }}