Skip to content

Commit

Permalink
also hide the fav button
Browse files Browse the repository at this point in the history
  • Loading branch information
gantoine committed Feb 7, 2025
1 parent 0f8d511 commit 157907a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/common/Game/Card/Base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import storeCollections from "@/stores/collections";
import storeDownload from "@/stores/download";
import storeGalleryView from "@/stores/galleryView";
import storeRoms from "@/stores/roms";
import { type SimpleRom } from "@/stores/roms.js";
import { type SimpleRom } from "@/stores/roms";
import { computed } from "vue";
import { getMissingCoverImage, getUnmatchedCoverImage } from "@/utils/covers";
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/common/Game/Card/Flags.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup lang="ts">
import { computed } from "vue";
import { type SimpleRom } from "@/stores/roms.js";
import { type SimpleRom } from "@/stores/roms";
import {
languageToEmoji,
regionToEmoji,
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/components/common/Game/FavBtn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import collectionApi, {
} from "@/services/api/collection";
import storeCollections, { type Collection } from "@/stores/collections";
import storeRoms from "@/stores/roms";
import { type SimpleRom } from "@/stores/roms.js";
import { type SimpleRom } from "@/stores/roms";
import storeAuth from "@/stores/auth";
import type { Events } from "@/types/emitter";
import type { Emitter } from "mitt";
import { storeToRefs } from "pinia";
Expand All @@ -15,6 +16,7 @@ const props = defineProps<{ rom: SimpleRom }>();
const romsStore = storeRoms();
const collectionsStore = storeCollections();
const { favCollection } = storeToRefs(collectionsStore);
const auth = storeAuth();
const emitter = inject<Emitter<Events>>("emitter");
// Functions
Expand Down Expand Up @@ -85,6 +87,7 @@ async function switchFromFavourites() {

<template>
<v-btn
v-if="auth.scopes.includes('roms.user.write')"
@click.stop="switchFromFavourites"
class="translucent text-shadow"
rouded="0"
Expand Down

0 comments on commit 157907a

Please sign in to comment.