feat: scaffold complete danable frontend architecture with all pages, layouts, stores, and 3 annotator modes
This commit is contained in:
commit
78848dd7d1
173 changed files with 18649 additions and 0 deletions
69
src/layouts/components/Sidebar/WorkspaceSelector.tsx
Normal file
69
src/layouts/components/Sidebar/WorkspaceSelector.tsx
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
import React, { useState } from 'react'
|
||||
import { showToast } from '../../../components/feedback/Toast'
|
||||
|
||||
export const WorkspaceSelector: React.FC = () => {
|
||||
const [open, setOpen] = useState(false)
|
||||
|
||||
return (
|
||||
<div className="relative">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setOpen((prev) => !prev)}
|
||||
className="w-full flex items-center justify-between rounded-xl border border-slate-300/90 bg-white px-3 py-2.5 text-left hover:border-slate-400 transition-colors"
|
||||
>
|
||||
<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-indigo-50 text-xs font-bold text-slate-700">
|
||||
VL
|
||||
</div>
|
||||
<div className="min-w-0">
|
||||
<div className="truncate text-sm font-semibold text-slate-900 leading-tight">
|
||||
danable
|
||||
</div>
|
||||
<div className="truncate text-[11px] text-slate-500 mt-0.5">
|
||||
Không gian nhóm
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<svg
|
||||
className="h-4 w-4 text-slate-400 shrink-0"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
strokeWidth={1.8}
|
||||
>
|
||||
<path
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
d="M8 9l4-4 4 4m0 6l-4 4-4-4"
|
||||
/>
|
||||
</svg>
|
||||
</button>
|
||||
|
||||
{open && (
|
||||
<div className="absolute left-0 right-0 z-30 mt-1.5 rounded-xl border border-slate-200 bg-white p-1.5 shadow-lg">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
setOpen(false)
|
||||
showToast.info('Đang ở Không gian nhóm danable')
|
||||
}}
|
||||
className="flex w-full items-center justify-between rounded-lg bg-slate-50 px-2.5 py-2 text-xs font-medium text-slate-800"
|
||||
>
|
||||
<span>danable (Không gian nhóm)</span>
|
||||
<span className="text-[#C95C3C] font-bold">✓</span>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => {
|
||||
setOpen(false)
|
||||
showToast.info('Đã chuyển sang Không gian cá nhân')
|
||||
}}
|
||||
className="mt-0.5 flex w-full items-center justify-between rounded-lg px-2.5 py-2 text-xs text-slate-600 hover:bg-slate-50"
|
||||
>
|
||||
<span>VisionLab R&D</span>
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue