mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 10:01:00 +01:00
drawer ui tweaks
This commit is contained in:
@@ -29,7 +29,7 @@ emitter.on("toggleDrawerRail", () => {
|
||||
v-model="drawer"
|
||||
:rail="rail"
|
||||
width="270"
|
||||
rail-width="103"
|
||||
rail-width="70"
|
||||
elevation="0"
|
||||
>
|
||||
<template v-slot:prepend>
|
||||
@@ -38,12 +38,10 @@ emitter.on("toggleDrawerRail", () => {
|
||||
<v-list v-model:opened="open" class="pa-0">
|
||||
<v-divider />
|
||||
|
||||
<v-list-group value="Platforms">
|
||||
<v-list-group value="Platforms" fluid>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-list-item v-bind="props">
|
||||
<span class="text-body-1 text-truncate">{{
|
||||
rail ? "" : "Platforms"
|
||||
}}</span>
|
||||
<span v-if="!rail" class="text-body-1 text-truncate">Platforms</span>
|
||||
<template v-slot:prepend>
|
||||
<v-avatar :rounded="0" size="40"
|
||||
><v-icon>mdi-controller</v-icon></v-avatar
|
||||
@@ -52,7 +50,6 @@ emitter.on("toggleDrawerRail", () => {
|
||||
</v-list-item>
|
||||
</template>
|
||||
<platform-list-item
|
||||
class="drawer-item"
|
||||
v-for="platform in platforms.value"
|
||||
:platform="platform"
|
||||
:rail="rail"
|
||||
@@ -60,12 +57,10 @@ emitter.on("toggleDrawerRail", () => {
|
||||
/>
|
||||
</v-list-group>
|
||||
|
||||
<v-list-group value="Library" v-if="auth.scopes.includes('roms.write')">
|
||||
<v-list-group value="Library" v-if="auth.scopes.includes('roms.write')" fluid>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-list-item v-bind="props">
|
||||
<span class="text-body-1 text-truncate">{{
|
||||
rail ? "" : "Library"
|
||||
}}</span>
|
||||
<span v-if="!rail" class="text-body-1 text-truncate">Library</span>
|
||||
<template v-slot:prepend>
|
||||
<v-avatar :rounded="0" size="40"
|
||||
><v-icon>mdi-animation-outline</v-icon></v-avatar
|
||||
@@ -73,23 +68,17 @@ emitter.on("toggleDrawerRail", () => {
|
||||
</template>
|
||||
</v-list-item>
|
||||
</template>
|
||||
<v-list-item class="drawer-item bg-terciary" to="/library/scan">
|
||||
<span class="text-body-2 text-truncate">{{
|
||||
rail ? "" : "Scan"
|
||||
}}</span>
|
||||
<v-list-item class="bg-terciary" to="/library/scan">
|
||||
<span v-if="!rail" class="text-body-2 text-truncate">Scan</span>
|
||||
<template v-slot:prepend>
|
||||
<v-avatar :rounded="0" size="40"
|
||||
><v-icon>mdi-magnify-scan</v-icon></v-avatar
|
||||
>
|
||||
</template>
|
||||
</v-list-item>
|
||||
<v-list-item class="drawer-item bg-terciary" disabled>
|
||||
<span class="text-body-2 text-truncate">{{
|
||||
rail ? "" : "Upload"
|
||||
}}</span>
|
||||
<span class="text-caption text-truncate ml-1">{{
|
||||
rail ? "" : "[coming soon]"
|
||||
}}</span>
|
||||
<v-list-item class="bg-terciary" disabled>
|
||||
<span v-if="!rail" class="text-body-2 text-truncate">Upload</span>
|
||||
<span v-if="!rail" class="text-caption text-truncate ml-1">[coming soon]</span>
|
||||
<template v-slot:prepend>
|
||||
<v-avatar :rounded="0" size="40"
|
||||
><v-icon>mdi-upload</v-icon></v-avatar
|
||||
@@ -98,12 +87,10 @@ emitter.on("toggleDrawerRail", () => {
|
||||
</v-list-item>
|
||||
</v-list-group>
|
||||
|
||||
<v-list-group value="Settings">
|
||||
<v-list-group value="Settings" fluid>
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-list-item v-bind="props">
|
||||
<span class="text-body-1 text-truncate">{{
|
||||
rail ? "" : "Settings"
|
||||
}}</span>
|
||||
<span v-if="!rail" class="text-body-1 text-truncate">Settings</span>
|
||||
<template v-slot:prepend>
|
||||
<v-avatar :rounded="0" size="40"
|
||||
><v-icon>mdi-cog</v-icon></v-avatar
|
||||
@@ -112,12 +99,10 @@ emitter.on("toggleDrawerRail", () => {
|
||||
</v-list-item>
|
||||
</template>
|
||||
<v-list-item
|
||||
class="drawer-item bg-terciary"
|
||||
class="bg-terciary"
|
||||
to="/settings/control-panel"
|
||||
>
|
||||
<span class="text-body-2 text-truncate">{{
|
||||
rail ? "" : "Control panel"
|
||||
}}</span>
|
||||
<span v-if="!rail" class="text-body-2 text-truncate">Control Panel</span>
|
||||
<template v-slot:prepend>
|
||||
<v-avatar :rounded="0" size="40"
|
||||
><v-icon>mdi-view-dashboard</v-icon></v-avatar
|
||||
@@ -133,9 +118,3 @@ emitter.on("toggleDrawerRail", () => {
|
||||
</template>
|
||||
</v-navigation-drawer>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.drawer-item {
|
||||
padding-inline-start: 30px !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -31,14 +31,12 @@ async function logout() {
|
||||
|
||||
<template>
|
||||
<v-list-item height="60" class="bg-primary text-button" rounded="0">
|
||||
<div class="text-no-wrap text-truncate text-subtitle-1">
|
||||
{{ rail ? "" : auth.user?.username }}
|
||||
</div>
|
||||
<div class="text-no-wrap text-truncate text-caption">
|
||||
{{ rail ? "" : auth.user?.role }}
|
||||
</div>
|
||||
<template v-if="!rail">
|
||||
<div class="text-no-wrap text-truncate text-subtitle-1">{{ auth.user?.username }}</div>
|
||||
<div class="text-no-wrap text-truncate text-caption">{{ auth.user?.role }}</div>
|
||||
</template>
|
||||
<template v-slot:prepend>
|
||||
<v-avatar :class="{ 'ml-4': rail, 'my-2': rail }" >
|
||||
<v-avatar :class="{ 'ml-0': rail, 'my-2': rail }" >
|
||||
<v-img src="/assets/default_user.png" />
|
||||
</v-avatar>
|
||||
</template>
|
||||
|
||||
@@ -4,10 +4,10 @@ import RailBtn from "@/components/Drawer/RailBtn.vue";
|
||||
const props = defineProps(["rail"]);
|
||||
</script>
|
||||
<template>
|
||||
<v-list-item :class="{ 'ml-10': !rail, 'ml-2': rail }" class="my-2">
|
||||
<v-list-item :class="{ 'ml-9': !rail, 'ml-0': rail }" class="my-2">
|
||||
<template v-slot:prepend>
|
||||
<router-link to="/">
|
||||
<v-avatar :rounded="0" size="60" class="mr-3"
|
||||
<v-avatar :rounded="0" :size="rail ? 40 : 60" class="mr-3"
|
||||
><v-img src="/assets/isotipo.svg"
|
||||
/></v-avatar>
|
||||
<v-avatar v-if="!rail" :rounded="0" size="60"
|
||||
|
||||
@@ -11,16 +11,14 @@ import PlatformIcon from "./PlatformIcon.vue";
|
||||
:key="platform"
|
||||
class="pt-4 pb-4 bg-terciary"
|
||||
>
|
||||
<span class="text-body-2">{{
|
||||
rail ? "" : platform.name
|
||||
}}</span>
|
||||
<span v-if="!rail" class="text-body-2">{{ platform.name }}</span>
|
||||
<template v-slot:prepend>
|
||||
<v-avatar :rounded="0" size="40">
|
||||
<platform-icon :platform="platform"></platform-icon>
|
||||
</v-avatar>
|
||||
</template>
|
||||
<template v-slot:append>
|
||||
<v-chip class="ml-4 bg-chip" size="x-small" label>{{
|
||||
<v-chip v-if="!rail" class="ml-4 bg-chip" size="x-small" label>{{
|
||||
platform.n_roms
|
||||
}}</v-chip>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user