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