Skip to content

Commit

Permalink
feat: checkout 314
Browse files Browse the repository at this point in the history
  • Loading branch information
dolphin0618 committed Jun 18, 2024
1 parent c33adb6 commit 9345568
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/frontend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bisheng",
"version": "0.3.1",
"version": "0.3.1.3",
"private": true,
"dependencies": {
"@emotion/react": "^11.11.1",
Expand Down
12 changes: 6 additions & 6 deletions src/frontend/src/layout/MainLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default function MainLayout() {
{user.user_name} <DropDownIcon className=" inline-block mt-[-2px]"/>
</span>
}>
{/* <SelectHoverItem onClick={JumpResetPage}><LockClosedIcon className="w-4 h-4 mr-1" /><span>修改密码</span></SelectHoverItem> */}
<SelectHoverItem onClick={JumpResetPage}><LockClosedIcon className="w-4 h-4 mr-1" /><span>修改密码</span></SelectHoverItem>
<SelectHoverItem onClick={handleLogout}><QuitIcon className="w-4 h-4 mr-1" /><span>退出登录</span></SelectHoverItem>
</SelectHover>
</div>
Expand Down Expand Up @@ -122,11 +122,11 @@ export default function MainLayout() {
</>
}
{
// user.role === 'admin' && <>
// <NavLink to='/log' className={`navlink inline-flex rounded-lg w-full px-6 hover:bg-nav-hover h-12 mb-[3.5px]`}>
// <LogIcon className="h-6 w-6 my-[12px]" /><span className="mx-[14px] max-w-[48px] text-[14px] leading-[48px]">{t('menu.log')}</span>
// </NavLink>
// </>
user.role === 'admin' && <>
<NavLink to='/log' className={`navlink inline-flex rounded-lg w-full px-6 hover:bg-nav-hover h-12 mb-[3.5px]`}>
<LogIcon className="h-6 w-6 my-[12px]" /><span className="mx-[14px] max-w-[48px] text-[14px] leading-[48px]">{t('menu.log')}</span>
</NavLink>
</>
}
</nav>
<div className="absolute left-0 bottom-0 w-[180px] p-2">
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/src/pages/SystemPage/components/Users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export default function Users(params) {
{user.user_id === el.user_id ? <Button variant="link" className="text-gray-400 px-0">{t('edit')}</Button> :
<Button variant="link" onClick={() => setCurrentUser(el)} className="px-0">{t('edit')}</Button>}
{/* 重置密码 */}
{/* {user.role === 'admin' && <Button variant="link" className="px-0 pl-4" onClick={() => userPwdModalRef.current.open(el.user_id)}>重置密码</Button>} */}
{user.role === 'admin' && <Button variant="link" className="px-0 pl-4" onClick={() => userPwdModalRef.current.open(el.user_id)}>重置密码</Button>}
{/* 禁用 */}
{
el.delete === 1 ? <Button variant="link" onClick={() => handleEnableUser(el)} className="text-green-500 px-0 pl-4">{t('enable')}</Button> :
Expand Down

0 comments on commit 9345568

Please sign in to comment.