Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-06-14 18:08:43 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-06-14 18:08:43 +0300
commit9b8269e5708ba1c38610189f84cf7224b640c0ed (patch)
tree70916a0afcfd90ed5425a80bab7f6bedca13d622 /app/assets/javascripts/ide
parent7a124e225ea58c2a432dd29f82ba682963886383 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/ide')
-rw-r--r--app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue21
-rw-r--r--app/assets/javascripts/ide/components/commit_sidebar/list.vue20
2 files changed, 34 insertions, 7 deletions
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue b/app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue
index 75f02af28c4..e5a8f5e79a0 100644
--- a/app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue
+++ b/app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue
@@ -18,6 +18,20 @@ export default {
required: true,
},
},
+ modal: {
+ actionPrimary: {
+ text: __('Discard changes'),
+ attributes: {
+ variant: 'danger',
+ },
+ },
+ actionCancel: {
+ text: __('Cancel'),
+ attributes: {
+ variant: 'default',
+ },
+ },
+ },
computed: {
discardModalId() {
return `discard-file-${this.activeFile.path}`;
@@ -66,12 +80,11 @@ export default {
</div>
<gl-modal
ref="discardModal"
- ok-variant="danger"
- cancel-variant="light"
- :ok-title="__('Discard changes')"
:modal-id="discardModalId"
:title="discardModalTitle"
- @ok="discardChanges(activeFile.path)"
+ :action-primary="$options.modal.actionPrimary"
+ :action-cancel="$options.modal.actionCancel"
+ @primary="discardChanges(activeFile.path)"
>
{{ __("You will lose all changes you've made to this file. This action cannot be undone.") }}
</gl-modal>
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/list.vue b/app/assets/javascripts/ide/components/commit_sidebar/list.vue
index 829686ef051..86b0666e7b0 100644
--- a/app/assets/javascripts/ide/components/commit_sidebar/list.vue
+++ b/app/assets/javascripts/ide/components/commit_sidebar/list.vue
@@ -38,6 +38,20 @@ export default {
default: __('No changes'),
},
},
+ modal: {
+ actionPrimary: {
+ text: __('Discard all changes'),
+ attributes: {
+ variant: 'danger',
+ },
+ },
+ actionCancel: {
+ text: __('Cancel'),
+ attributes: {
+ variant: 'default',
+ },
+ },
+ },
computed: {
titleText() {
if (!this.title) return __('Changes');
@@ -106,11 +120,11 @@ export default {
<gl-modal
v-if="!stagedList"
ref="discardAllModal"
- ok-variant="danger"
modal-id="discard-all-changes"
- :ok-title="__('Discard all changes')"
:title="__('Discard all changes?')"
- @ok="unstageAndDiscardAllChanges"
+ :action-primary="$options.modal.actionPrimary"
+ :action-cancel="$options.modal.actionCancel"
+ @primary="unstageAndDiscardAllChanges"
>
{{ $options.discardModalText }}
</gl-modal>