feat: scaffold complete danable frontend architecture with all pages, layouts, stores, and 3 annotator modes

This commit is contained in:
quanganh2k4 2026-10-30 00:33:07 +07:00
commit 78848dd7d1
173 changed files with 18649 additions and 0 deletions

View file

@ -0,0 +1,73 @@
import React from 'react'
import { useNavigate } from 'react-router-dom'
import { showToast } from '../../../components/feedback/Toast'
export const UserInfo: React.FC = () => {
const navigate = useNavigate()
const handleLogout = () => {
showToast.success('Đã đăng xuất khỏi phiên làm việc')
navigate('/login')
}
return (
<div className="space-y-3">
<button
type="button"
onClick={() => showToast.info('Tài liệu hướng dẫn sử dụng danable v1.0')}
className="flex w-full items-center gap-2 px-2 py-1.5 text-xs font-medium text-slate-600 hover:text-slate-900 transition-colors"
>
<svg
className="h-4 w-4 text-slate-400"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={1.8}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
/>
</svg>
<span>Tài liệu & hỗ trợ</span>
</button>
<div className="border-t border-slate-200 pt-3 flex items-center justify-between">
<div className="flex items-center gap-2.5 min-w-0">
<div className="flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-orange-100 text-xs font-bold text-slate-800">
MA
</div>
<div className="min-w-0">
<div className="truncate text-xs font-semibold text-slate-900">
Minh Anh
</div>
<div className="truncate text-[11px] text-slate-500">
Quản trị viên
</div>
</div>
</div>
<button
type="button"
onClick={handleLogout}
title="Đăng xuất"
className="rounded-lg p-1.5 text-slate-400 hover:bg-slate-100 hover:text-slate-700 transition-colors"
>
<svg
className="h-4 w-4"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
strokeWidth={1.8}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"
/>
</svg>
</button>
</div>
</div>
)
}