V0.9.65 ui changes
This commit is contained in:
@@ -201,11 +201,14 @@ function UserRow({ u, onUpdated }) {
|
||||
}
|
||||
|
||||
export default function UserManagerModal({ onClose }) {
|
||||
const isMobile = window.innerWidth < 768;
|
||||
const toast = useToast();
|
||||
const [users, setUsers] = useState([]);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [search, setSearch] = useState('');
|
||||
const [tab, setTab] = useState('users');
|
||||
// Reset bulk tab if somehow active on mobile
|
||||
useEffect(() => { if(isMobile && tab === 'bulk') setTab('users'); }, [isMobile]);
|
||||
const [creating, setCreating] = useState(false);
|
||||
const [form, setForm] = useState({ name: '', email: '', password: '', role: 'member' });
|
||||
|
||||
@@ -293,7 +296,7 @@ export default function UserManagerModal({ onClose }) {
|
||||
<div className="flex gap-2" style={{ marginBottom: 20 }}>
|
||||
<button className={`btn btn-sm ${tab === 'users' ? 'btn-primary' : 'btn-secondary'}`} onClick={() => setTab('users')}>All Users ({users.length})</button>
|
||||
<button className={`btn btn-sm ${tab === 'create' ? 'btn-primary' : 'btn-secondary'}`} onClick={() => setTab('create')}>+ Create User</button>
|
||||
<button className={`btn btn-sm ${tab === 'bulk' ? 'btn-primary' : 'btn-secondary'}`} onClick={() => setTab('bulk')}>Bulk Import CSV</button>
|
||||
{!isMobile && <button className={`btn btn-sm ${tab === 'bulk' ? 'btn-primary' : 'btn-secondary'}`} onClick={() => setTab('bulk')}>Bulk Import CSV</button>}
|
||||
</div>
|
||||
|
||||
{/* Users list — accordion */}
|
||||
|
||||
Reference in New Issue
Block a user