Updated components to PascalCase
Added comment for `key` usage
This commit is contained in:
parent
c0dddb511c
commit
259adc3415
4 changed files with 13 additions and 10 deletions
|
@ -1,10 +1,10 @@
|
||||||
<script>
|
<script>
|
||||||
import { mapActions } from 'vuex';
|
import { mapActions } from 'vuex';
|
||||||
import icon from '~/vue_shared/components/icon.vue';
|
import Icon from '~/vue_shared/components/icon.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
icon,
|
Icon,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
file: {
|
file: {
|
||||||
|
|
|
@ -21,6 +21,7 @@ export default {
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
file(oldVal, newVal) {
|
file(oldVal, newVal) {
|
||||||
|
// Compare key to allow for files opened in review mode to be cached differently
|
||||||
if (newVal.key !== this.file.key) {
|
if (newVal.key !== this.file.key) {
|
||||||
this.initMonaco();
|
this.initMonaco();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
<script>
|
<script>
|
||||||
import { mapActions } from 'vuex';
|
import { mapActions } from 'vuex';
|
||||||
|
|
||||||
import fileIcon from '~/vue_shared/components/file_icon.vue';
|
import FileIcon from '~/vue_shared/components/file_icon.vue';
|
||||||
import icon from '~/vue_shared/components/icon.vue';
|
import Icon from '~/vue_shared/components/icon.vue';
|
||||||
import fileStatusIcon from './repo_file_status_icon.vue';
|
import FileStatusIcon from './repo_file_status_icon.vue';
|
||||||
import changedFileIcon from './changed_file_icon.vue';
|
import ChangedFileIcon from './changed_file_icon.vue';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
fileStatusIcon,
|
FileStatusIcon,
|
||||||
fileIcon,
|
FileIcon,
|
||||||
icon,
|
Icon,
|
||||||
changedFileIcon,
|
ChangedFileIcon,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
tab: {
|
tab: {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
export const dataStructure = () => ({
|
export const dataStructure = () => ({
|
||||||
id: '',
|
id: '',
|
||||||
|
// Key will contain a mixture of ID and path
|
||||||
|
// it can also contain a prefix `pending-` for files opened in review mode
|
||||||
key: '',
|
key: '',
|
||||||
type: '',
|
type: '',
|
||||||
projectId: '',
|
projectId: '',
|
||||||
|
|
Loading…
Reference in a new issue