mirror of
https://github.com/rommapp/romm.git
synced 2026-12-02 10:08:40 +01:00
got the platform sidebar working
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import languageStore from "@/stores/language";
|
||||
import MainAppBar from "@/components/common/Navigation/MainAppBar.vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { ref } from "vue";
|
||||
import { useI18n } from "vue-i18n";
|
||||
@@ -18,8 +19,11 @@ storeLanguage.setLanguage(selectedLanguage.value);
|
||||
</script>
|
||||
<template>
|
||||
<v-app>
|
||||
<v-main class="h-100">
|
||||
<router-view />
|
||||
</v-main>
|
||||
<div class="d-flex flex-row flex-grow-1" style="max-height: 100dvh">
|
||||
<main-app-bar />
|
||||
<div class="flex-grow-1">
|
||||
<router-view />
|
||||
</div>
|
||||
</div>
|
||||
</v-app>
|
||||
</template>
|
||||
|
||||
@@ -21,13 +21,13 @@ const { currentCollection } = storeToRefs(romsStore);
|
||||
|
||||
<template>
|
||||
<v-app-bar
|
||||
top
|
||||
id="gallery-app-bar"
|
||||
elevation="0"
|
||||
density="compact"
|
||||
mode="shift"
|
||||
app
|
||||
fixed
|
||||
top
|
||||
class="rounded mx-2 mt-2 mb-1 position-sticky"
|
||||
style="width: unset"
|
||||
>
|
||||
<template #prepend>
|
||||
<r-avatar
|
||||
|
||||
@@ -23,13 +23,13 @@ const { activePlatformInfoDrawer } = storeToRefs(navigationStore);
|
||||
|
||||
<template>
|
||||
<v-app-bar
|
||||
top
|
||||
id="gallery-app-bar"
|
||||
elevation="0"
|
||||
density="compact"
|
||||
mode="shift"
|
||||
app
|
||||
fixed
|
||||
top
|
||||
class="rounded mx-2 mt-2 mb-1 position-sticky"
|
||||
style="width: unset"
|
||||
>
|
||||
<platform-icon
|
||||
v-if="currentPlatform"
|
||||
|
||||
@@ -16,13 +16,13 @@ const { xs } = useDisplay();
|
||||
|
||||
<template>
|
||||
<v-app-bar
|
||||
top
|
||||
id="gallery-app-bar"
|
||||
elevation="0"
|
||||
density="compact"
|
||||
mode="shift"
|
||||
app
|
||||
fixed
|
||||
top
|
||||
class="rounded mx-2 mt-2 mb-1 position-sticky"
|
||||
style="width: unset"
|
||||
>
|
||||
<filter-btn />
|
||||
<template v-if="!xs">
|
||||
|
||||
@@ -18,11 +18,11 @@ const { activeCollectionsDrawer } = storeToRefs(navigationStore);
|
||||
</script>
|
||||
<template>
|
||||
<v-btn
|
||||
icon
|
||||
:block="block"
|
||||
variant="flat"
|
||||
rounded="0"
|
||||
:color="activeCollectionsDrawer ? 'toplayer' : ''"
|
||||
icon
|
||||
:color="activeCollectionsDrawer ? 'surface' : 'background'"
|
||||
@click="navigationStore.switchActiveCollectionsDrawer"
|
||||
><v-icon :color="$route.name == 'collection' ? 'primary' : ''"
|
||||
>mdi-bookmark-box-multiple</v-icon
|
||||
|
||||
@@ -54,10 +54,9 @@ const { activePlatformsDrawer, activeCollectionsDrawer, activeSettingsDrawer } =
|
||||
v-else
|
||||
permanent
|
||||
rail
|
||||
:floating="
|
||||
activePlatformsDrawer || activeCollectionsDrawer || activeSettingsDrawer
|
||||
"
|
||||
rail-width="60"
|
||||
class="bg-background border-0 py-1"
|
||||
style="position: initial"
|
||||
>
|
||||
<template #prepend>
|
||||
<v-row no-gutters class="my-2 justify-center">
|
||||
|
||||
@@ -18,7 +18,7 @@ const { activePlatformsDrawer } = storeToRefs(navigationStore);
|
||||
:block="block"
|
||||
variant="flat"
|
||||
rounded="0"
|
||||
:color="activePlatformsDrawer ? 'toplayer' : ''"
|
||||
:color="activeCollectionsDrawer ? 'surface' : 'background'"
|
||||
icon
|
||||
@click="navigationStore.switchActivePlatformsDrawer"
|
||||
><v-icon :color="$route.name == 'platform' ? 'primary' : ''"
|
||||
|
||||
@@ -20,12 +20,15 @@ function clear() {
|
||||
</script>
|
||||
<template>
|
||||
<v-navigation-drawer
|
||||
:location="smAndDown ? 'top' : 'left'"
|
||||
v-if="activePlatformsDrawer"
|
||||
mobile
|
||||
:location="smAndDown ? 'top' : 'left'"
|
||||
@update:model-value="clear"
|
||||
width="500"
|
||||
width="300"
|
||||
v-model="activePlatformsDrawer"
|
||||
class="bg-toplayer"
|
||||
class="bg-surface border-0 rounded ma-2"
|
||||
style="position: initial; height: unset"
|
||||
:scrim="false"
|
||||
>
|
||||
<template #prepend>
|
||||
<v-text-field
|
||||
@@ -38,6 +41,7 @@ function clear() {
|
||||
single-line
|
||||
:label="t('platform.search-platform')"
|
||||
variant="solo-filled"
|
||||
class="ma-1"
|
||||
></v-text-field>
|
||||
</template>
|
||||
<v-list lines="two" class="pa-0">
|
||||
|
||||
@@ -109,6 +109,7 @@ onBeforeUnmount(() => {
|
||||
variant="flat"
|
||||
rounded="0"
|
||||
icon
|
||||
color="background"
|
||||
@click="navigationStore.goScan"
|
||||
>
|
||||
<v-progress-circular
|
||||
|
||||
@@ -9,7 +9,13 @@ const navigationStore = storeNavigation();
|
||||
const emitter = inject<Emitter<Events>>("emitter");
|
||||
</script>
|
||||
<template>
|
||||
<v-btn icon variant="flat" rounded="0" @click="navigationStore.goSearch">
|
||||
<v-btn
|
||||
icon
|
||||
variant="flat"
|
||||
rounded="0"
|
||||
color="background"
|
||||
@click="navigationStore.goSearch"
|
||||
>
|
||||
<v-icon :color="$route.name == 'search' ? 'primary' : ''"
|
||||
>mdi-magnify</v-icon
|
||||
>
|
||||
|
||||
@@ -14,6 +14,7 @@ const auth = storeAuth();
|
||||
icon="mdi-upload"
|
||||
variant="flat"
|
||||
rounded="0"
|
||||
color="background"
|
||||
@click="emitter?.emit('showUploadRomDialog', null)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
@@ -5,7 +5,6 @@ import RemoveRomsFromCollectionDialog from "@/components/common/Collection/Dialo
|
||||
import DeleteRomDialog from "@/components/common/Game/Dialog/DeleteRom.vue";
|
||||
import EditRomDialog from "@/components/common/Game/Dialog/EditRom.vue";
|
||||
import MatchRomDialog from "@/components/common/Game/Dialog/MatchRom.vue";
|
||||
import MainAppBar from "@/components/common/Navigation/MainAppBar.vue";
|
||||
import NewVersionDialog from "@/components/common/NewVersionDialog.vue";
|
||||
import Notification from "@/components/common/Notifications/Notification.vue";
|
||||
import UploadProgress from "@/components/common/Notifications/UploadProgress.vue";
|
||||
@@ -59,7 +58,6 @@ onBeforeMount(async () => {
|
||||
|
||||
<template>
|
||||
<notification />
|
||||
<main-app-bar />
|
||||
<router-view />
|
||||
|
||||
<match-rom-dialog />
|
||||
|
||||
@@ -11,7 +11,6 @@ import { getDownloadPath } from "@/utils";
|
||||
import type { AxiosProgressEvent } from "axios";
|
||||
import storeHeartbeat from "@/stores/heartbeat";
|
||||
|
||||
const heartbeat = storeHeartbeat();
|
||||
export const romApi = api;
|
||||
|
||||
async function uploadRoms({
|
||||
@@ -21,6 +20,8 @@ async function uploadRoms({
|
||||
platformId: number;
|
||||
filesToUpload: File[];
|
||||
}): Promise<PromiseSettledResult<unknown>[]> {
|
||||
const heartbeat = storeHeartbeat();
|
||||
|
||||
if (!socket.connected) socket.connect();
|
||||
const uploadStore = storeUpload();
|
||||
|
||||
|
||||
@@ -11,8 +11,6 @@ import { defineStore } from "pinia";
|
||||
|
||||
type GalleryFilterStore = ExtractPiniaStoreType<typeof storeGalleryFilter>;
|
||||
|
||||
const collectionStore = storeCollection();
|
||||
|
||||
export type SimpleRom = SimpleRomSchema;
|
||||
export type DetailedRom = DetailedRomSchema;
|
||||
|
||||
@@ -212,6 +210,8 @@ export default defineStore("roms", {
|
||||
this._filteredIDs = byMatched.intersection(this._filteredIDs);
|
||||
},
|
||||
_filterFavourites() {
|
||||
const collectionStore = storeCollection();
|
||||
|
||||
const byFavourites = new Set(
|
||||
this.filteredRoms
|
||||
.filter((rom) =>
|
||||
|
||||
Reference in New Issue
Block a user