You've already forked obsidian-visualiser
Graph + Private indicator for navigation + ProseA search improvement
This commit is contained in:
@@ -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>
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user