Skip to content

Commit

Permalink
[ROMM-1113] Add file path in rom edit window
Browse files Browse the repository at this point in the history
  • Loading branch information
gantoine committed Aug 29, 2024
1 parent c00725f commit 08acaf9
Showing 1 changed file with 28 additions and 10 deletions.
38 changes: 28 additions & 10 deletions frontend/src/components/common/Game/Dialog/EditRom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { useDisplay, useTheme } from "vuetify";
// Props
const theme = useTheme();
const { lgAndUp } = useDisplay();
const { lgAndUp, smAndUp } = useDisplay();
const heartbeat = storeHeartbeat();
const route = useRoute();
const show = ref(false);
Expand Down Expand Up @@ -115,7 +115,7 @@ function closeDialog() {
<template #content>
<v-row class="align-center pa-2" no-gutters>
<v-col cols="12" md="8" lg="8" xl="9">
<v-row class="pa-2" no-gutters>
<v-row class="px-2" no-gutters>
<v-col>
<v-text-field
v-model="rom.name"
Expand All @@ -128,23 +128,34 @@ function closeDialog() {
/>
</v-col>
</v-row>
<v-row class="pa-2" no-gutters>
<v-row class="px-2" no-gutters>
<v-col>
<v-text-field
v-model="rom.file_name"
class="py-2"
:rules="[
(value: string) => !!value
]"
label="File name"
:rules="[(value: string) => !!value]"
label="Filename"
variant="outlined"
required
hide-details
@keyup.enter="updateRom()"
/>
>
<v-label
v-if="smAndUp"
id="file-name-label"
class="text-caption"
>
<v-icon size="small" class="mr-1">
mdi-folder-file-outline
</v-icon>
<span>
/romm/library/{{ rom.file_path }}/{{ rom.file_name }}
</span>
</v-label>
</v-text-field>
</v-col>
</v-row>
<v-row class="pa-2" no-gutters>
<v-row class="px-2" no-gutters>
<v-col>
<v-textarea
v-model="rom.summary"
Expand Down Expand Up @@ -173,7 +184,7 @@ function closeDialog() {
@click="
emitter?.emit(
'showSearchCoverDialog',
rom?.name as string
rom?.name as string,
)
"
>
Expand Down Expand Up @@ -231,3 +242,10 @@ function closeDialog() {
max-height: 330px;
}
</style>

<style>
#file-name-label {
position: absolute;
right: 1rem;
}
</style>

0 comments on commit 08acaf9

Please sign in to comment.