83d8035dc2
* root + server * frontend * frontend-2 * dui3 * dui3 * tailwind theme * ui-components * preview service * viewer * viewer-sandbox * fileimport-service * webhook service * objectloader * shared * ui-components-nuxt * WIP full config * WIP full linter * eslint projectwide util * minor fix * removing redundant ci * clean up test errors * fixed prettier formatting * CI improvements * TSC lint fix * 'buildBatch' needs to be async since some batch types (like Text) require it. Removed a disabled liniting rule from ObjLoader * removed unnecessary void --------- Co-authored-by: AlexandruPopovici <alexandrupopoviciioan@gmail.com>
54 lines
1.5 KiB
Vue
54 lines
1.5 KiB
Vue
<template>
|
|
<div>
|
|
<div class="flex justify-between items-center mb-8">
|
|
<h1 class="block h4 font-bold">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>
|