mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 18:42:34 +01:00
fix(v2): review-polish pass on pinned media
Put the unpinned pin on the overlay scrim so it reads over artwork, and trim the header comments this PR touches to two lines. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
// ArtworkSubtab: the Media tab's Artwork panel. A gallery of every art asset
|
||||
// that doesn't already get its own surface (screenshots have their own
|
||||
// subtab, manual + soundtrack their own subtabs). Surfaces the cover,
|
||||
// bezel / logo / marquee / box art / fan art / mix images / title screen plus
|
||||
// the scraped videos, and any image/video files sitting in the game folder
|
||||
// in the library. Each can be pinned to the Overview tab.
|
||||
// ArtworkSubtab: the Media tab's Artwork panel, every art asset and video
|
||||
// without a subtab of its own, each pinnable to the Overview tab.
|
||||
import { REmptyState } from "@v2/lib";
|
||||
import { computed } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
@@ -19,9 +19,18 @@ const label = computed(() =>
|
||||
size="small"
|
||||
variant="flat"
|
||||
:color="pinned ? 'primary' : undefined"
|
||||
:class="{ 'r-v2-media-pin--idle': !pinned }"
|
||||
:aria-pressed="pinned"
|
||||
:aria-label="label"
|
||||
:tooltip="label"
|
||||
@click="emit('toggle')"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
/* Sits on artwork, so it needs the fixed overlay scrim to stay legible. */
|
||||
.r-btn.r-v2-media-pin--idle {
|
||||
background: var(--r-color-overlay-scrim-strong);
|
||||
color: var(--r-color-overlay-fg);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// usePinnedMedia: read and toggle what the Overview tab shows for one ROM.
|
||||
// Writes are optimistic and chained per ROM across every caller, so rapid
|
||||
// toggles reach the server in click order and the last one wins.
|
||||
// usePinnedMedia: what the Overview tab shows for one ROM. Writes are
|
||||
// optimistic and chained per ROM, so toggles land in click order.
|
||||
import { computed, toValue, type MaybeRefOrGetter } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
import romApi from "@/services/api/rom";
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// Stable keys for every piece of media a ROM page can show, persisted in
|
||||
// `rom_user.pinned_media`. Kept in sync with the backend's
|
||||
// PINNED_MEDIA_KEY_PATTERN.
|
||||
// Stable media keys persisted in `rom_user.pinned_media`. Keep in sync with
|
||||
// PINNED_MEDIA_KEY_PATTERN in backend/models/rom.py.
|
||||
export const mediaKey = {
|
||||
scraped: (url: string) => `scraped:${url}`,
|
||||
file: (id: number) => `file:${id}`,
|
||||
|
||||
Reference in New Issue
Block a user