Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
netvs-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scc-net
netvs
netvs-core
Commits
7f8aee80
Commit
7f8aee80
authored
2 weeks ago
by
Johannes Klatt
Browse files
Options
Downloads
Patches
Plain Diff
UPD: mobile interface for nav sidebar
parent
99b99191
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#422178
passed with warnings
2 weeks ago
Stage: build
Stage: lint
Stage: e2e
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/components/NavSidebar.vue
+4
-1
4 additions, 1 deletion
src/components/NavSidebar.vue
src/components/NavSidebarButton.vue
+9
-0
9 additions, 0 deletions
src/components/NavSidebarButton.vue
src/components/TopBar.vue
+7
-0
7 additions, 0 deletions
src/components/TopBar.vue
with
20 additions
and
1 deletion
src/components/NavSidebar.vue
+
4
−
1
View file @
7f8aee80
<
script
setup
lang=
"ts"
>
import
{
useMediaQuery
}
from
'
@vueuse/core
'
const
navItems
=
[
{
title
:
'
Home
'
,
...
...
@@ -22,6 +24,7 @@ const navItems = [
active
:
false
,
},
]
const
isMobile
=
useMediaQuery
(
'
(max-width: 768px)
'
)
</
script
>
<
template
>
...
...
@@ -31,7 +34,7 @@ const navItems = [
<SidebarGroup>
<SidebarMenu>
<template
v-for=
"item in navItems"
:key=
"item.title"
>
<NavSidebarElement
v-if=
"!item.fromTop"
:title=
"item.title"
:url=
"item.url"
:icon=
"item.icon"
:active=
"item.active"
/>
<NavSidebarElement
v-if=
"!item.fromTop
|| isMobile
"
:title=
"item.title"
:url=
"item.url"
:icon=
"item.icon"
:active=
"item.active"
/>
</
template
>
</SidebarMenu>
</SidebarGroup>
...
...
This diff is collapsed.
Click to expand it.
src/components/NavSidebarButton.vue
0 → 100644
+
9
−
0
View file @
7f8aee80
<
template
>
<Button
variant=
"outline"
>
<Icon
icon=
"radix-icons:moon"
class=
"h-[1.2rem] w-[0.2rem]"
/>
<span
class=
"sr-only"
>
Toggle navigation sidebar
</span>
</Button>
</
template
>
This diff is collapsed.
Click to expand it.
src/components/TopBar.vue
+
7
−
0
View file @
7f8aee80
<
script
setup
lang=
"ts"
>
import
{
useMediaQuery
}
from
'
@vueuse/core
'
const
isMobile
=
useMediaQuery
(
'
(max-width: 768px)
'
)
</
script
>
<
template
>
<div
h-14
b-b
bg-background
>
<div
flex
gap-2
justify-center
p-2
>
<NavSidebarButton
v-if=
"isMobile"
/>
<GlobalSearch
/>
<UserNav
/>
<DarkModeToggle
/>
...
...
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