diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-03 12:09:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-03 12:09:31 +0300 |
commit | 04baa85554ff13bdd4d6f4e6bb24119d17608fee (patch) | |
tree | 7cb9c0977e09d97da340f48703d79b2dbd3579a0 /app/assets/javascripts/blob | |
parent | 42f41de46525ce0065f02ee07c1a79f5669526a0 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/blob')
5 files changed, 27 insertions, 29 deletions
diff --git a/app/assets/javascripts/blob/components/blob_edit_content.vue b/app/assets/javascripts/blob/components/blob_edit_content.vue index 83303a373f3..9a30ed93330 100644 --- a/app/assets/javascripts/blob/components/blob_edit_content.vue +++ b/app/assets/javascripts/blob/components/blob_edit_content.vue @@ -5,7 +5,8 @@ export default { props: { value: { type: String, - required: true, + required: false, + default: '', }, fileName: { type: String, @@ -15,7 +16,6 @@ export default { }, data() { return { - content: this.value, editor: null, }; }, @@ -28,14 +28,12 @@ export default { this.editor = initEditorLite({ el: this.$refs.editor, blobPath: this.fileName, - blobContent: this.content, + blobContent: this.value, }); }, methods: { triggerFileChange() { - const val = this.editor.getValue(); - this.content = val; - this.$emit('input', val); + this.$emit('input', this.editor.getValue()); }, }, }; @@ -43,7 +41,7 @@ export default { <template> <div class="file-content code"> <pre id="editor" ref="editor" data-editor-loading @focusout="triggerFileChange">{{ - content + value }}</pre> </div> </template> diff --git a/app/assets/javascripts/blob/components/blob_embeddable.vue b/app/assets/javascripts/blob/components/blob_embeddable.vue index 26bd0208309..00b915ec8bd 100644 --- a/app/assets/javascripts/blob/components/blob_embeddable.vue +++ b/app/assets/javascripts/blob/components/blob_embeddable.vue @@ -1,11 +1,11 @@ <script> -import { GlFormInputGroup, GlButton, GlIcon } from '@gitlab/ui'; +import { GlFormInputGroup, GlDeprecatedButton, GlIcon } from '@gitlab/ui'; import { __ } from '~/locale'; export default { components: { GlFormInputGroup, - GlButton, + GlDeprecatedButton, GlIcon, }, props: { @@ -33,9 +33,9 @@ export default { select-on-click > <template #append> - <gl-button new-style data-clipboard-target="#embeddable-text"> + <gl-deprecated-button new-style data-clipboard-target="#embeddable-text"> <gl-icon name="copy-to-clipboard" :title="__('Copy')" /> - </gl-button> + </gl-deprecated-button> </template> </gl-form-input-group> </template> diff --git a/app/assets/javascripts/blob/components/blob_header_default_actions.vue b/app/assets/javascripts/blob/components/blob_header_default_actions.vue index 6b38b871606..63ae70a37f4 100644 --- a/app/assets/javascripts/blob/components/blob_header_default_actions.vue +++ b/app/assets/javascripts/blob/components/blob_header_default_actions.vue @@ -1,5 +1,5 @@ <script> -import { GlButton, GlButtonGroup, GlIcon, GlTooltipDirective } from '@gitlab/ui'; +import { GlDeprecatedButton, GlButtonGroup, GlIcon, GlTooltipDirective } from '@gitlab/ui'; import { BTN_COPY_CONTENTS_TITLE, BTN_DOWNLOAD_TITLE, @@ -12,7 +12,7 @@ export default { components: { GlIcon, GlButtonGroup, - GlButton, + GlDeprecatedButton, }, directives: { GlTooltip: GlTooltipDirective, @@ -43,7 +43,7 @@ export default { </script> <template> <gl-button-group> - <gl-button + <gl-deprecated-button v-gl-tooltip.hover :aria-label="$options.BTN_COPY_CONTENTS_TITLE" :title="$options.BTN_COPY_CONTENTS_TITLE" @@ -51,8 +51,8 @@ export default { data-clipboard-target="#blob-code-content" > <gl-icon name="copy-to-clipboard" :size="14" /> - </gl-button> - <gl-button + </gl-deprecated-button> + <gl-deprecated-button v-gl-tooltip.hover :aria-label="$options.BTN_RAW_TITLE" :title="$options.BTN_RAW_TITLE" @@ -60,8 +60,8 @@ export default { target="_blank" > <gl-icon name="doc-code" :size="14" /> - </gl-button> - <gl-button + </gl-deprecated-button> + <gl-deprecated-button v-gl-tooltip.hover :aria-label="$options.BTN_DOWNLOAD_TITLE" :title="$options.BTN_DOWNLOAD_TITLE" @@ -69,6 +69,6 @@ export default { target="_blank" > <gl-icon name="download" :size="14" /> - </gl-button> + </gl-deprecated-button> </gl-button-group> </template> diff --git a/app/assets/javascripts/blob/components/blob_header_viewer_switcher.vue b/app/assets/javascripts/blob/components/blob_header_viewer_switcher.vue index 689fa7638f0..7155a1d35b1 100644 --- a/app/assets/javascripts/blob/components/blob_header_viewer_switcher.vue +++ b/app/assets/javascripts/blob/components/blob_header_viewer_switcher.vue @@ -1,5 +1,5 @@ <script> -import { GlButton, GlButtonGroup, GlIcon, GlTooltipDirective } from '@gitlab/ui'; +import { GlDeprecatedButton, GlButtonGroup, GlIcon, GlTooltipDirective } from '@gitlab/ui'; import { RICH_BLOB_VIEWER, RICH_BLOB_VIEWER_TITLE, @@ -11,7 +11,7 @@ export default { components: { GlIcon, GlButtonGroup, - GlButton, + GlDeprecatedButton, }, directives: { GlTooltip: GlTooltipDirective, @@ -46,7 +46,7 @@ export default { </script> <template> <gl-button-group class="js-blob-viewer-switcher ml-2"> - <gl-button + <gl-deprecated-button v-gl-tooltip.hover :aria-label="$options.SIMPLE_BLOB_VIEWER_TITLE" :title="$options.SIMPLE_BLOB_VIEWER_TITLE" @@ -55,8 +55,8 @@ export default { @click="switchToViewer($options.SIMPLE_BLOB_VIEWER)" > <gl-icon name="code" :size="14" /> - </gl-button> - <gl-button + </gl-deprecated-button> + <gl-deprecated-button v-gl-tooltip.hover :aria-label="$options.RICH_BLOB_VIEWER_TITLE" :title="$options.RICH_BLOB_VIEWER_TITLE" @@ -65,6 +65,6 @@ export default { @click="switchToViewer($options.RICH_BLOB_VIEWER)" > <gl-icon name="document" :size="14" /> - </gl-button> + </gl-deprecated-button> </gl-button-group> </template> diff --git a/app/assets/javascripts/blob/suggest_gitlab_ci_yml/components/popover.vue b/app/assets/javascripts/blob/suggest_gitlab_ci_yml/components/popover.vue index 7418ca9edfc..e191bfd79cb 100644 --- a/app/assets/javascripts/blob/suggest_gitlab_ci_yml/components/popover.vue +++ b/app/assets/javascripts/blob/suggest_gitlab_ci_yml/components/popover.vue @@ -1,5 +1,5 @@ <script> -import { GlPopover, GlSprintf, GlButton, GlIcon } from '@gitlab/ui'; +import { GlPopover, GlSprintf, GlDeprecatedButton, GlIcon } from '@gitlab/ui'; import { parseBoolean, scrollToElement, setCookie, getCookie } from '~/lib/utils/common_utils'; import { s__ } from '~/locale'; import { glEmojiTag } from '~/emoji'; @@ -27,7 +27,7 @@ export default { GlPopover, GlSprintf, GlIcon, - GlButton, + GlDeprecatedButton, }, mixins: [trackingMixin], props: { @@ -109,9 +109,9 @@ export default { <template #title> <span v-html="suggestTitle"></span> <span class="ml-auto"> - <gl-button :aria-label="__('Close')" class="btn-blank" @click="onDismiss"> + <gl-deprecated-button :aria-label="__('Close')" class="btn-blank" @click="onDismiss"> <gl-icon name="close" aria-hidden="true" /> - </gl-button> + </gl-deprecated-button> </span> </template> |