feat: overhaul project workspace navigation
This commit is contained in:
@@ -15,7 +15,8 @@ import {
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import { index, show } from '@/routes/projects/index';
|
||||
import { index } from '@/routes/projects/index';
|
||||
import { index as boardIndex } from '@/routes/projects/board';
|
||||
import {
|
||||
board as boardSettings,
|
||||
general as generalSettings,
|
||||
@@ -35,7 +36,7 @@ const breadcrumbs: BreadcrumbItem[] = [
|
||||
},
|
||||
{
|
||||
title: props.project.name,
|
||||
href: show(props.project.id),
|
||||
href: boardIndex(props.project.id),
|
||||
},
|
||||
{
|
||||
title: 'General settings',
|
||||
@@ -122,11 +123,15 @@ const submitDelete = (): void => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<AppLayout :breadcrumbs="breadcrumbs" :project="project">
|
||||
<Head :title="`${project.name} general settings`" />
|
||||
<component
|
||||
:is="embedded ? 'div' : AppLayout"
|
||||
v-bind="embedded ? {} : { breadcrumbs, project }"
|
||||
>
|
||||
<Head v-if="!embedded" :title="`${project.name} general settings`" />
|
||||
|
||||
<div class="app-page">
|
||||
<div :class="embedded ? 'space-y-6' : 'app-page'">
|
||||
<div
|
||||
v-if="!embedded"
|
||||
class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between"
|
||||
>
|
||||
<div class="space-y-3">
|
||||
@@ -165,12 +170,14 @@ const submitDelete = (): void => {
|
||||
</Button>
|
||||
|
||||
<Button as-child variant="outline">
|
||||
<Link :href="show(project.id)">Back to project</Link>
|
||||
<Link :href="boardIndex(project.id)"
|
||||
>Back to project</Link
|
||||
>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="status" class="status-success">
|
||||
<div v-if="!embedded && status" class="status-success">
|
||||
{{ status }}
|
||||
</div>
|
||||
|
||||
@@ -477,5 +484,5 @@ const submitDelete = (): void => {
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
</AppLayout>
|
||||
</component>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user