mirror of
https://github.com/rommapp/romm.git
synced 2026-12-04 21:02:21 +01:00
small tweaks to ui
This commit is contained in:
@@ -325,6 +325,7 @@ async def update_rom(
|
||||
"name": rom.file_name,
|
||||
"summary": "",
|
||||
"url_screenshots": [],
|
||||
"path_screenshots": [],
|
||||
"path_cover_s": "",
|
||||
"path_cover_l": "",
|
||||
"url_cover": "",
|
||||
|
||||
@@ -6,7 +6,7 @@ import storeHeartbeat from "@/stores/heartbeat";
|
||||
import storeRoms, { type SimpleRom } from "@/stores/roms";
|
||||
import type { Events } from "@/types/emitter";
|
||||
import type { Emitter } from "mitt";
|
||||
import { inject, ref } from "vue";
|
||||
import { inject, ref, computed } from "vue";
|
||||
import { useRoute } from "vue-router";
|
||||
import { useDisplay, useTheme } from "vuetify";
|
||||
|
||||
@@ -55,6 +55,10 @@ async function removeArtwork() {
|
||||
removeCover.value = true;
|
||||
}
|
||||
|
||||
const noMetadataMatch = computed(() => {
|
||||
return !rom.value.igdb_id && !rom.value.moby_id && !rom.value.sgdb_id;
|
||||
});
|
||||
|
||||
async function handleRomUpdate(options, successMessage) {
|
||||
if (!rom.value) return;
|
||||
|
||||
@@ -178,10 +182,28 @@ function closeDialog() {
|
||||
variant="outlined"
|
||||
required
|
||||
hide-details
|
||||
@keyup.enter="updateRom()"
|
||||
@keyup.enter="updateRom"
|
||||
/>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<v-row class="justify-space-between mt-4 mb-2 mx-2" no-gutters>
|
||||
<v-btn-group divided density="compact">
|
||||
<v-btn
|
||||
:disabled="noMetadataMatch"
|
||||
:class="` ${noMetadataMatch ? '' : 'bg-terciary text-romm-red'}`"
|
||||
variant="flat"
|
||||
@click="unmatchRom"
|
||||
>
|
||||
Unmatch Rom
|
||||
</v-btn>
|
||||
</v-btn-group>
|
||||
<v-btn-group divided density="compact">
|
||||
<v-btn class="bg-terciary" @click="closeDialog"> Cancel </v-btn>
|
||||
<v-btn class="text-romm-green bg-terciary" @click="updateRom">
|
||||
Save
|
||||
</v-btn>
|
||||
</v-btn-group>
|
||||
</v-row>
|
||||
</v-col>
|
||||
<v-col>
|
||||
<v-row class="pa-2 justify-center" no-gutters>
|
||||
@@ -236,24 +258,6 @@ function closeDialog() {
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
<template #append>
|
||||
<v-row class="justify-center mt-4 mb-2" no-gutters>
|
||||
<v-btn-group divided density="compact">
|
||||
<v-btn
|
||||
:disabled="!rom.igdb_id && !rom.moby_id && !rom.sgdb_id"
|
||||
class="text-romm-red bg-terciary"
|
||||
variant="flat"
|
||||
@click="() => unmatchRom()"
|
||||
>
|
||||
Unmatch Rom
|
||||
</v-btn>
|
||||
<v-btn class="bg-terciary" @click="closeDialog"> Cancel </v-btn>
|
||||
<v-btn class="text-romm-green bg-terciary" @click="updateRom">
|
||||
Apply
|
||||
</v-btn>
|
||||
</v-btn-group>
|
||||
</v-row>
|
||||
</template>
|
||||
</r-dialog>
|
||||
</template>
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user