Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
U
ui
Manage
Activity
Members
Labels
Plan
Issues
10
Issue boards
Milestones
Wiki
Code
Merge requests
12
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
Service Desk
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
funkwhale
ui
Commits
89b9d832
Commit
89b9d832
authored
1 year ago
by
Kasper Seweryn
🥞
Browse files
Options
Downloads
Patches
Plain Diff
feat: add max modal height
Part-of: <
!95
>
parent
0dd3a038
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!95
add max modal width and height
Pipeline
#34020
passed with stages
in 1 minute and 41 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/modal/Modal.vue
+8
-8
8 additions, 8 deletions
src/components/modal/Modal.vue
src/components/modal/style.scss
+29
-19
29 additions, 19 deletions
src/components/modal/style.scss
with
37 additions
and
27 deletions
src/components/modal/Modal.vue
+
8
−
8
View file @
89b9d832
...
...
@@ -7,21 +7,21 @@ const open = defineModel<boolean>({ required: true })
<Teleport
to=
"body"
>
<Transition
mode=
"out-in"
>
<div
v-if=
"open"
@
click.exact.stop=
"open = false"
class=
"funkwhale overlay"
>
<div
@
click.stop
class=
"funkwhale modal"
>
<div
@
click.stop
class=
"funkwhale modal"
:class=
"$slots.alert && 'has-alert'"
>
<h2>
{{
title
}}
<FwButton
icon=
"bi-x-lg"
color=
"secondary"
variant=
"ghost"
@
click=
"open = false"
/>
</h2>
<Transition>
<div
v-if=
"$slots.alert"
class=
"alert-container"
>
<div>
<slot
name=
"alert"
/>
<div
class=
"modal-content"
>
<Transition>
<div
v-if=
"$slots.alert"
class=
"alert-container"
>
<div>
<slot
name=
"alert"
/>
</div>
</div>
</div>
</Transition>
</Transition>
<div
class=
"modal-content"
>
<slot
/>
</div>
<div
v-if=
"$slots.actions"
class=
"modal-actions"
>
...
...
This diff is collapsed.
Click to expand it.
src/components/modal/style.scss
+
29
−
19
View file @
89b9d832
...
...
@@ -6,24 +6,9 @@
max-width
:
min
(
90vw
,
40rem
);
width
:
100%
;
>
.alert-container
{
display
:
grid
;
grid-template-rows
:
1fr
;
&
.v-enter-active
,
&
.v-leave-active
{
transition
:
grid-template-rows
0
.2s
ease
;
}
&
.v-enter-from
,
&
.v-leave-to
{
grid-template-rows
:
0fr
;
}
>
div
{
overflow
:
hidden
;
}
}
display
:
grid
;
max-height
:
90vh
;
grid-template-rows
:
auto
1fr
auto
;
>
h2
{
font-size
:
1
.25em
;
...
...
@@ -42,7 +27,32 @@
}
.modal-content
{
padding
:
1rem
2rem
1rem
;
padding
:
1rem
2rem
;
overflow
:
auto
;
position
:
relative
;
>
.alert-container
{
position
:
sticky
;
top
:
-1rem
;
margin
:
-1rem
-2rem
1rem
;
display
:
grid
;
grid-template-rows
:
1fr
;
&
.v-enter-active
,
&
.v-leave-active
{
transition
:
grid-template-rows
0
.2s
ease
;
}
&
.v-enter-from
,
&
.v-leave-to
{
grid-template-rows
:
0fr
;
}
>
div
{
overflow
:
hidden
;
}
}
}
.modal-actions
{
...
...
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