From bf26988cde771e1b4c41a3cfac71cc9b85b6cb72 Mon Sep 17 00:00:00 2001 From: wukko Date: Sat, 15 Jun 2024 20:39:34 +0600 Subject: [PATCH] web/save: add paste button & dummy mode buttons tuned default button look, moved custom icons to lib for easy access --- .../components/buttons/ActionButton.svelte | 10 ++++ web/src/components/save/Omnibox.svelte | 46 +++++++++++++++++++ .../save/buttons/DownloadButton.svelte | 3 ++ web/src/components/sidebar/CobaltLogo.svelte | 9 ++-- web/src/lib/icons/Clipboard.svelte | 11 +++++ web/src/lib/icons/Cobalt.svelte | 4 ++ web/src/lib/icons/Music.svelte | 5 ++ web/src/lib/icons/Sparkles.svelte | 5 ++ web/src/routes/+layout.svelte | 18 +++++--- 9 files changed, 101 insertions(+), 10 deletions(-) create mode 100644 web/src/components/buttons/ActionButton.svelte create mode 100644 web/src/lib/icons/Clipboard.svelte create mode 100644 web/src/lib/icons/Cobalt.svelte create mode 100644 web/src/lib/icons/Music.svelte create mode 100644 web/src/lib/icons/Sparkles.svelte 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]; + } + }); + }
@@ -44,6 +58,29 @@ {/if}
+
+
+ + + + + + +
+ + + +
diff --git a/web/src/components/save/buttons/DownloadButton.svelte b/web/src/components/save/buttons/DownloadButton.svelte index a9b09945..6e2f004c 100644 --- a/web/src/components/save/buttons/DownloadButton.svelte +++ b/web/src/components/save/buttons/DownloadButton.svelte @@ -17,7 +17,10 @@ border-radius: 0; padding: 0 12px; + background: none; + box-shadow: none; + transform: none; border-left: 1px var(--gray) solid; border-top-right-radius: 11px; diff --git a/web/src/components/sidebar/CobaltLogo.svelte b/web/src/components/sidebar/CobaltLogo.svelte index 9cb25ff2..891da1da 100644 --- a/web/src/components/sidebar/CobaltLogo.svelte +++ b/web/src/components/sidebar/CobaltLogo.svelte @@ -1,8 +1,9 @@ + +