Skip to content

Commit c5b49c3

Browse files
authored
Merge pull request #152 from arduino/fix/hide-navigation-dots
Hide navigation dots (..) when navigation path is root.
2 parents 9f56d75 + 5eb412f commit c5b49c3

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

ui/arduino/views/components/file-list.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,18 @@ function generateFileList(source) {
104104
}
105105
return 0
106106
})
107+
const parentNavigationDots = html`<div class="item"
108+
onclick=${() => emit(`navigate-${source}-parent`)}
109+
style="cursor: pointer"
110+
>
111+
..
112+
</div>`
113+
107114
const list = html`
108115
<div class="file-list">
109116
<div class="list">
110-
<div class="item"
111-
onclick=${() => emit(`navigate-${source}-parent`)}
112-
style="cursor: pointer"
113-
>
114-
..
115-
</div>
117+
${source === 'disk' && state.diskNavigationPath != '/' ? parentNavigationDots : ''}
118+
${source === 'board' && state.boardNavigationPath != '/' ? parentNavigationDots : ''}
116119
${state.creatingFile == source ? newFileItem : null}
117120
${state.creatingFolder == source ? newFolderItem : null}
118121
${files.map(FileItem)}

0 commit comments

Comments
 (0)