Files
speckle-server/packages/frontend-2/components/project/page/discussions/Header.vue
T
andrewwallacespeckle c2a95b484f refactor(ui-components): define and use new font styles (#2524)
* New Text Styles. Initial FE2 changes

* More fe2 styling classes

* Minor update

* Minor update

* Fix build

* More updates for discussion

* More styling updates

* Minor updates to inputs

* More text updates

* More font class swapping

* Revert dui3 changes

* Confirmed Lineheights

* Add story files for new text styles

* Minor copy changes

* Minor typo

* andrew/web-1371-misalignment-in-account-dropdown

* andrew/web-1374-settings-text-styles-are-not-right

* andrew/web-1375-nav-texts-should-be-14px

* andrew/web-1376-decrease-size-of-versions-header

* andrew/web-1377-version-card-title

* semibold>medium

* Measure mode

* Changes from PR

* Tweaked nav menu

* Revert prose change. Add prose-sm

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2024-07-30 15:06:48 +01:00

54 lines
1.5 KiB
Vue

<template>
<div>
<div class="flex justify-between items-center mb-8">
<h1 class="block text-heading-xl">Discussions</h1>
<div class="space-x-2 flex items-center">
<FormCheckbox
:id="checkboxId"
v-model="finalIncludeArchived"
name="includeArchived"
:value="true"
label="Include resolved"
/>
<LayoutGridListToggle v-model="finalGridOrList" class="shrink-0" />
</div>
</div>
</div>
</template>
<script setup lang="ts">
import type { Optional } from '@speckle/shared'
import { graphql } from '~~/lib/common/generated/gql'
import type { ProjectDiscussionsPageHeader_ProjectFragment } from '~~/lib/common/generated/gql/graphql'
import type { GridListToggleValue } from '~~/lib/layout/helpers/components'
graphql(`
fragment ProjectDiscussionsPageHeader_Project on Project {
id
name
}
`)
const emit = defineEmits<{
(e: 'update:grid-or-list', val: GridListToggleValue): void
(e: 'update:include-archived', val: boolean): void
}>()
const props = defineProps<{
project: ProjectDiscussionsPageHeader_ProjectFragment
includeArchived: Optional<true>
gridOrList: GridListToggleValue
}>()
const finalGridOrList = computed({
get: () => props.gridOrList,
set: (newVal) => emit('update:grid-or-list', newVal)
})
const finalIncludeArchived = computed({
get: () => props.includeArchived,
set: (newVal) => emit('update:include-archived', newVal)
})
const checkboxId = useId()
</script>