Merge pull request #1945 from rommapp/romm-1943

[ROMM-1943] Consistent use of click handlers
This commit is contained in:
Georges-Antoine Assi
2025-06-07 17:59:33 -04:00
committed by GitHub
38 changed files with 51 additions and 52 deletions

View File

@@ -144,7 +144,7 @@ async function updateCollection() {
<v-row no-gutters class="justify-center align-center pa-2">
<v-col style="max-width: 240px" cols="12">
<div class="text-center justify-center align-center">
<div class="position-absolute append-top-right">
<div class="position-absolute append-top-right mr-5">
<template
v-if="
currentCollection.user__username === auth.user?.username &&
@@ -173,7 +173,7 @@ async function updateCollection() {
><v-icon color="romm-red">mdi-close</v-icon></v-btn
>
<v-btn
@click="updateCollection()"
@click="updateCollection"
size="small"
class="bg-toplayer ml-1"
><v-icon color="romm-green">mdi-check</v-icon></v-btn
@@ -271,7 +271,7 @@ async function updateCollection() {
required
density="compact"
hide-details
@keyup.enter="updateCollection()"
@keyup.enter="updateCollection"
/>
<v-text-field
class="mt-4"
@@ -281,7 +281,7 @@ async function updateCollection() {
required
density="compact"
hide-details
@keyup.enter="updateCollection()"
@keyup.enter="updateCollection"
/>
<v-switch
class="mt-2"

View File

@@ -24,7 +24,7 @@ const { activePlatformInfoDrawer } = storeToRefs(navigationStore);
rounded="0"
icon="mdi-cog"
:color="activePlatformInfoDrawer ? 'primary' : ''"
@click="navigationStore.switchActivePlatformInfoDrawer()"
@click="navigationStore.switchActivePlatformInfoDrawer"
>
<platform-icon
:slug="currentPlatform.slug"

View File

@@ -26,7 +26,7 @@ const { activeFirmwareDrawer } = storeToRefs(galleryViewStore);
icon="mdi-memory"
:color="activeFirmwareDrawer ? 'primary' : ''"
aria-label="Firmwares"
@click="galleryViewStore.switchActiveFirmwareDrawer()"
@click="galleryViewStore.switchActiveFirmwareDrawer"
/>
</template>
</v-tooltip>

View File

@@ -201,7 +201,7 @@ watch(
<v-row no-gutters class="justify-center align-center pa-2">
<v-col cols="12">
<div class="text-center justify-center align-center">
<div class="position-absolute append-top-right">
<div class="position-absolute append-top-right mr-5">
<template v-if="auth.scopes.includes('platforms.write')">
<v-btn
v-if="!isEditable"
@@ -230,7 +230,7 @@ watch(
><v-icon color="romm-red">mdi-close</v-icon></v-btn
>
<v-btn
@click="updatePlatform()"
@click="updatePlatform"
size="small"
class="bg-toplayer ml-1"
:tabindex="tabIndex"
@@ -263,7 +263,7 @@ watch(
density="compact"
v-model="updatedPlatform.display_name"
:readonly="!isEditable"
@keyup.enter="updatePlatform()"
@keyup.enter="updatePlatform"
:tabindex="tabIndex"
/>
</div>

View File

@@ -32,6 +32,6 @@ const { activeFilterDrawer } = storeToRefs(galleryFilterStore);
: ''
"
aria-label="Filter"
@click="galleryFilterStore.switchActiveFilterDrawer()" /></template
@click="galleryFilterStore.switchActiveFilterDrawer" /></template
></v-tooltip>
</template>

View File

@@ -25,7 +25,7 @@ function setDuplicates() {
block
variant="tonal"
:color="filterDuplicates ? 'primary' : ''"
@click="setDuplicates()"
@click="setDuplicates"
:disabled="fetchTotalRoms > 10000"
>
<v-icon :color="filterDuplicates ? 'primary' : ''">

View File

@@ -22,7 +22,7 @@ function setFavourites() {
block
variant="tonal"
:color="filterFavourites ? 'primary' : ''"
@click="setFavourites()"
@click="setFavourites"
>
<v-icon :color="filterFavourites ? 'primary' : ''">mdi-star</v-icon
><span

View File

@@ -22,7 +22,7 @@ function setUnmatched() {
block
variant="tonal"
:color="filterMatched ? 'primary' : ''"
@click="setUnmatched()"
@click="setUnmatched"
>
<v-icon :color="filterMatched ? 'primary' : ''">mdi-file-find</v-icon
><span

View File

@@ -27,7 +27,7 @@ function setPlayables() {
block
variant="tonal"
:color="filterPlayables ? 'primary' : ''"
@click="setPlayables()"
@click="setPlayables"
:disabled="fetchTotalRoms > 10000"
>
<v-icon :color="filterPlayables ? 'primary' : ''"> mdi-play </v-icon>

View File

@@ -27,7 +27,7 @@ function setRA() {
block
variant="tonal"
:color="filterRA ? 'primary' : ''"
@click="setRA()"
@click="setRA"
:disabled="fetchTotalRoms > 10000"
>
<v-icon :color="filterRA ? 'primary' : ''"> mdi-trophy </v-icon>

View File

@@ -22,7 +22,7 @@ function setUnmatched() {
block
variant="tonal"
:color="filterUnmatched ? 'primary' : ''"
@click="setUnmatched()"
@click="setUnmatched"
>
<v-icon :color="filterUnmatched ? 'primary' : ''"
>mdi-file-find-outline</v-icon

View File

@@ -24,6 +24,6 @@ const galleryView = storeGalleryView();
class="mr-0"
:icon="views[galleryView.currentView]['icon']"
aria-label="Change view"
@click="galleryView.next()" /></template
@click="galleryView.next" /></template
></v-tooltip>
</template>

View File

@@ -24,6 +24,6 @@ const romsStore = storeRoms();
class="mr-0"
icon="mdi-select-group"
aria-label="Multi select"
@click="romsStore.setSelecting()" /></template
@click="romsStore.setSelecting" /></template
></v-tooltip>
</template>

View File

@@ -302,7 +302,7 @@ function onDownload() {
elevation="8"
:size="40"
rounded="0"
@click="scrollToTop()"
@click="scrollToTop"
><v-icon color="primary">mdi-chevron-up</v-icon></v-btn
>
</v-scroll-y-reverse-transition>

View File

@@ -118,7 +118,7 @@ function closeDialog() {
:disabled="!user.username || !user.password"
:variant="!user.username || !user.password ? 'plain' : 'flat'"
class="text-romm-green bg-toplayer"
@click="createUser()"
@click="createUser"
>
{{ t("common.create") }}
</v-btn>

View File

@@ -80,7 +80,7 @@ function closeDialog() {
<v-row class="justify-center mb-2" no-gutters>
<v-btn-group divided density="compact">
<v-btn class="bg-toplayer" @click="closeDialog"> Cancel </v-btn>
<v-btn class="bg-toplayer text-romm-red" @click="deleteUser()">
<v-btn class="bg-toplayer text-romm-red" @click="deleteUser">
Confirm
</v-btn>
</v-btn-group>

View File

@@ -127,7 +127,7 @@ function closeDialog() {
variant="outlined"
required
hide-details
@keyup.enter="createCollection()"
@keyup.enter="createCollection"
/>
</v-col>
</v-row>
@@ -140,7 +140,7 @@ function closeDialog() {
variant="outlined"
required
hide-details
@keyup.enter="createCollection()"
@keyup.enter="createCollection"
/>
</v-col>
</v-row>

View File

@@ -168,7 +168,7 @@ async function onScan() {
<v-icon icon="mdi-pencil-box" class="mr-2" />{{ t("rom.edit-rom") }}
</v-list-item-title>
</v-list-item>
<v-list-item class="py-4 pr-5" @click="onScan()">
<v-list-item class="py-4 pr-5" @click="onScan">
<v-list-item-title class="d-flex">
<v-icon icon="mdi-magnify-scan" class="mr-2" />{{
t("rom.refresh-metadata")

View File

@@ -219,7 +219,7 @@ function closeDialog() {
variant="outlined"
required
hide-details
@keyup.enter="updateRom()"
@keyup.enter="updateRom"
/>
</v-col>
</v-row>
@@ -229,10 +229,10 @@ function closeDialog() {
v-model="rom.fs_name"
class="py-2"
:rules="[(value: string) => !!value]"
:label="rom.multi ? t('rom.foldername') : t('rom.filename')"
:label="rom.multi ? t('rom.folder-name') : t('rom.filename')"
variant="outlined"
required
@keyup.enter="updateRom()"
@keyup.enter="updateRom"
>
<template #details>
<v-label class="text-caption text-wrap">
@@ -256,7 +256,6 @@ function closeDialog() {
variant="outlined"
required
hide-details
@keyup.enter="updateRom"
/>
</v-col>
</v-row>

View File

@@ -381,7 +381,7 @@ onBeforeUnmount(() => {
<v-text-field
autofocus
id="search-text-field"
@keyup.enter="searchRom()"
@keyup.enter="searchRom"
@click:clear="searchText = ''"
class="bg-toplayer"
v-model="searchText"
@@ -404,7 +404,7 @@ onBeforeUnmount(() => {
<v-col>
<v-btn
type="submit"
@click="searchRom()"
@click="searchRom"
class="bg-toplayer"
variant="text"
rounded="0"

View File

@@ -157,7 +157,7 @@ function onClose() {
</v-list>
<template #append>
<v-btn
@click="addCollection()"
@click="addCollection"
variant="tonal"
color="primary"
prepend-icon="mdi-plus"

View File

@@ -126,7 +126,7 @@ onBeforeUnmount(() => {
<v-col cols="8" sm="9">
<v-text-field
id="search-text-field"
@keyup.enter="searchCovers()"
@keyup.enter="searchCovers"
@click:clear="searchText = ''"
class="bg-toplayer"
v-model="searchText"
@@ -149,7 +149,7 @@ onBeforeUnmount(() => {
<v-col>
<v-btn
type="submit"
@click="searchCovers()"
@click="searchCovers"
class="bg-toplayer"
variant="text"
icon="mdi-search-web"

View File

@@ -20,7 +20,7 @@
"file": "Datei",
"filename": "Dateiname",
"files": "Dateien",
"foldername": "Verzeichnisname",
"folder-name": "Verzeichnisname",
"franchises": "Franchises",
"genres": "Genres",
"hidden": "Versteckt",

View File

@@ -20,7 +20,7 @@
"file": "File",
"filename": "File name",
"files": "Files",
"foldername": "Folder name",
"folder-name": "Folder name",
"franchises": "Franchises",
"genres": "Genres",
"hidden": "Hidden",

View File

@@ -20,7 +20,7 @@
"file": "File",
"filename": "File name",
"files": "Files",
"foldername": "Folder name",
"folder-name": "Folder name",
"franchises": "Franchises",
"genres": "Genres",
"hidden": "Hidden",

View File

@@ -20,7 +20,7 @@
"file": "Archivo",
"filename": "Nombre del archivo",
"files": "Archivos",
"foldername": "Nombre de la carpeta",
"folder-name": "Nombre de la carpeta",
"franchises": "Franquicias",
"genres": "Géneros",
"hidden": "Oculto",

View File

@@ -20,7 +20,7 @@
"file": "Fichier",
"filename": "Nom du fichier",
"files": "Fichiers",
"foldername": "Nom du dossier",
"folder-name": "Nom du dossier",
"franchises": "Franchises",
"genres": "Genres",
"hidden": "Caché",

View File

@@ -20,7 +20,7 @@
"file": "File",
"filename": "Name file",
"files": "File",
"foldername": "Nome cartella",
"folder-name": "Nome cartella",
"franchises": "Franchise",
"genres": "Generi",
"hidden": "Nascosto",

View File

@@ -20,7 +20,7 @@
"file": "ファイル",
"filename": "ファイル名",
"files": "ファイル",
"foldername": "フォルダ名",
"folder-name": "フォルダ名",
"franchises": "フランチャイズ",
"genres": "ジャンル",
"hidden": "非表示",

View File

@@ -20,7 +20,7 @@
"file": "파일",
"filename": "파일 이름",
"files": "파일",
"foldername": "폴더 이름",
"folder-name": "폴더 이름",
"franchises": "프랜차이즈",
"genres": "장르",
"hidden": "숨김",

View File

@@ -20,7 +20,7 @@
"file": "Arquivo",
"filename": "Nome do arquivo",
"files": "Arquivos",
"foldername": "Nome da pasta",
"folder-name": "Nome da pasta",
"franchises": "Franquias",
"genres": "Gêneros",
"hidden": "Oculto",

View File

@@ -20,7 +20,7 @@
"file": "Fișier",
"filename": "Nume fișier",
"files": "Fișiere",
"foldername": "Nume folder",
"folder-name": "Nume folder",
"franchises": "Francize",
"genres": "Genuri",
"hidden": "Ascuns",

View File

@@ -20,7 +20,7 @@
"file": "Файл",
"filename": "Имя файла",
"files": "Файлы",
"foldername": "Имя папки",
"folder-name": "Имя папки",
"franchises": "Франшизы",
"genres": "Жанры",
"hidden": "Скрыто",

View File

@@ -20,7 +20,7 @@
"file": "文件",
"filename": "文件名称",
"files": "文件集",
"foldername": "文件夹名称",
"folder-name": "文件夹名称",
"franchises": "系列",
"genres": "类型",
"hidden": "隐藏",

View File

@@ -162,7 +162,7 @@ async function loginOIDC() {
variant="text"
:disabled="loggingInOIDC || loggingIn"
:loading="loggingInOIDC"
@click="loginOIDC()"
@click="loginOIDC"
>
<template v-if="oidcProvider" #prepend>
<v-icon size="20">

View File

@@ -415,7 +415,7 @@ onBeforeUnmount(async () => {
color="toplayer"
size="small"
icon
@click="unselectState()"
@click="unselectState"
>
<v-icon>mdi-close-circle-outline</v-icon>
</v-btn>
@@ -500,7 +500,7 @@ onBeforeUnmount(async () => {
color="toplayer"
size="small"
icon
@click="unselectSave()"
@click="unselectSave"
>
<v-icon>mdi-close-circle-outline</v-icon>
</v-btn>
@@ -694,7 +694,7 @@ onBeforeUnmount(async () => {
variant="flat"
class="text-primary"
prepend-icon="mdi-play"
@click="onPlay()"
@click="onPlay"
>{{ t("play.play") }}
</v-btn>
</v-col>

View File

@@ -151,7 +151,7 @@ onMounted(async () => {
variant="outlined"
size="large"
prepend-icon="mdi-play"
@click="onPlay()"
@click="onPlay"
>{{ t("play.play") }}
</v-btn>
</v-col>

View File

@@ -252,7 +252,7 @@ async function stopScan() {
:loading="scanning"
rounded="4"
height="40"
@click="scan()"
@click="scan"
>
<template #prepend>
<v-icon :color="scanning ? '' : 'primary'">mdi-magnify-scan</v-icon>
@@ -272,7 +272,7 @@ async function stopScan() {
class="ml-2"
rounded="4"
height="40"
@click="stopScan()"
@click="stopScan"
>
<template #prepend>
<v-icon :color="scanning ? 'red' : ''">mdi-alert-octagon</v-icon>