Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5082b8d8
Commit
5082b8d8
authored
Jan 10, 2018
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move modal dialog to app root component
parent
b10ea6e3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
55 deletions
+31
-55
app/assets/javascripts/groups/components/item_actions.vue
app/assets/javascripts/groups/components/item_actions.vue
+31
-55
No files found.
app/assets/javascripts/groups/components/item_actions.vue
View file @
5082b8d8
<
script
>
import
{
s__
}
from
'
~/locale
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
import
modal
from
'
~/vue_shared/components/modal.vue
'
;
import
eventHub
from
'
../event_hub
'
;
import
{
COMMON_STR
}
from
'
../constants
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
import
eventHub
from
'
../event_hub
'
;
import
{
COMMON_STR
}
from
'
../constants
'
;
export
default
{
export
default
{
components
:
{
icon
,
modal
,
},
directives
:
{
tooltip
,
...
...
@@ -25,11 +22,6 @@
required
:
true
,
},
},
data
()
{
return
{
modalStatus
:
false
,
};
},
computed
:
{
leaveBtnTitle
()
{
return
COMMON_STR
.
LEAVE_BTN_TITLE
;
...
...
@@ -37,20 +29,13 @@
editBtnTitle
()
{
return
COMMON_STR
.
EDIT_BTN_TITLE
;
},
leaveConfirmationMessage
()
{
return
s__
(
`GroupsTree|Are you sure you want to leave the "
${
this
.
group
.
fullName
}
" group?`
);
},
},
methods
:
{
onLeaveGroup
()
{
this
.
modalStatus
=
true
;
},
leaveGroup
()
{
this
.
modalStatus
=
false
;
eventHub
.
$emit
(
'
leaveGroup
'
,
this
.
group
,
this
.
parentGroup
);
eventHub
.
$emit
(
'
showLeaveGroupModal
'
,
this
.
group
,
this
.
parentGroup
);
},
},
};
};
</
script
>
<
template
>
...
...
@@ -78,14 +63,5 @@
class=
"leave-group btn no-expand"
>
<icon
name=
"leave"
/>
</a>
<modal
v-show=
"modalStatus"
:primary-button-label=
"__('Leave')"
kind=
"warning"
:title=
"__('Are you sure?')"
:text=
"__('Are you sure you want to leave this group?')"
:body=
"leaveConfirmationMessage"
@
submit=
"leaveGroup"
/>
</div>
</
template
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment