Skip to content

Commit

Permalink
Workspace page prop
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwallacespeckle committed Dec 20, 2024
1 parent f9a651c commit f69210d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
2 changes: 2 additions & 0 deletions packages/frontend-2/components/projects/DashboardFilled.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:key="project.id"
:project="project"
:show-workspace-link="showWorkspaceLink"
:workspace-page="workspacePage"
/>
</div>
</div>
Expand All @@ -21,6 +22,7 @@ import type {
const props = defineProps<{
projects: ProjectsDashboardFilledProjectFragment | ProjectsDashboardFilledUserFragment
showWorkspaceLink?: boolean
workspacePage?: boolean
}>()
graphql(`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
in SSO-protected workspaces. To view {{ hiddenItemCount === 1 ? 'it' : 'them' }},
authenticate with:
</p>
<div class="flex gap-2 mt-2">
<div class="flex flex-wrap gap-2 mt-2">
<FormButton
v-for="session in user.expiredSsoSessions"
:key="session.id"
Expand Down
15 changes: 8 additions & 7 deletions packages/frontend-2/components/projects/ProjectDashboardCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ import { workspaceRoute } from '~/lib/common/helpers/route'
const props = defineProps<{
project: ProjectDashboardItemFragment
showWorkspaceLink?: boolean
workspacePage?: boolean
}>()
const router = useRouter()
Expand Down Expand Up @@ -141,16 +142,16 @@ const gridClasses = computed(() => [
// Grid columns
'grid-cols-1',
'sm:grid-cols-2',
'lg:grid-cols-1',
'xl:grid-cols-2',
'2xl:grid-cols-3',
props.workspacePage && 'lg:grid-cols-1',
props.workspacePage ? 'xl:grid-cols-2' : 'xl:grid-cols-3',
props.workspacePage && '2xl:grid-cols-3',
// Visibility rules
'sm:[&>*:nth-child(n+3)]:hidden',
'lg:[&>*:nth-child(n+2)]:hidden',
'xl:[&>*:nth-child(n+2)]:block',
'xl:[&>*:nth-child(n+3)]:hidden',
'2xl:[&>*:nth-child(n+2)]:block',
props.workspacePage && 'lg:[&>*:nth-child(n+2)]:hidden',
props.workspacePage && 'xl:[&>*:nth-child(n+2)]:block',
!props.workspacePage && 'xl:[&>*:nth-child(n+3)]:block',
props.workspacePage && '2xl:[&>*:nth-child(n+2)]:block',
'2xl:[&>*:nth-child(n+3)]:block'
])
</script>
2 changes: 1 addition & 1 deletion packages/frontend-2/components/workspace/ProjectList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</section>

<template v-else-if="projects?.items?.length">
<ProjectsDashboardFilled :projects="projects" />
<ProjectsDashboardFilled :projects="projects" workspace-page />
<InfiniteLoading :settings="{ identifier }" @infinite="onInfiniteLoad" />
</template>

Expand Down

0 comments on commit f69210d

Please sign in to comment.