diff --git a/app/components/App/Tab.vue b/app/components/App/Tab.vue index ff673cb..6902a7a 100644 --- a/app/components/App/Tab.vue +++ b/app/components/App/Tab.vue @@ -48,9 +48,9 @@ function openDeleteTabModal(tab: TabType) { deleteTabModal.value = true } -function visitLink() { +function visitLink(clickType: 'self' | 'extern') { if (!props.editMode) { - window.open(props.tab.link, '_blank') + window.open(props.tab.link, clickType === 'self' ? '_self' : '_blank') // todo: add view count } } @@ -63,7 +63,10 @@ function visitLink() { background: `h-full duration-300 bg-white dark:bg-gray-900 ${editMode ? '' : 'hover:bg-gray-100 dark:hover:bg-gray-800'}`, }" :class="editMode ? 'animate-wiggle' : 'cursor-pointer'" - @click.prevent="visitLink" + @click.left="visitLink('self')" + @click.right="visitLink('extern')" + @click.prevent="visitLink('self')" + @click.middle="visitLink('extern')" >