diff options
author | Phil Hughes <me@iamphill.com> | 2019-02-14 09:22:17 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2019-02-14 09:22:17 +0000 |
commit | 4b2ba1a70e72d3e53a696d7c8c0ca0cedf0f95a7 (patch) | |
tree | ff5f7b11955a89c1eef97f6deb6b90c88bdd1c1c /app | |
parent | c06ebe511700f25a61b4dfaa518fbed7667c6876 (diff) | |
parent | b82b1667c4de0ee05840c1053b2349ac351040e6 (diff) | |
download | gitlab-ce-4b2ba1a70e72d3e53a696d7c8c0ca0cedf0f95a7.tar.gz |
Merge branch '57544-web-ide-new-directory-dialog-shows-file-templates' into 'master'
Resolve "Web IDE new directory dialog shows file templates"
Closes #57544
See merge request gitlab-org/gitlab-ce!25119
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/javascripts/ide/components/new_dropdown/modal.vue | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/app/assets/javascripts/ide/components/new_dropdown/modal.vue b/app/assets/javascripts/ide/components/new_dropdown/modal.vue index 04ecd4ba4e7..c9c4e9e86f8 100644 --- a/app/assets/javascripts/ide/components/new_dropdown/modal.vue +++ b/app/assets/javascripts/ide/components/new_dropdown/modal.vue @@ -51,8 +51,11 @@ export default { return __('Create file'); }, - isCreatingNew() { - return this.entryModal.type !== modalTypes.rename; + isCreatingNewFile() { + return this.entryModal.type === 'blob'; + }, + placeholder() { + return this.isCreatingNewFile ? 'dir/file_name' : 'dir/'; }, }, methods: { @@ -107,9 +110,12 @@ export default { v-model="entryName" type="text" class="form-control qa-full-file-path" - placeholder="/dir/file_name" + :placeholder="placeholder" /> - <ul v-if="isCreatingNew" class="prepend-top-default list-inline qa-template-list"> + <ul + v-if="isCreatingNewFile" + class="file-templates prepend-top-default list-inline qa-template-list" + > <li v-for="(template, index) in templateTypes" :key="index" class="list-inline-item"> <button type="button" |