Skip to content

Commit 9915581

Browse files
committed
add sub module aux click support
1 parent 9c4a8e2 commit 9915581

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

web_src/js/components/ViewFileTreeItem.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,12 @@ const doLoadFileContent = (event: MouseEvent) => {
4949
props.navigateViewContent(props.item.fullPath, openNewTab);
5050
};
5151
52-
const doGotoSubModule = () => {
52+
const doGotoSubModule = (event: MouseEvent) => {
53+
const openNewTab = event.button === 1 || event.ctrlKey || event.metaKey;
54+
if (openNewTab) {
55+
window.open(props.item.submoduleUrl, '_blank');
56+
return;
57+
}
5358
location.href = props.item.submoduleUrl;
5459
};
5560
</script>
@@ -60,6 +65,7 @@ const doGotoSubModule = () => {
6065
v-if="item.entryMode === 'commit'" class="tree-item type-submodule"
6166
:title="item.entryName"
6267
@click.stop="doGotoSubModule"
68+
@click.middle.stop="doGotoSubModule"
6369
>
6470
<!-- submodule -->
6571
<div class="item-content">

0 commit comments

Comments
 (0)