diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-02-28 21:47:44 +0000 |
---|---|---|
committer | Winnie Hellmann <winnie@gitlab.com> | 2018-03-22 10:48:17 +0100 |
commit | 07487628f4c900f4eb09e3cf11a525be0498bd58 (patch) | |
tree | a057cb4dcba0fa57966f4a98fe45cc92df1fdf90 /app/assets/javascripts/ide/components/new_dropdown | |
parent | 9b4b79fffe3b93c2479c31873073d6a7f93baf5a (diff) | |
download | gitlab-ce-07487628f4c900f4eb09e3cf11a525be0498bd58.tar.gz |
Rename modal.vue to deprecated_modal.vuewinh-deprecate-old-modal
Diffstat (limited to 'app/assets/javascripts/ide/components/new_dropdown')
-rw-r--r-- | app/assets/javascripts/ide/components/new_dropdown/modal.vue | 118 |
1 files changed, 59 insertions, 59 deletions
diff --git a/app/assets/javascripts/ide/components/new_dropdown/modal.vue b/app/assets/javascripts/ide/components/new_dropdown/modal.vue index 5723891d130..4b5a50785b6 100644 --- a/app/assets/javascripts/ide/components/new_dropdown/modal.vue +++ b/app/assets/javascripts/ide/components/new_dropdown/modal.vue @@ -1,75 +1,75 @@ <script> - import { __ } from '~/locale'; - import modal from '~/vue_shared/components/modal.vue'; +import { __ } from '~/locale'; +import DeprecatedModal from '~/vue_shared/components/deprecated_modal.vue'; - export default { - components: { - modal, +export default { + components: { + DeprecatedModal, + }, + props: { + branchId: { + type: String, + required: true, }, - props: { - branchId: { - type: String, - required: true, - }, - type: { - type: String, - required: true, - }, - path: { - type: String, - required: true, - }, + type: { + type: String, + required: true, }, - data() { - return { - entryName: this.path !== '' ? `${this.path}/` : '', - }; + path: { + type: String, + required: true, }, - computed: { - modalTitle() { - if (this.type === 'tree') { - return __('Create new directory'); - } + }, + data() { + return { + entryName: this.path !== '' ? `${this.path}/` : '', + }; + }, + computed: { + modalTitle() { + if (this.type === 'tree') { + return __('Create new directory'); + } - return __('Create new file'); - }, - buttonLabel() { - if (this.type === 'tree') { - return __('Create directory'); - } - - return __('Create file'); - }, - formLabelName() { - if (this.type === 'tree') { - return __('Directory name'); - } + return __('Create new file'); + }, + buttonLabel() { + if (this.type === 'tree') { + return __('Create directory'); + } - return __('File name'); - }, + return __('Create file'); }, - mounted() { - this.$refs.fieldName.focus(); + formLabelName() { + if (this.type === 'tree') { + return __('Directory name'); + } + + return __('File name'); }, - methods: { - createEntryInStore() { - this.$emit('create', { - branchId: this.branchId, - name: this.entryName, - type: this.type, - }); + }, + mounted() { + this.$refs.fieldName.focus(); + }, + methods: { + createEntryInStore() { + this.$emit('create', { + branchId: this.branchId, + name: this.entryName, + type: this.type, + }); - this.hideModal(); - }, - hideModal() { - this.$emit('hide'); - }, + this.hideModal(); + }, + hideModal() { + this.$emit('hide'); }, - }; + }, +}; </script> <template> - <modal + <deprecated-modal :title="modalTitle" :primary-button-label="buttonLabel" kind="success" @@ -95,5 +95,5 @@ </div> </fieldset> </form> - </modal> + </deprecated-modal> </template> |