Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Website
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MDM Lab
Website
Commits
b25c8f72
Commit
b25c8f72
authored
1 year ago
by
Remi PLANEL
Browse files
Options
Downloads
Patches
Plain Diff
handle max/min width
parent
e7215e67
No related branches found
No related tags found
No related merge requests found
Pipeline
#118425
passed
1 year ago
Stage: delete-release
Stage: build
Stage: deploy
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
frontend/components/Main.vue
+12
-3
12 additions, 3 deletions
frontend/components/Main.vue
with
12 additions
and
3 deletions
frontend/components/Main.vue
+
12
−
3
View file @
b25c8f72
<
script
lang=
"ts"
setup
>
import
{
useDisplay
}
from
'
vuetify
'
const
{
mobile
,
width
}
=
useDisplay
()
export
interface
Props
{
fluid
?:
boolean
}
...
...
@@ -8,8 +10,14 @@ const props = withDefaults(defineProps<Props>(), {
});
const
sessionExpiryDate
=
useState
(
'
sessionExpiryDate
'
,
()
=>
"
testsetset
"
)
const
{
csrfToken
}
=
await
useCsrfToken
()
const
maxWidth
=
ref
(
1300
)
const
minWidth
=
ref
(
900
)
const
computedMinWidth
=
computed
(()
=>
{
if
(
toValue
(
mobile
))
return
undefined
if
(
toValue
(
width
)
-
270
>
toValue
(
maxWidth
))
return
toValue
(
maxWidth
)
if
(
toValue
(
width
)
-
270
>
toValue
(
minWidth
))
return
toValue
(
minWidth
)
return
undefined
})
watchEffect
(
async
()
=>
{
if
(
csrfToken
.
value
)
{
...
...
@@ -43,7 +51,8 @@ function onScroll() {
<v-container
v-scroll=
"onScroll"
:fluid=
"props.fluid"
>
<v-row
justify=
"center"
>
<v-col
cols=
"auto"
>
<v-card
flat
color=
"transparent"
:max-width=
"props.fluid ? undefined : 1280"
>
<v-card
flat
color=
"transparent"
:min-width=
"computedMinWidth"
:max-width=
"props.fluid ? undefined : maxWidth"
>
<slot
/>
</v-card>
</v-col>
...
...
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