remove open in new tab code

This commit is contained in:
Georges-Antoine Assi
2024-09-01 09:57:56 -04:00
parent 57bb9e6ade
commit a3308fcac8

View File

@@ -11,7 +11,6 @@ import type { Events } from "@/types/emitter";
import type { Emitter } from "mitt";
import { storeToRefs } from "pinia";
import { inject } from "vue";
import { useRouter } from "vue-router";
// Props
const props = defineProps<{ rom: SimpleRom }>();
@@ -21,16 +20,6 @@ const auth = storeAuth();
const collectionsStore = storeCollections();
const romsStore = storeRoms();
const { favCollection } = storeToRefs(collectionsStore);
const router = useRouter();
// Functions
function openInNewTab() {
const link = router.resolve({
name: "rom",
params: { rom: props.rom.id },
});
window.open(link.href, "_blank");
}
async function switchFromFavourites() {
if (!favCollection.value) {
@@ -99,12 +88,6 @@ async function switchFromFavourites() {
<template>
<v-list rounded="0" class="pa-0">
<v-list-item class="py-4 pr-5" @click="openInNewTab()">
<v-list-item-title class="d-flex">
<v-icon icon="mdi-open-in-new" class="mr-2" />Open in a new tab
</v-list-item-title>
</v-list-item>
<v-divider />
<template v-if="auth.scopes.includes('roms.write')">
<v-list-item
:disabled="!heartbeat.value.ANY_SOURCE_ENABLED"