@@ -39,12 +39,35 @@ const doLoadDirContent = () => {
3939const doLoadFileContent = () => {
4040 props .loadContent (props .item );
4141};
42+
43+ const doGotoSubModule = () => {
44+ // TOTO: redirect to submodule
45+ };
4246 </script >
4347
4448<template >
4549 <!-- title instead of tooltip above as the tooltip needs too much work with the current methods, i.e. not being loaded or staying open for "too long"-->
4650 <div
47- v-if =" item.type !== 'tree'" class =" item-file"
51+ v-if =" item.type === 'commit'" class =" item-submodule"
52+ :title =" item.name"
53+ @click.stop =" doGotoSubModule"
54+ >
55+ <!-- submodule -->
56+ <SvgIcon class =" text primary" name =" octicon-file-submodule" />
57+ <span class =" gt-ellipsis tw-flex-1" >{{ item.name }}</span >
58+ </div >
59+ <div
60+ v-else-if =" item.type === 'symlink'" class =" item-symlink"
61+ :class =" {'selected': selectedItem.value === item.path}"
62+ :title =" item.name"
63+ @click.stop =" doLoadFileContent"
64+ >
65+ <!-- symlink -->
66+ <SvgIcon name =" octicon-file-symlink-file" />
67+ <span class =" gt-ellipsis tw-flex-1" >{{ item.name }}</span >
68+ </div >
69+ <div
70+ v-else-if =" item.type !== 'tree'" class =" item-file"
4871 :class =" {'selected': selectedItem.value === item.path}"
4972 :title =" item.name"
5073 @click.stop =" doLoadFileContent"
@@ -79,25 +102,27 @@ const doLoadFileContent = () => {
79102 border-left : 1px solid var (--color-secondary );
80103}
81104
82- .sub-items .item-file {
105+ .sub-items .item-file ,
106+ .sub-items .item-symlink ,
107+ .sub-items .item-submodule {
83108 padding-left : 18px ;
84109}
85110
86- .item-directory.selected , .item-file.selected {
111+ .item-directory.selected ,
112+ .item-symlink.selected ,
113+ .item-file.selected {
87114 color : var (--color-text );
88115 background : var (--color-active );
89116 border-radius : 4px ;
90117}
91118
92- .item-file.viewed {
93- color : var (--color-text-light-3 );
94- }
95-
96119.item-directory {
97120 user-select : none ;
98121}
99122
100123.item-file ,
124+ .item-symlink ,
125+ .item-submodule ,
101126.item-directory {
102127 display : flex ;
103128 align-items : center ;
@@ -106,6 +131,8 @@ const doLoadFileContent = () => {
106131}
107132
108133.item-file :hover ,
134+ .item-symlink :hover ,
135+ .item-submodule :hover ,
109136.item-directory :hover {
110137 color : var (--color-text );
111138 background : var (--color-hover );
0 commit comments