feat(02-05): admin tab components and AdminView
- AdminView.vue: tabbed layout (Users | Quotas | AI Config) with UI-SPEC tab strip classes - AdminUsersTab.vue: user table with create form (crypto.getRandomValues password), inline deactivation confirmation, reactivate, reset-password, row-level spinner, empty state - AdminQuotasTab.vue: quota inline edit with MB display, usage %, warning when limit < usage - AdminAiConfigTab.vue: AI provider/model per-user with 1.5s "Saved" confirmation - client.js: fix adminDeactivateUser/adminReactivateUser to use PATCH /status endpoint, fix adminResetUserPassword to /password-reset, fix adminUpdateAiConfig to send ai_provider/ai_model, add adminGetUserQuota - No impersonation UI in any admin component (T-02-31)
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="p-8 max-w-4xl mx-auto">
|
||||
<h2 class="text-2xl font-semibold text-gray-900 mb-4">Admin panel</h2>
|
||||
<div class="p-8 max-w-5xl mx-auto">
|
||||
<h2 class="text-2xl font-semibold text-gray-900 mb-6">Admin panel</h2>
|
||||
|
||||
<!-- Sub-navigation -->
|
||||
<!-- Tab strip -->
|
||||
<div class="flex border-b border-gray-200 mb-6">
|
||||
<button
|
||||
v-for="tab in tabs"
|
||||
@@ -17,17 +17,18 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Tab content (stub — wired in Phase 2 admin plan) -->
|
||||
<div class="text-sm text-gray-500">
|
||||
{{ activeTab === 'users' ? 'User management coming soon.' :
|
||||
activeTab === 'quotas' ? 'Quota management coming soon.' :
|
||||
'AI config management coming soon.' }}
|
||||
</div>
|
||||
<!-- Tab content -->
|
||||
<AdminUsersTab v-if="activeTab === 'users'" />
|
||||
<AdminQuotasTab v-if="activeTab === 'quotas'" />
|
||||
<AdminAiConfigTab v-if="activeTab === 'ai'" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref } from 'vue'
|
||||
import AdminUsersTab from '../components/admin/AdminUsersTab.vue'
|
||||
import AdminQuotasTab from '../components/admin/AdminQuotasTab.vue'
|
||||
import AdminAiConfigTab from '../components/admin/AdminAiConfigTab.vue'
|
||||
|
||||
const tabs = [
|
||||
{ id: 'users', label: 'Users' },
|
||||
|
||||
Reference in New Issue
Block a user