Skip to content

Commit

Permalink
update auth shell around profile pages (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
jongrim authored Feb 13, 2024
1 parent b2b252b commit 95e74f6
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 33 deletions.
56 changes: 27 additions & 29 deletions src/layouts/ProfileTemplate.vue
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
<template>
<AuthShell>
<BaseTemplate>
<SideNavTemplate>
<template #nav>
<SideNavLink to="/profile">
<UserCircleIcon class="h-6 w-6" />
<div class="inline-block sm:hidden lg:inline-block">Profile</div>
</SideNavLink>
<SideNavLink to="/notifications">
<BellIcon class="h-6 w-6" />
<div class="inline-block sm:hidden lg:inline-block">
Notifications
</div>
</SideNavLink>
<SideNavLink to="/media">
<PhotoIcon class="h-6 w-6" />
<div class="inline-block sm:hidden lg:inline-block">Media</div>
</SideNavLink>
<SideNavLink to="/settings">
<AdjustmentsVerticalIcon class="h-6 w-6" />
<div class="inline-block sm:hidden lg:inline-block">Settings</div>
</SideNavLink>
</template>
<template #content>
<slot></slot>
</template>
</SideNavTemplate>
</BaseTemplate>
</AuthShell>
<BaseTemplate>
<SideNavTemplate>
<template #nav>
<SideNavLink to="/profile">
<UserCircleIcon class="h-6 w-6" />
<div class="inline-block sm:hidden lg:inline-block">Profile</div>
</SideNavLink>
<SideNavLink to="/notifications">
<BellIcon class="h-6 w-6" />
<div class="inline-block sm:hidden lg:inline-block">
Notifications
</div>
</SideNavLink>
<SideNavLink to="/media">
<PhotoIcon class="h-6 w-6" />
<div class="inline-block sm:hidden lg:inline-block">Media</div>
</SideNavLink>
<SideNavLink to="/settings">
<AdjustmentsVerticalIcon class="h-6 w-6" />
<div class="inline-block sm:hidden lg:inline-block">Settings</div>
</SideNavLink>
</template>
<template #content>
<slot></slot>
</template>
</SideNavTemplate>
</BaseTemplate>
</template>

<script setup lang="ts">
Expand Down
9 changes: 9 additions & 0 deletions src/pages/Profile/MediaShell.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<AuthShell>
<MediaPage />
</AuthShell>
</template>
<script setup lang="ts">
import AuthShell from "@/layouts/AuthShell.vue";
import MediaPage from "./MediaPage.vue";
</script>
9 changes: 9 additions & 0 deletions src/pages/Profile/NotificationsShell.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<AuthShell>
<NotificationsPage />
</AuthShell>
</template>
<script setup lang="ts">
import AuthShell from "@/layouts/AuthShell.vue";
import NotificationsPage from "./NotificationsPage.vue";
</script>
9 changes: 9 additions & 0 deletions src/pages/Profile/ProfileShell.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<AuthShell>
<ProfilePage />
</AuthShell>
</template>
<script setup lang="ts">
import AuthShell from "@/layouts/AuthShell.vue";
import ProfilePage from "./ProfilePage.vue";
</script>
9 changes: 9 additions & 0 deletions src/pages/Profile/SettingsShell.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<template>
<AuthShell>
<SettingsPage />
</AuthShell>
</template>
<script setup lang="ts">
import AuthShell from "@/layouts/AuthShell.vue";
import SettingsPage from "./SettingsPage.vue";
</script>
12 changes: 8 additions & 4 deletions src/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ import {
sortKeys,
} from "./util/urlParams";
import { format } from "date-fns";
import ProfileShell from "./pages/Profile/ProfileShell.vue";
import NotificationsShell from "./pages/Profile/NotificationsShell.vue";
import MediaShell from "./pages/Profile/MediaShell.vue";
import SettingsShell from "./pages/Profile/SettingsShell.vue";

const routes = [
{
Expand All @@ -57,19 +61,19 @@ const routes = [
},
{
path: "/profile",
component: () => import("@/pages/Profile/ProfilePage.vue"),
component: ProfileShell,
},
{
path: "/notifications",
component: () => import("@/pages/Profile/NotificationsPage.vue"),
component: NotificationsShell,
},
{
path: "/media",
component: () => import("@/pages/Profile/MediaPage.vue"),
component: MediaShell,
},
{
path: "/settings",
component: () => import("@/pages/Profile/SettingsPage.vue"),
component: SettingsShell,
},
{
path: "/communities/joined",
Expand Down

0 comments on commit 95e74f6

Please sign in to comment.