Add button to navigate to a note

This commit is contained in:
Joscha 2025-02-11 19:47:10 +01:00
parent 369839912f
commit 5bc62d12f4

View file

@ -5,6 +5,7 @@ import { useUiStore } from "@/stores/ui";
import {
RiAddLine,
RiArrowDownSLine,
RiArrowRightDoubleLine,
RiArrowRightSLine,
RiCornerUpRightLine,
RiEditLine,
@ -129,6 +130,10 @@ function onCreateEditorFinish(text: string): void {
onCreateEditorClose();
}
function onMoveButtonClick(): void {
ui.anchorId = props.segment.id;
}
</script>
<template>
@ -187,6 +192,13 @@ function onCreateEditorFinish(text: string): void {
<RiPushpinFill v-if="pinned" size="16px" />
<RiPushpinLine v-else size="16px" />
</CNoteButton>
<CNoteButton
:visible="hover"
:disabled="ui.anchorId == segment.id"
@click.stop="onMoveButtonClick"
>
<RiArrowRightDoubleLine size="16px" />
</CNoteButton>
</div>
</div>