Files
speckle-server/packages/frontend-2/lib/core/composables/server.ts
T
Kristaps Fabians Geikins 069f64afc9 feat(fe1 & fe2): guest role (#1768)
* feat: user guest role switching in FE1

* removed stream create buttons

* fe1 done

* fe1 - specifying role in invite dialogs

* fe1 - bulk invites

* WIP FE2 changes

* fe1: allow role select condition fixes

* xtra limitations on createForOnboarding

* more invite creation validations

* no longer able to set guest as project owner in invite

* preparations for server role select in invite dialog

* team management dialog done

* server invite dialog updated

* hiding invite dialog

* fixed mocks
2023-08-24 09:30:09 +02:00

30 lines
640 B
TypeScript

import { useQuery } from '@vue/apollo-composable'
import { graphql } from '~~/lib/common/generated/gql'
const serverInfoQuery = graphql(`
query MainServerInfoData {
serverInfo {
adminContact
blobSizeLimitBytes
canonicalUrl
company
description
guestModeEnabled
inviteOnly
name
termsOfService
version
}
}
`)
export function useServerInfo() {
const { result } = useQuery(serverInfoQuery)
const serverInfo = computed(() => result.value?.serverInfo)
const isGuestMode = computed(() => !!serverInfo.value?.guestModeEnabled)
return { serverInfo, isGuestMode }
}