summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/ide/components/new_dropdown/modal.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/ide/components/new_dropdown/modal.vue')
-rw-r--r--app/assets/javascripts/ide/components/new_dropdown/modal.vue118
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>