Skip to content

Commit

Permalink
Added highlight on FileTree for files loaded in editors
Browse files Browse the repository at this point in the history
  • Loading branch information
Lorthiz committed Oct 20, 2024
1 parent 19d11aa commit cefcea7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Components/FileTree/FileTreeNode.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ const isSelected = computed(() => {
return store.selectedPath === props.item.fullPathWithStore;
});
const nodeFileIsLoadedInEditor = computed(() => {
return appStore.selectedBinaryInfo.toString() === props.item.fullPathWithStore
|| appStore.selectedKsyInfo.toString() === props.item.fullPathWithStore
})
</script>

Expand All @@ -62,7 +66,7 @@ const isSelected = computed(() => {
@click="activateRow"
@dblclick="doubleClick"
@contextmenu="contextMenu">
<div class="row-content" :style="{marginLeft: item.depth * 16 + 'px'}">
<div class="row-content" :class="{isLoaded:nodeFileIsLoadedInEditor}" :style="{marginLeft: item.depth * 16 + 'px'}">
<FileStoreTreeNodeIcon :type="item.type"/>
<span class="row-description">{{ item.fileName }}</span>
</div>
Expand Down Expand Up @@ -102,6 +106,11 @@ const isSelected = computed(() => {
color: white;
}
.isLoaded {
font-weight: bold;
color: white;
}
@keyframes unshrink {
0% {
height: 0;
Expand Down

0 comments on commit cefcea7

Please sign in to comment.