Skip to content

Commit 1bbb83d

Browse files
committed
Fix search and add quick actions for terms and privacy
1 parent f63ad9a commit 1bbb83d

2 files changed

Lines changed: 22 additions & 4 deletions

File tree

components/cmd/CommandMenu.vue

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,24 @@ const rawNavigationActions = [
300300
window.open("https://docs.celenium.io", "_blank")
301301
},
302302
},
303+
{
304+
type: "callback",
305+
icon: "arrow-narrow-right",
306+
title: "Read Privacy Policy",
307+
runText: "Open Privacy Policy",
308+
callback: () => {
309+
router.push("/privacy-policy")
310+
},
311+
},
312+
{
313+
type: "callback",
314+
icon: "arrow-narrow-right",
315+
title: "Read Terms of Use",
316+
runText: "Open Terms of Use",
317+
callback: () => {
318+
router.push("/terms-of-use")
319+
},
320+
},
303321
]
304322
const navigationGroup = computed(() => {
305323
const actions = rawNavigationActions.map((a) => ({ id: id(), ...a }))

components/modules/navigation/Search.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,13 @@ const getResultMetadata = (target) => {
118118
watch(
119119
() => results.value,
120120
() => {
121-
if (results.value.length) show.value = true
121+
if (results.value?.length) show.value = true
122122
},
123123
)
124124
125125
const handleSelect = () => {
126126
show.value = false
127-
results.value.length = []
127+
results.value = []
128128
searchTerm.value = ""
129129
}
130130
</script>
@@ -147,8 +147,8 @@ const handleSelect = () => {
147147
</Flex>
148148
149149
<Transition name="fastfade">
150-
<Flex v-if="show && results.length" @click="handleSelect" direction="column" gap="6" :class="$style.popup">
151-
<template v-if="results.length">
150+
<Flex v-if="show && results?.length" @click="handleSelect" direction="column" gap="6" :class="$style.popup">
151+
<template v-if="results?.length">
152152
<Text size="12" weight="600" color="tertiary">Results</Text>
153153
154154
<Flex direction="column">

0 commit comments

Comments
 (0)