069f64afc9
* 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
30 lines
640 B
TypeScript
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 }
|
|
}
|