You've already forked obsidian-visualiser
Project list and starting editing
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
<div v-else class="loading"></div>
|
||||
</div>
|
||||
</Teleport>
|
||||
<NuxtLink :to="path" :class="class" noPrefetch @mouseenter="(e) => showPreview(e, true)" @mouseleave="hidePreview">
|
||||
<NuxtLink :to="{ path, force: true }" :class="class" noPrefetch @mouseenter="(e) => showPreview(e, true)" @mouseleave="hidePreview">
|
||||
<slot v-bind="$attrs"></slot>
|
||||
</NuxtLink>
|
||||
</template>
|
||||
@@ -74,22 +74,30 @@ if (parseURL(props.href).protocol !== undefined)
|
||||
let id = ref(props.project);
|
||||
if(id.value === undefined)
|
||||
{
|
||||
id = useProject().id;
|
||||
id.value = useProject().id.value;
|
||||
}
|
||||
|
||||
const { data: page, status, error, execute } = await useLazyFetch(`/api/project/${id.value}/file`, {
|
||||
query: {
|
||||
search: "%" + parseURL(props.href).pathname,
|
||||
}
|
||||
},
|
||||
immediate: false,
|
||||
dedupe: 'defer',
|
||||
});
|
||||
|
||||
if(external.value)
|
||||
if(!external.value)
|
||||
{
|
||||
execute();
|
||||
await execute();
|
||||
}
|
||||
|
||||
if(status.value === 'error')
|
||||
{
|
||||
console.error(error.value);
|
||||
}
|
||||
|
||||
if (page.value && page.value[0])
|
||||
{
|
||||
path.value = `/explorer/${id.value}${page.value[0].path}`;
|
||||
console.log(path.value);
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user