mirror of
https://github.com/rommapp/romm.git
synced 2026-12-05 05:07:31 +01:00
upgraded front packages and adapted code
This commit is contained in:
@@ -99,15 +99,13 @@ function onEditNote() {
|
||||
<v-card-text>
|
||||
<v-list>
|
||||
<v-list-item v-for="note in publicNotes" :key="note.id">
|
||||
<v-list-item-content>
|
||||
<v-list-item-title>{{ note.user__username }}</v-list-item-title>
|
||||
<MdPreview
|
||||
:modelValue="note.raw_markdown"
|
||||
:theme="theme.name.value == 'dark' ? 'dark' : 'light'"
|
||||
previewTheme="vuepress"
|
||||
codeTheme="github"
|
||||
/>
|
||||
</v-list-item-content>
|
||||
<v-list-item-title>{{ note.user__username }}</v-list-item-title>
|
||||
<MdPreview
|
||||
:modelValue="note.raw_markdown"
|
||||
:theme="theme.name.value == 'dark' ? 'dark' : 'light'"
|
||||
previewTheme="vuepress"
|
||||
codeTheme="github"
|
||||
/>
|
||||
</v-list-item>
|
||||
</v-list>
|
||||
</v-card-text>
|
||||
@@ -124,6 +122,6 @@ function onEditNote() {
|
||||
line-height: 1.25 !important;
|
||||
}
|
||||
.vuepress-theme pre code {
|
||||
background-color: #0D1117;
|
||||
background-color: #0d1117;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -47,7 +47,7 @@ const { smAndDown } = useDisplay();
|
||||
:to="{ name: 'platform', params: { platform: platform.id } }"
|
||||
>
|
||||
{{ platform.name }}
|
||||
<v-avatar :rounded="0" size="40" class="ml-1 py-1">
|
||||
<v-avatar :rounded="0" size="30" class="ml-2">
|
||||
<platform-icon :key="platform.slug" :slug="platform.slug" />
|
||||
</v-avatar>
|
||||
</v-chip>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import { VDataTable } from "vuetify/labs/VDataTable";
|
||||
|
||||
import AdminMenu from "@/components/Game/AdminMenu/Base.vue";
|
||||
import romApi from "@/services/api/rom";
|
||||
@@ -76,7 +75,7 @@ const romsPerPage = ref(-1);
|
||||
|
||||
// Functions
|
||||
function rowClick(_: Event, row: any) {
|
||||
router.push({ name: "rom", params: { rom: row.item.raw.id } });
|
||||
router.push({ name: "rom", params: { rom: row.item.id } });
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -97,24 +96,24 @@ function rowClick(_: Event, row: any) {
|
||||
<v-avatar :rounded="0">
|
||||
<v-progress-linear
|
||||
color="romm-accent-1"
|
||||
:active="downloadStore.value.includes(item.raw.id)"
|
||||
:active="downloadStore.value.includes(item.id)"
|
||||
:indeterminate="true"
|
||||
absolute
|
||||
/>
|
||||
<v-img
|
||||
:src="
|
||||
!item.raw.igdb_id && !item.raw.has_cover
|
||||
!item.igdb_id && !item.has_cover
|
||||
? `/assets/default/cover/small_${theme.global.name.value}_unmatched.png`
|
||||
: !item.raw.has_cover
|
||||
: !item.has_cover
|
||||
? `/assets/default/cover/small_${theme.global.name.value}_missing_cover.png`
|
||||
: `/assets/romm/resources/${item.raw.path_cover_s}`
|
||||
: `/assets/romm/resources/${item.path_cover_s}`
|
||||
"
|
||||
:lazy-src="
|
||||
!item.raw.igdb_id && !item.raw.has_cover
|
||||
!item.igdb_id && !item.has_cover
|
||||
? `/assets/default/cover/small_${theme.global.name.value}_unmatched.png`
|
||||
: !item.raw.has_cover
|
||||
: !item.has_cover
|
||||
? `/assets/default/cover/small_${theme.global.name.value}_missing_cover.png`
|
||||
: `/assets/romm/resources/${item.raw.path_cover_s}`
|
||||
: `/assets/romm/resources/${item.path_cover_s}`
|
||||
"
|
||||
min-height="150"
|
||||
/>
|
||||
@@ -122,16 +121,16 @@ function rowClick(_: Event, row: any) {
|
||||
</template>
|
||||
<template v-slot:item.file_size_bytes="{ item }">
|
||||
<span>
|
||||
{{ formatBytes(item.raw.file_size_bytes) }}
|
||||
{{ formatBytes(item.file_size_bytes) }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot:item.regions="{ item }">
|
||||
<span class="px-1" v-for="region in item.raw.regions">
|
||||
<span class="px-1" v-for="region in item.regions">
|
||||
{{ regionToEmoji(region) }}
|
||||
</span>
|
||||
</template>
|
||||
<template v-slot:item.languages="{ item }">
|
||||
<span class="px-1" v-for="language in item.raw.languages">
|
||||
<span class="px-1" v-for="language in item.languages">
|
||||
{{ languageToEmoji(language) }}
|
||||
</span>
|
||||
</template>
|
||||
@@ -139,8 +138,8 @@ function rowClick(_: Event, row: any) {
|
||||
<v-btn
|
||||
class="ma-1 bg-terciary"
|
||||
rounded="0"
|
||||
@click.stop="romApi.downloadRom({ rom: item.raw })"
|
||||
:disabled="downloadStore.value.includes(item.raw.id)"
|
||||
@click.stop="romApi.downloadRom({ rom: item })"
|
||||
:disabled="downloadStore.value.includes(item.id)"
|
||||
download
|
||||
size="small"
|
||||
variant="text"
|
||||
@@ -148,10 +147,10 @@ function rowClick(_: Event, row: any) {
|
||||
<v-icon>mdi-download</v-icon>
|
||||
</v-btn>
|
||||
<v-btn
|
||||
v-if="item.raw.platform_slug.toLowerCase() in platformSlugEJSCoreMap"
|
||||
v-if="item.platform_slug.toLowerCase() in platformSlugEJSCoreMap"
|
||||
size="small"
|
||||
variant="text"
|
||||
:href="`/play/${item.raw.id}`"
|
||||
:href="`/play/${item.id}`"
|
||||
class="my-1 bg-terciary"
|
||||
rounded="0"
|
||||
>
|
||||
@@ -169,7 +168,7 @@ function rowClick(_: Event, row: any) {
|
||||
><v-icon>mdi-dots-vertical</v-icon></v-btn
|
||||
>
|
||||
</template>
|
||||
<admin-menu :rom="item.raw" />
|
||||
<admin-menu :rom="item" />
|
||||
</v-menu>
|
||||
</template>
|
||||
</v-data-table>
|
||||
|
||||
@@ -50,23 +50,37 @@ const tab = ref("general");
|
||||
<span class="text-romm-accent-1">RomM</span>
|
||||
<span class="ml-1">{{ heartbeatStore.value.VERSION }}</span>
|
||||
<v-icon>mdi-circle-small</v-icon><v-icon>mdi-github</v-icon>
|
||||
<span class="ml-1"
|
||||
><a
|
||||
style="text-decoration: none; color: inherit"
|
||||
href="https://github.com/rommapp/romm"
|
||||
target="_blank"
|
||||
>Github</a
|
||||
></span
|
||||
>
|
||||
<v-hover v-slot="{ isHovering, props }">
|
||||
<span class="ml-1"
|
||||
><a
|
||||
:class="{
|
||||
'text-romm-accent-1': isHovering,
|
||||
'text-white': !isHovering,
|
||||
}"
|
||||
v-bind="props"
|
||||
style="text-decoration: none"
|
||||
href="https://github.com/rommapp/romm"
|
||||
target="_blank"
|
||||
>Github</a
|
||||
></span
|
||||
>
|
||||
</v-hover>
|
||||
<v-icon>mdi-circle-small</v-icon>
|
||||
<span class="ml-1"
|
||||
><a
|
||||
style="text-decoration: none; color: inherit"
|
||||
href="https://discord.com/invite/P5HtHnhUDH"
|
||||
target="_blank"
|
||||
>Join to our Discord</a
|
||||
></span
|
||||
>
|
||||
<v-hover v-slot="{ isHovering, props }">
|
||||
<span class="ml-1"
|
||||
><a
|
||||
:class="{
|
||||
'text-romm-accent-1': isHovering,
|
||||
'text-white': !isHovering,
|
||||
}"
|
||||
v-bind="props"
|
||||
style="text-decoration: none"
|
||||
href="https://discord.com/invite/P5HtHnhUDH"
|
||||
target="_blank"
|
||||
>Join to our Discord</a
|
||||
></span
|
||||
>
|
||||
</v-hover>
|
||||
</v-row>
|
||||
</v-bottom-navigation>
|
||||
</template>
|
||||
|
||||
@@ -6,7 +6,6 @@ import type { Events, UserItem } from "@/types/emitter";
|
||||
import { defaultAvatarPath, formatTimestamp } from "@/utils";
|
||||
import type { Emitter } from "mitt";
|
||||
import { inject, onMounted, ref } from "vue";
|
||||
import { VDataTable } from "vuetify/labs/VDataTable";
|
||||
|
||||
const HEADERS = [
|
||||
{
|
||||
@@ -123,22 +122,22 @@ onMounted(() => {
|
||||
<v-avatar>
|
||||
<v-img
|
||||
:src="
|
||||
item.raw.avatar_path
|
||||
? `/assets/romm/assets/${item.raw.avatar_path}`
|
||||
item.avatar_path
|
||||
? `/assets/romm/assets/${item.avatar_path}`
|
||||
: defaultAvatarPath
|
||||
"
|
||||
/>
|
||||
</v-avatar>
|
||||
</template>
|
||||
<template v-slot:item.last_active="{ item }">
|
||||
{{ formatTimestamp(item.raw.last_active) }}
|
||||
{{ formatTimestamp(item.last_active) }}
|
||||
</template>
|
||||
<template v-slot:item.enabled="{ item }">
|
||||
<v-switch
|
||||
color="romm-accent-1"
|
||||
:disabled="item.raw.id == auth.user?.id"
|
||||
v-model="item.raw.enabled"
|
||||
@change="disableUser(item.raw)"
|
||||
:disabled="item.id == auth.user?.id"
|
||||
v-model="item.enabled"
|
||||
@change="disableUser(item)"
|
||||
hide-details
|
||||
/>
|
||||
</template>
|
||||
@@ -148,7 +147,7 @@ onMounted(() => {
|
||||
class="ma-1 bg-terciary"
|
||||
size="small"
|
||||
rounded="0"
|
||||
@click="emitter?.emit('showEditUserDialog', item.raw)"
|
||||
@click="emitter?.emit('showEditUserDialog', item)"
|
||||
>
|
||||
<v-icon>mdi-pencil</v-icon>
|
||||
</v-btn>
|
||||
@@ -157,7 +156,7 @@ onMounted(() => {
|
||||
class="ma-1 bg-terciary text-romm-red"
|
||||
size="small"
|
||||
rounded="0"
|
||||
@click="emitter?.emit('showDeleteUserDialog', item.raw)"
|
||||
@click="emitter?.emit('showDeleteUserDialog', item)"
|
||||
><v-icon>mdi-delete</v-icon></v-btn
|
||||
>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user