diff options
author | Phil Hughes <me@iamphill.com> | 2018-04-03 11:10:01 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-04-04 09:20:55 +0100 |
commit | 259adc34155c2a23dfa482cc1d2664e80200dcc8 (patch) | |
tree | 7b8d178748702f6132b532b93daf34274b525f80 /app/assets/javascripts/ide | |
parent | c0dddb511c3bedc9b07df97739a27e07354b2242 (diff) | |
download | gitlab-ce-259adc34155c2a23dfa482cc1d2664e80200dcc8.tar.gz |
Updated components to PascalCase
Added comment for `key` usage
Diffstat (limited to 'app/assets/javascripts/ide')
4 files changed, 13 insertions, 10 deletions
diff --git a/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue b/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue index 9affc14a57c..560cdd941cd 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue @@ -1,10 +1,10 @@ <script> import { mapActions } from 'vuex'; -import icon from '~/vue_shared/components/icon.vue'; +import Icon from '~/vue_shared/components/icon.vue'; export default { components: { - icon, + Icon, }, props: { file: { diff --git a/app/assets/javascripts/ide/components/repo_editor.vue b/app/assets/javascripts/ide/components/repo_editor.vue index 0a61b49c950..b1a16350c19 100644 --- a/app/assets/javascripts/ide/components/repo_editor.vue +++ b/app/assets/javascripts/ide/components/repo_editor.vue @@ -21,6 +21,7 @@ export default { }, watch: { file(oldVal, newVal) { + // Compare key to allow for files opened in review mode to be cached differently if (newVal.key !== this.file.key) { this.initMonaco(); } diff --git a/app/assets/javascripts/ide/components/repo_tab.vue b/app/assets/javascripts/ide/components/repo_tab.vue index 6e65e55e1f6..304a73ed1ad 100644 --- a/app/assets/javascripts/ide/components/repo_tab.vue +++ b/app/assets/javascripts/ide/components/repo_tab.vue @@ -1,17 +1,17 @@ <script> import { mapActions } from 'vuex'; -import fileIcon from '~/vue_shared/components/file_icon.vue'; -import icon from '~/vue_shared/components/icon.vue'; -import fileStatusIcon from './repo_file_status_icon.vue'; -import changedFileIcon from './changed_file_icon.vue'; +import FileIcon from '~/vue_shared/components/file_icon.vue'; +import Icon from '~/vue_shared/components/icon.vue'; +import FileStatusIcon from './repo_file_status_icon.vue'; +import ChangedFileIcon from './changed_file_icon.vue'; export default { components: { - fileStatusIcon, - fileIcon, - icon, - changedFileIcon, + FileStatusIcon, + FileIcon, + Icon, + ChangedFileIcon, }, props: { tab: { diff --git a/app/assets/javascripts/ide/stores/utils.js b/app/assets/javascripts/ide/stores/utils.js index 3389eeeaa2e..63e4de3b17d 100644 --- a/app/assets/javascripts/ide/stores/utils.js +++ b/app/assets/javascripts/ide/stores/utils.js @@ -1,5 +1,7 @@ export const dataStructure = () => ({ id: '', + // Key will contain a mixture of ID and path + // it can also contain a prefix `pending-` for files opened in review mode key: '', type: '', projectId: '', |