Skip to content

Commit

Permalink
fix(fe2): Only show banners on dashboard (#2766)
Browse files Browse the repository at this point in the history
* Add 2024 specklecon banners

* Only show in Dashboard
  • Loading branch information
andrewwallacespeckle authored Aug 27, 2024
1 parent 2181130 commit 27bc4b2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
23 changes: 0 additions & 23 deletions packages/frontend-2/components/projects/DashboardHeader.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<template>
<div>
<PromoBannersWrapper v-if="promoBanners.length" :banners="promoBanners" />
<div class="bg-foundation divide-y divide-outline-3 mb-8 empty:mb-0">
<ProjectsInviteBanners
v-if="projectsInvites?.projectInvites?.length"
Expand All @@ -22,9 +21,6 @@ import type {
ProjectsDashboardHeaderProjects_UserFragment,
ProjectsDashboardHeaderWorkspaces_UserFragment
} from '~/lib/common/generated/gql/graphql'
import type { PromoBanner } from '~/lib/promo-banners/types'
import submitImage from '~/assets/images/banners/submit.gif'
import earlybirdImage from '~/assets/images/banners/earlybird.gif'
graphql(`
fragment ProjectsDashboardHeaderProjects_User on User {
Expand All @@ -42,23 +38,4 @@ defineProps<{
projectsInvites?: ProjectsDashboardHeaderProjects_UserFragment
workspacesInvites?: ProjectsDashboardHeaderWorkspaces_UserFragment
}>()
const promoBanners = ref<PromoBanner[]>([
{
primaryText: 'Specklecon - Submit your proposal',
url: 'https://conf.speckle.systems/',
priority: 1,
expiryDate: '2024-09-02',
image: submitImage,
isBackgroundImage: true
},
{
primaryText: 'Specklecon - Early Bird Tickets',
url: 'https://conf.speckle.systems/',
priority: 2,
expiryDate: '2024-09-15',
image: earlybirdImage,
isBackgroundImage: true
}
])
</script>
23 changes: 23 additions & 0 deletions packages/frontend-2/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<Portal to="navigation">
<HeaderNavLink :to="homeRoute" name="Dashboard" hide-chevron :separator="false" />
</Portal>
<PromoBannersWrapper v-if="promoBanners.length" :banners="promoBanners" />
<ProjectsDashboardHeader
:projects-invites="projectsResult?.activeUser || undefined"
:workspaces-invites="workspacesResult?.activeUser || undefined"
Expand Down Expand Up @@ -68,6 +69,9 @@ import type { ManagerExtension } from '~~/lib/common/utils/downloadManager'
import { downloadManager } from '~~/lib/common/utils/downloadManager'
import { ToastNotificationType, useGlobalToast } from '~~/lib/common/composables/toast'
import type { LayoutDialogButton } from '@speckle/ui-components'
import type { PromoBanner } from '~/lib/promo-banners/types'
import submitImage from '~/assets/images/banners/submit.gif'
import earlybirdImage from '~/assets/images/banners/earlybird.gif'
useHead({ title: 'Dashboard' })
Expand Down Expand Up @@ -181,4 +185,23 @@ const onDownloadManager = (extension: ManagerExtension) => {
})
}
}
const promoBanners = ref<PromoBanner[]>([
{
primaryText: 'Specklecon - Submit your proposal',
url: 'https://conf.speckle.systems/',
priority: 1,
expiryDate: '2024-09-02',
image: submitImage,
isBackgroundImage: true
},
{
primaryText: 'Specklecon - Early Bird Tickets',
url: 'https://conf.speckle.systems/',
priority: 2,
expiryDate: '2024-09-15',
image: earlybirdImage,
isBackgroundImage: true
}
])
</script>

0 comments on commit 27bc4b2

Please sign in to comment.