Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dashboard
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
Container Registry
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AURA
dashboard
Commits
bfc365bf
Commit
bfc365bf
authored
1 year ago
by
Konrad Mohrfeldt
Browse files
Options
Downloads
Patches
Plain Diff
fix: rename Dialog component to ADialog
Using the same name as the native HTML dialog is a bad idea.
parent
7272ab6f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/generic/ADialog.vue
+8
-4
8 additions, 4 deletions
src/components/generic/ADialog.vue
src/components/images/ImagePickerDialog.vue
+3
-3
3 additions, 3 deletions
src/components/images/ImagePickerDialog.vue
with
11 additions
and
7 deletions
src/components/generic/Dialog.vue
→
src/components/generic/
A
Dialog.vue
+
8
−
4
View file @
bfc365bf
...
@@ -4,11 +4,13 @@
...
@@ -4,11 +4,13 @@
ref=
"dialogEl"
ref=
"dialogEl"
class=
"tw-shadow-xl tw-border tw-border-gray-200 tw-rounded tw-max-w-[95%] tw-p-0 tw-bg-white tw-z-30 tw-flex tw-flex-col"
class=
"tw-shadow-xl tw-border tw-border-gray-200 tw-rounded tw-max-w-[95%] tw-p-0 tw-bg-white tw-z-30 tw-flex tw-flex-col"
@
click=
"maybeClose"
@
click=
"maybeClose"
@
keydown.esc
=
"close"
@
close
=
"close"
>
>
<header
class=
"tw-flex tw-justify-between tw-p-4 flex-none"
>
<header
class=
"tw-flex tw-justify-between tw-p-4 flex-none"
>
<div>
<div>
<slot
name=
"header"
/>
<slot
name=
"header"
:title-class=
"titleClass"
>
<p
:class=
"titleClass"
>
{{
title
}}
</p>
</slot>
</div>
</div>
<button
<button
type=
"button"
type=
"button"
...
@@ -35,12 +37,16 @@
...
@@ -35,12 +37,16 @@
import
{
onClickOutside
}
from
'
@vueuse/core
'
import
{
onClickOutside
}
from
'
@vueuse/core
'
import
{
nextTick
,
ref
,
useSlots
,
watch
}
from
'
vue
'
import
{
nextTick
,
ref
,
useSlots
,
watch
}
from
'
vue
'
const
titleClass
=
'
tw-text-lg tw-font-semibold tw-m-0
'
const
props
=
withDefaults
(
const
props
=
withDefaults
(
defineProps
<
{
defineProps
<
{
modelValue
:
boolean
modelValue
:
boolean
isModal
?:
boolean
isModal
?:
boolean
title
?:
string
}
>
(),
}
>
(),
{
{
title
:
''
,
isModal
:
false
,
isModal
:
false
,
},
},
)
)
...
@@ -71,8 +77,6 @@ function maybeClose(event: MouseEvent) {
...
@@ -71,8 +77,6 @@ function maybeClose(event: MouseEvent) {
}
}
}
}
onClickOutside
(
dialogEl
,
close
)
watch
(
watch
(
()
=>
props
.
modelValue
,
()
=>
props
.
modelValue
,
async
(
isOpen
)
=>
{
async
(
isOpen
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
src/components/images/ImagePickerDialog.vue
+
3
−
3
View file @
bfc365bf
<
template
>
<
template
>
<Dialog
v-model=
"localIsOpen"
class=
"tw-w-screen lg:tw-w-[60vw] tw-max-w-[800px]"
is-modal
>
<
A
Dialog
v-model=
"localIsOpen"
is-modal
class=
"tw-w-screen lg:tw-w-[60vw] tw-max-w-[800px]"
>
<template
#header
>
<template
#header
>
<p
class=
"tw-text-lg tw-font-semibold tw-m-0"
>
{{
t
(
'
imagePicker.title
'
)
}}
</p>
<p
class=
"tw-text-lg tw-font-semibold tw-m-0"
>
{{
t
(
'
imagePicker.title
'
)
}}
</p>
</
template
>
</
template
>
...
@@ -60,7 +60,7 @@
...
@@ -60,7 +60,7 @@
</button>
</button>
</div>
</div>
</template>
</template>
</Dialog>
</
A
Dialog>
</template>
</template>
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
...
@@ -68,7 +68,7 @@ import { computed, ref } from 'vue'
...
@@ -68,7 +68,7 @@ import { computed, ref } from 'vue'
import
{
useI18n
}
from
'
@/i18n
'
import
{
useI18n
}
from
'
@/i18n
'
import
{
Image
,
NewImage
,
useImage
,
useImageStore
}
from
'
@/stores/images
'
import
{
Image
,
NewImage
,
useImage
,
useImageStore
}
from
'
@/stores/images
'
import
{
useAsyncFunction
,
useUpdatableState
}
from
'
@/util
'
import
{
useAsyncFunction
,
useUpdatableState
}
from
'
@/util
'
import
Dialog
from
'
../generic/Dialog.vue
'
import
A
Dialog
from
'
../generic/
A
Dialog.vue
'
import
ImageBrowser
from
'
./ImageBrowser.vue
'
import
ImageBrowser
from
'
./ImageBrowser.vue
'
import
ImageEditor
from
'
./ImageEditor.vue
'
import
ImageEditor
from
'
./ImageEditor.vue
'
import
ImageUploader
from
'
./ImageUploader.vue
'
import
ImageUploader
from
'
./ImageUploader.vue
'
...
...
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