aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/components/DiffFileTreeItem.vue
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/components/DiffFileTreeItem.vue')
-rw-r--r--web_src/js/components/DiffFileTreeItem.vue10
1 files changed, 9 insertions, 1 deletions
diff --git a/web_src/js/components/DiffFileTreeItem.vue b/web_src/js/components/DiffFileTreeItem.vue
index 12cafd8f1b..31ce94aacd 100644
--- a/web_src/js/components/DiffFileTreeItem.vue
+++ b/web_src/js/components/DiffFileTreeItem.vue
@@ -8,6 +8,7 @@ type File = {
NameHash: string;
Type: number;
IsViewed: boolean;
+ IsSubmodule: boolean;
}
type Item = {
@@ -34,6 +35,13 @@ function getIconForDiffType(pType) {
};
return diffTypes[pType];
}
+
+function fileIcon(file) {
+ if (file.IsSubmodule) {
+ return 'octicon-file-submodule';
+ }
+ return 'octicon-file';
+}
</script>
<template>
@@ -44,7 +52,7 @@ function getIconForDiffType(pType) {
:title="item.name" :href="'#diff-' + item.file.NameHash"
>
<!-- file -->
- <SvgIcon name="octicon-file"/>
+ <SvgIcon :name="fileIcon(item.file)"/>
<span class="gt-ellipsis tw-flex-1">{{ item.name }}</span>
<SvgIcon :name="getIconForDiffType(item.file.Type).name" :class="getIconForDiffType(item.file.Type).classes"/>
</a>