Graph + Private indicator for navigation + ProseA search improvement

This commit is contained in:
2024-09-04 17:50:03 +02:00
parent 6d3efea784
commit 85c8fbae0f
6 changed files with 32 additions and 10 deletions

View File

@@ -34,7 +34,8 @@ const props = defineProps({
const route = useRoute();
const { hash, pathname, protocol } = parseURL(props.href);
const project = computed(() => parseInt(Array.isArray(route.params.projectId) ? '0' : route.params.projectId));
const { data, status } = await useFetch(`/api/project/${project.value}/file`, {
const { data, status, execute } = await useFetch(`/api/project/${project.value}/file`, {
method: 'GET',
query: {
search: `%${pathname}`
@@ -43,5 +44,11 @@ const { data, status } = await useFetch(`/api/project/${project.value}/file`, {
key: `file:${project.value}:%${pathname}`,
dedupe: 'defer',
ignoreResponseError: true,
immediate: false,
});
if(pathname && !protocol)
{
execute();
}
</script>

View File

@@ -1,5 +1,5 @@
<template>
<span class="cursor-default bg-accent-blue bg-opacity-10 hover:bg-opacity-20 text-accent-blue text-sm px-1 ms-1 pb-0.5 rounded-full rounded-se-none border border-accent-blue border-opacity-30">
#<slot></slot>
<span class="before:content-['#'] cursor-default bg-accent-blue bg-opacity-10 hover:bg-opacity-20 text-accent-blue text-sm px-1 ms-1 pb-0.5 rounded-full rounded-se-none border border-accent-blue border-opacity-30">
<slot></slot>
</span>
</template>