mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 18:11:16 +01:00
remove open in new tab code
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user