You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
<script setup lang="ts">
|
|
|
|
import '~/assets/js/typesense-docsearch'
|
|
|
|
declare const docsearch: any;
|
|
|
|
|
|
|
|
const modalEl = ref<HTMLElement | null>(null)
|
|
|
|
const { user } = useGlobal()
|
|
|
|
|
|
|
|
watch(user, () => {
|
|
|
|
window.doc_enabled = !!user.value
|
|
|
|
})
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
docsearch({
|
|
|
|
container: '#searchbar',
|
|
|
|
typesenseCollectionName: 'nocodb-oss-docs-index',
|
|
|
|
typesenseServerConfig: {
|
|
|
|
nodes: [
|
|
|
|
{
|
|
|
|
host: 'rqf5uvajyeczwt3xp-1.a1.typesense.net',
|
|
|
|
port: 443,
|
|
|
|
protocol: 'https',
|
|
|
|
},
|
|
|
|
],
|
|
|
|
apiKey: 'lNKDTZdJrE76Sg8WEyeN9mXT29l1xq7Q',
|
|
|
|
},
|
|
|
|
typesenseSearchParameters: {
|
|
|
|
// Optional.
|
|
|
|
},
|
|
|
|
})
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<template>
|
|
|
|
<div id="searchbar" :ref="modalEl" class="hidden"></div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<style></style>
|