Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
a076d1d8
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
a076d1d8
编写于
7月 09, 2019
作者:
P
Paul Gascou-Vaillancourt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Set unique modal IDs
上级
6e106f66
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
13 addition
and
15 deletion
+13
-15
app/assets/javascripts/registry/components/collapsible_container.vue
...javascripts/registry/components/collapsible_container.vue
+3
-7
app/assets/javascripts/registry/components/table_registry.vue
...assets/javascripts/registry/components/table_registry.vue
+3
-6
changelogs/unreleased/registry-fix-multi-delete-modal.yml
changelogs/unreleased/registry-fix-multi-delete-modal.yml
+5
-0
spec/javascripts/registry/components/collapsible_container_spec.js
...scripts/registry/components/collapsible_container_spec.js
+1
-1
spec/javascripts/registry/components/table_registry_spec.js
spec/javascripts/registry/components/table_registry_spec.js
+1
-1
未找到文件。
app/assets/javascripts/registry/components/collapsible_container.vue
浏览文件 @
a076d1d8
...
...
@@ -31,6 +31,7 @@ export default {
data
()
{
return
{
isOpen
:
false
,
modalId
:
`confirm-repo-deletion-modal-
${
this
.
repo
.
id
}
`
,
};
},
computed
:
{
...
...
@@ -80,7 +81,7 @@ export default {
<gl-button
v-if=
"repo.canDelete"
v-gl-tooltip
v-gl-modal=
"
'confirm-repo-deletion-modal'
"
v-gl-modal=
"
modalId
"
:title=
"s__('ContainerRegistry|Remove repository')"
:aria-label=
"s__('ContainerRegistry|Remove repository')"
class=
"js-remove-repo"
...
...
@@ -100,12 +101,7 @@ export default {
{{
s__
(
'
ContainerRegistry|No tags in Container Registry for this container image.
'
)
}}
</div>
</div>
<gl-modal
modal-id=
"confirm-repo-deletion-modal"
ok-variant=
"danger"
@
ok=
"handleDeleteRepository"
>
<gl-modal
:modal-id=
"modalId"
ok-variant=
"danger"
@
ok=
"handleDeleteRepository"
>
<template
v-slot:modal-title
>
{{
s__
(
'
ContainerRegistry|Remove repository
'
)
}}
</
template
>
<p
v-html=
"
...
...
app/assets/javascripts/registry/components/table_registry.vue
浏览文件 @
a076d1d8
...
...
@@ -32,6 +32,7 @@ export default {
data
()
{
return
{
itemToBeDeleted
:
null
,
modalId
:
`confirm-image-deletion-modal-
${
this
.
repo
.
id
}
`
,
};
},
computed
:
{
...
...
@@ -114,7 +115,7 @@ export default {
<gl-button
v-if=
"item.canDelete"
v-gl-tooltip
v-gl-modal=
"
'confirm-image-deletion-modal'
"
v-gl-modal=
"
modalId
"
:title=
"s__('ContainerRegistry|Remove image')"
:aria-label=
"s__('ContainerRegistry|Remove image')"
variant=
"danger"
...
...
@@ -134,11 +135,7 @@ export default {
:page-info=
"repo.pagination"
/>
<gl-modal
modal-id=
"confirm-image-deletion-modal"
ok-variant=
"danger"
@
ok=
"handleDeleteRegistry"
>
<gl-modal
:modal-id=
"modalId"
ok-variant=
"danger"
@
ok=
"handleDeleteRegistry"
>
<
template
v-slot:modal-title
>
{{
s__
(
'
ContainerRegistry|Remove image
'
)
}}
</
template
>
<
template
v-slot:modal-ok
>
{{
s__
(
'
ContainerRegistry|Remove image and tags
'
)
}}
</
template
>
<p
...
...
changelogs/unreleased/registry-fix-multi-delete-modal.yml
0 → 100644
浏览文件 @
a076d1d8
---
title
:
Prevent multiple confirmation modals from opening when deleting a repository
merge_request
:
30532
author
:
type
:
fixed
spec/javascripts/registry/components/collapsible_container_spec.js
浏览文件 @
a076d1d8
...
...
@@ -77,7 +77,7 @@ describe('collapsible registry container', () => {
spyOn
(
vm
,
'
deleteItem
'
).
and
.
returnValue
(
Promise
.
resolve
());
Vue
.
nextTick
(()
=>
{
document
.
querySelector
(
'
#confirm-repo-deletion-modal .btn-danger
'
).
click
();
document
.
querySelector
(
`#
${
vm
.
modalId
}
.btn-danger`
).
click
();
expect
(
vm
.
deleteItem
).
toHaveBeenCalledWith
(
vm
.
repo
);
done
();
...
...
spec/javascripts/registry/components/table_registry_spec.js
浏览文件 @
a076d1d8
...
...
@@ -51,7 +51,7 @@ describe('table registry', () => {
spyOn
(
vm
,
'
deleteItem
'
).
and
.
returnValue
(
Promise
.
resolve
());
Vue
.
nextTick
(()
=>
{
document
.
querySelector
(
'
#confirm-image-deletion-modal .btn-danger
'
).
click
();
document
.
querySelector
(
`#
${
vm
.
modalId
}
.btn-danger`
).
click
();
expect
(
vm
.
deleteItem
).
toHaveBeenCalledWith
(
firstImage
);
expect
(
vm
.
itemToBeDeleted
).
toBeNull
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录