diff --git a/web/src/components/buttons/ActionButton.svelte b/web/src/components/buttons/ActionButton.svelte new file mode 100644 index 00000000..13c126bf --- /dev/null +++ b/web/src/components/buttons/ActionButton.svelte @@ -0,0 +1,10 @@ + + + diff --git a/web/src/components/save/Omnibox.svelte b/web/src/components/save/Omnibox.svelte index 5926135b..7ec197e4 100644 --- a/web/src/components/save/Omnibox.svelte +++ b/web/src/components/save/Omnibox.svelte @@ -3,6 +3,11 @@ import DownloadButton from './buttons/DownloadButton.svelte'; import ClearButton from './buttons/ClearButton.svelte'; + import ActionButton from '../buttons/ActionButton.svelte'; + + import IconClipboard from '$lib/icons/Clipboard.svelte'; + import IconMusic from '$lib/icons/Music.svelte'; + import IconSparkles from '$lib/icons/Sparkles.svelte'; let link: string = ""; let isFocused = false; @@ -14,6 +19,15 @@ return false } } + + const pasteClipboard = () => { + navigator.clipboard.readText().then(text => { + let matchLink = text.match(/https:\/\/[^\s]+/g); + if (matchLink) { + link = matchLink[0]; + } + }); + }