refactor: phase 4 cleanup — delete SidebarLayout, drop dashboard-body
Now that all member-area pages have migrated to PageShell + ColumnsLayout, SidebarLayout has no consumers and can be deleted. PageShell owns the flex chain, so the .dashboard-body wrapper on member/dashboard.vue (flex: 1; display: flex; flex-direction: column; min-height: 0) is redundant. Update stale SidebarLayout comments on members/[id].vue to reference ColumnsLayout.
This commit is contained in:
parent
4a5b129eeb
commit
3b5b0d831d
3 changed files with 5 additions and 57 deletions
|
|
@ -1,43 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="sidebar-layout">
|
|
||||||
<div class="sidebar-layout-main">
|
|
||||||
<slot />
|
|
||||||
</div>
|
|
||||||
<EventsMiniSidebar :events="upcomingEvents" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
const props = defineProps({
|
|
||||||
limit: { type: Number, default: 3 },
|
|
||||||
})
|
|
||||||
|
|
||||||
const { data: upcomingEvents } = await useFetch('/api/events', {
|
|
||||||
query: { limit: props.limit, upcoming: true },
|
|
||||||
default: () => [],
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.sidebar-layout {
|
|
||||||
flex: 1;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 200px;
|
|
||||||
align-items: stretch;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sidebar-layout-main {
|
|
||||||
min-width: 0;
|
|
||||||
align-self: stretch;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
|
||||||
.sidebar-layout {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -27,9 +27,8 @@
|
||||||
<!-- Dashboard Content -->
|
<!-- Dashboard Content -->
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<ColumnsLayout cols="events-sidebar" :limit="5">
|
<ColumnsLayout cols="events-sidebar" :limit="5">
|
||||||
<div class="dashboard-body">
|
<!-- Member Status Banner -->
|
||||||
<!-- Member Status Banner -->
|
<MemberStatusBanner />
|
||||||
<MemberStatusBanner />
|
|
||||||
|
|
||||||
<!-- Welcome Header -->
|
<!-- Welcome Header -->
|
||||||
<PageHeader :title="`Welcome back, ${memberData?.name || ''}`">
|
<PageHeader :title="`Welcome back, ${memberData?.name || ''}`">
|
||||||
|
|
@ -202,7 +201,6 @@
|
||||||
</DashedBox>
|
</DashedBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</ColumnsLayout>
|
</ColumnsLayout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
@ -451,13 +449,6 @@ useHead({
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-body {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-height: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content-row {
|
.content-row {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@
|
||||||
<!-- Profile Content -->
|
<!-- Profile Content -->
|
||||||
<template v-else>
|
<template v-else>
|
||||||
|
|
||||||
<!-- HERO: full-bleed, outside SidebarLayout -->
|
<!-- HERO: full-bleed, outside ColumnsLayout -->
|
||||||
<div class="profile-hero" :class="{ 'profile-hero--with-links': hasSocialLinks }">
|
<div class="profile-hero" :class="{ 'profile-hero--with-links': hasSocialLinks }">
|
||||||
|
|
||||||
<!-- Left: Avatar + Identity -->
|
<!-- Left: Avatar + Identity -->
|
||||||
|
|
@ -514,7 +514,7 @@ useHead({
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ====================================================
|
/* ====================================================
|
||||||
SECTIONS — inside SidebarLayout
|
SECTIONS — inside ColumnsLayout
|
||||||
==================================================== */
|
==================================================== */
|
||||||
|
|
||||||
.profile-section {
|
.profile-section {
|
||||||
|
|
@ -734,7 +734,7 @@ useHead({
|
||||||
==================================================== */
|
==================================================== */
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
@media (max-width: 1024px) {
|
||||||
/* SidebarLayout sidebar hides itself at ≤1024px */
|
/* ColumnsLayout events-sidebar hides itself at ≤1024px */
|
||||||
.profile-two-col {
|
.profile-two-col {
|
||||||
grid-template-columns: 1fr;
|
grid-template-columns: 1fr;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue