Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
proxy-manager-frontend
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
aolda
proxy-manager-frontend
Commits
981625e6
Commit
981625e6
authored
3 months ago
by
한동현
Browse files
Options
Downloads
Patches
Plain Diff
feat: 사이드바 선택 항목 강조 추가
parent
b46c0456
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/app-sidebar.tsx
+4
-6
4 additions, 6 deletions
src/components/app-sidebar.tsx
with
4 additions
and
6 deletions
src/components/app-sidebar.tsx
+
4
−
6
View file @
981625e6
import
*
as
React
from
'
react
'
;
import
{
Link
}
from
'
react-router
'
;
import
{
Link
,
useLocation
}
from
'
react-router
'
;
import
{
useAuthStore
}
from
'
@/stores/authStore
'
;
import
{
ArrowLeftRight
,
ShieldCheck
,
Server
,
TextSearch
,
CircleHelp
}
from
'
lucide-react
'
;
import
{
...
...
@@ -26,13 +26,11 @@ const data = {
icon
:
ArrowLeftRight
,
title
:
'
라우팅 설정
'
,
url
:
'
routing
'
,
isActive
:
true
,
},
{
icon
:
ShieldCheck
,
title
:
'
SSL 인증서
'
,
url
:
'
certificate
'
,
isActive
:
false
,
},
],
},
...
...
@@ -43,7 +41,6 @@ const data = {
icon
:
Server
,
title
:
'
SSH 설정
'
,
url
:
'
forwarding
'
,
isActive
:
false
,
},
],
},
...
...
@@ -54,7 +51,6 @@ const data = {
icon
:
TextSearch
,
title
:
'
설정 변경 내역
'
,
url
:
'
log
'
,
isActive
:
false
,
},
],
},
...
...
@@ -63,6 +59,8 @@ const data = {
export
function
AppSidebar
({
...
props
}:
React
.
ComponentProps
<
typeof
Sidebar
>
)
{
const
{
token
}
=
useAuthStore
();
const
location
=
useLocation
();
const
selected
=
location
.
pathname
.
split
(
'
/
'
)[
1
]
||
''
;
return
(
<
Sidebar
className
=
"top-(--header-height) h-[calc(100svh-var(--header-height))]!"
{
...
props
}
>
...
...
@@ -81,7 +79,7 @@ export function AppSidebar({ ...props }: React.ComponentProps<typeof Sidebar>) {
<
SidebarMenuItem
key
=
{
item
.
title
}
>
<
SidebarMenuButton
asChild
isActive
=
{
item
.
isActive
}
isActive
=
{
selected
===
item
.
url
}
className
=
{
token
?
''
:
'
cursor-not-allowed opacity-50
'
}
>
<
Link
to
=
{
item
.
url
}
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment