Skip to content

Commit

Permalink
Add breadcrumbs to discussions and models. Temp change to routing (#2123
Browse files Browse the repository at this point in the history
)

* Add breadcrumbs to discussions and models. Temp change to routing

* Fix build
  • Loading branch information
andrewwallacespeckle authored Mar 13, 2024
1 parent 0d3133d commit dfa340a
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/frontend-2/lib/common/helpers/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ export const modelRoute = (
}`
export const modelVersionsRoute = (projectId: string, modelId: string) =>
`/projects/${projectId}/models/${modelId}/versions`
export const allProjectModelsRoute = (projectId: string) =>
`/projects/${projectId}/models`
export const projectDiscussionsRoute = (projectId: string) =>
`/projects/${projectId}/discussions`

// Temp change to allProjectModelsRoute until tab routing is implemented
export const allProjectModelsRoute = (projectId: string) => `/projects/${projectId}`

// Temp change to projectDiscussionsRoute until tab routing is implemented
export const projectDiscussionsRoute = (projectId: string) => `/projects/${projectId}`

export const projectWebhooksRoute = (projectId: string) =>
`/projects/${projectId}/webhooks`

Expand Down
11 changes: 11 additions & 0 deletions packages/frontend-2/pages/projects/[id]/discussions.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<template>
<div>
<div>
<Portal to="navigation">
<HeaderNavLink
v-if="project"
:to="projectRoute(project.id)"
:name="project.name"
></HeaderNavLink>
</Portal>
</div>

<div v-if="project">
<ProjectPageDiscussionsHeader
v-model:grid-or-list="gridOrList"
Expand All @@ -17,6 +27,7 @@
<script setup lang="ts">
import { useQuery } from '@vue/apollo-composable'
import type { Optional } from '~~/../shared/dist-esm'
import { projectRoute } from '~~/lib/common/helpers/route'
import {
useGeneralProjectPageUpdateTracking,
useProjectPageItemViewType
Expand Down
11 changes: 11 additions & 0 deletions packages/frontend-2/pages/projects/[id]/models/index.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
<template>
<div>
<div>
<Portal to="navigation">
<HeaderNavLink
v-if="project"
:to="projectRoute(project.id)"
:name="project.name"
></HeaderNavLink>
</Portal>
</div>

<div v-if="project">
<ProjectPageModelsHeader
v-model:selected-apps="selectedApps"
Expand All @@ -25,6 +35,7 @@
</template>
<script setup lang="ts">
import { useQuery } from '@vue/apollo-composable'
import { projectRoute } from '~~/lib/common/helpers/route'
import type { SourceAppDefinition } from '@speckle/shared'
import type { FormUsersSelectItemFragment } from '~~/lib/common/generated/gql/graphql'
import { projectModelsPageQuery } from '~~/lib/projects/graphql/queries'
Expand Down

0 comments on commit dfa340a

Please sign in to comment.