Commit 566d6ac4 authored by Phil Hughes's avatar Phil Hughes

Added change icon to file in IDE file list

parent d7f74d4b
<script>
import icon from '../../vue_shared/components/icon.vue';
export default {
components: {
icon,
},
props: {
file: {
type: Object,
required: true,
},
},
computed: {
changedIcon() {
return this.file.tempFile ? 'file-addition' : 'file-modified';
},
changedIconClass() {
return `multi-file-changed-icon ${this.file.tempFile ? 'multi-file-addition' : 'multi-file-modified'}`;
},
},
};
</script>
<template>
<icon
:name="changedIcon"
:size="12"
:css-classes="changedIconClass"
/>
</template>
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
import fileStatusIcon from './repo_file_status_icon.vue'; import fileStatusIcon from './repo_file_status_icon.vue';
import newDropdown from './new_dropdown/index.vue'; import newDropdown from './new_dropdown/index.vue';
import fileIcon from '../../vue_shared/components/file_icon.vue'; import fileIcon from '../../vue_shared/components/file_icon.vue';
import changedFileIcon from './changed_file_icon.vue';
export default { export default {
components: { components: {
...@@ -12,6 +13,7 @@ ...@@ -12,6 +13,7 @@
newDropdown, newDropdown,
fileStatusIcon, fileStatusIcon,
fileIcon, fileIcon,
changedFileIcon,
}, },
mixins: [ mixins: [
timeAgoMixin, timeAgoMixin,
...@@ -61,11 +63,6 @@ ...@@ -61,11 +63,6 @@
} }
return ''; return '';
}, },
changedClass() {
return {
'fa-circle unsaved-icon': this.file.changed || this.file.tempFile,
};
},
}, },
updated() { updated() {
if (this.file.type === 'blob' && this.file.active) { if (this.file.type === 'blob' && this.file.active) {
...@@ -118,13 +115,11 @@ ...@@ -118,13 +115,11 @@
:path="file.path" :path="file.path"
:parent="file" :parent="file"
/> />
<i <changed-file-icon
class="fa"
v-if="file.changed || file.tempFile" v-if="file.changed || file.tempFile"
:class="changedClass" :file="file"
aria-hidden="true" class="prepend-top-5 pull-right"
> />
</i>
<template v-if="isSubmodule && file.id"> <template v-if="isSubmodule && file.id">
@ @
<span class="commit-sha"> <span class="commit-sha">
......
...@@ -3,12 +3,14 @@ ...@@ -3,12 +3,14 @@
import fileStatusIcon from './repo_file_status_icon.vue'; import fileStatusIcon from './repo_file_status_icon.vue';
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 changedFileIcon from './changed_file_icon.vue';
export default { export default {
components: { components: {
fileStatusIcon, fileStatusIcon,
fileIcon, fileIcon,
icon, icon,
changedFileIcon,
}, },
props: { props: {
tab: { tab: {
...@@ -31,12 +33,6 @@ ...@@ -31,12 +33,6 @@
showChangedIcon() { showChangedIcon() {
return this.tab.changed ? !this.tabMouseOver : false; return this.tab.changed ? !this.tabMouseOver : false;
}, },
changedIcon() {
return this.tab.tempFile ? 'file-addition' : 'file-modified';
},
changedIconClass() {
return this.tab.tempFile ? 'multi-file-addition' : 'multi-file-modified';
},
}, },
methods: { methods: {
...@@ -77,11 +73,9 @@ ...@@ -77,11 +73,9 @@
name="close" name="close"
:size="12" :size="12"
/> />
<icon <changed-file-icon
v-else v-else
:name="changedIcon" :file="tab"
:size="12"
:css-classes="changedIconClass"
/> />
</button> </button>
......
...@@ -50,13 +50,6 @@ ...@@ -50,13 +50,6 @@
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.unsaved-icon {
color: $indigo-700;
float: right;
font-size: smaller;
line-height: 20px;
}
.repo-new-btn { .repo-new-btn {
display: none; display: none;
margin-top: -4px; margin-top: -4px;
...@@ -67,10 +60,6 @@ ...@@ -67,10 +60,6 @@
.repo-new-btn { .repo-new-btn {
display: block; display: block;
} }
.unsaved-icon {
display: none;
}
} }
&.folder { &.folder {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment