mirror of https://github.com/logseq/logseq
wip: move paste as link to context menu
parent
08affcb19d
commit
da4e945529
|
@ -164,6 +164,19 @@ export const ContextMenu = observer(function ContextMenu({
|
|||
</span>
|
||||
</div>
|
||||
</ReactContextMenu.Item>
|
||||
{app.selectedShapes?.size === 1 && (
|
||||
<ReactContextMenu.Item
|
||||
className="tl-menu-item"
|
||||
onClick={() => runAndTransition(() => app.paste(undefined, true))}
|
||||
>
|
||||
Paste as link
|
||||
<div className="tl-menu-right-slot">
|
||||
<span className="keyboard-shortcut">
|
||||
<code>{MOD_KEY}</code> <code>⇧</code> <code>V</code>
|
||||
</span>
|
||||
</div>
|
||||
</ReactContextMenu.Item>
|
||||
)}
|
||||
<ReactContextMenu.Separator className="menu-separator" />
|
||||
<ReactContextMenu.Item
|
||||
className="tl-menu-item"
|
||||
|
|
|
@ -144,23 +144,14 @@ export const ShapeLinksInput = observer(function ShapeLinksInput({
|
|||
<div className="h-2" />
|
||||
|
||||
{canAddLink && (
|
||||
<>
|
||||
<LogseqQuickSearch
|
||||
style={{
|
||||
width: 'calc(100% - 46px)',
|
||||
marginLeft: '46px',
|
||||
}}
|
||||
placeholder="Start typing to search..."
|
||||
onChange={addNewRef}
|
||||
/>
|
||||
<div className="h-2" />
|
||||
<div className="text-center">
|
||||
<span className="opacity-50 mr-1">Paste from clipboard with</span>
|
||||
<span className="keyboard-shortcut">
|
||||
<code>{MOD_KEY}</code> <code>⇧</code> <code>V</code>
|
||||
</span>
|
||||
</div>
|
||||
</>
|
||||
<LogseqQuickSearch
|
||||
style={{
|
||||
width: 'calc(100% - 46px)',
|
||||
marginLeft: '46px',
|
||||
}}
|
||||
placeholder="Start typing to search..."
|
||||
onChange={addNewRef}
|
||||
/>
|
||||
)}
|
||||
|
||||
{refs.length > 0 && (
|
||||
|
|
Loading…
Reference in New Issue