From 0754f3e0dd320826dfb7de4b0b2bf578bac9d4da Mon Sep 17 00:00:00 2001 From: pheralb Date: Mon, 26 Aug 2024 16:50:17 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9A=99=EF=B8=8F=20Update=20icons=20alias=20&?= =?UTF-8?q?=20create=20raycast=20warning=20message?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/copySvg.svelte | 2 +- src/components/headerLogoLink.svelte | 75 ++++++++++++++++++++++++++++ src/components/navbar.svelte | 18 ++----- src/components/warningRaycast.svelte | 49 ++++++++++++++++++ src/routes/+layout.svelte | 4 +- 5 files changed, 132 insertions(+), 16 deletions(-) create mode 100644 src/components/headerLogoLink.svelte create mode 100644 src/components/warningRaycast.svelte diff --git a/src/components/copySvg.svelte b/src/components/copySvg.svelte index c1cabb6..32c8651 100644 --- a/src/components/copySvg.svelte +++ b/src/components/copySvg.svelte @@ -12,7 +12,7 @@ import { copyToClipboard as figmaCopyToClipboard } from '@/figma/copy-to-clipboard'; import { buttonStyles } from '@/ui/styles'; import { cn } from '@/utils/cn'; - import ReactIcon from './reactIcon.svelte'; + import ReactIcon from './icons/reactIcon.svelte'; // Props: export let iconSize = 24; diff --git a/src/components/headerLogoLink.svelte b/src/components/headerLogoLink.svelte new file mode 100644 index 0000000..cd2e943 --- /dev/null +++ b/src/components/headerLogoLink.svelte @@ -0,0 +1,75 @@ + + + + + +
+ + + +
+
+
+ + copyToClipboard()}> + + Copy as SVG + + convertSvgReactComponent(false)}> + + Copy as React JSX Component + + convertSvgReactComponent(true)}> + + Copy as React TSX Component + + +
diff --git a/src/components/navbar.svelte b/src/components/navbar.svelte index 09fa689..d1c4b4f 100644 --- a/src/components/navbar.svelte +++ b/src/components/navbar.svelte @@ -2,12 +2,13 @@ export let currentPath: string; import { cn } from '@/utils/cn'; - import Logo from './logo.svelte'; + import Logo from './icons/logo.svelte'; import Theme from './theme.svelte'; import { ArrowUpRight, CloudyIcon } from 'lucide-svelte'; - import XIcon from './xIcon.svelte'; - import GithubIcon from './githubIcon.svelte'; + import XIcon from './icons/xIcon.svelte'; + import GithubIcon from './icons/githubIcon.svelte'; + import HeaderLogoLink from './headerLogoLink.svelte'; const externalLinks = [ { @@ -42,17 +43,8 @@ 'backdrop-blur-md dark:bg-neutral-900/90 bg-white/90' )} > -
- +
+ import { browser } from '$app/environment'; + import { buttonStyles } from '@/ui/styles'; + import { cn } from '@/utils/cn'; + import RaycastIcon from './icons/raycastIcon.svelte'; + import { ArrowUpLeft, ArrowUpRight, X } from 'lucide-svelte'; + import XIcon from './icons/xIcon.svelte'; + + let warning = false; + let warningName = 'svgl_warning_raycast_message'; + const initialValue = browser ? window.localStorage.getItem(warningName) : true; + + +{#if !warning && !initialValue} +
+
+ +

+ Update your Raycast extension to the latest version to use the new SVGL API. +

+
+
+ + + How to update + + + +
+
+{/if} diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 940052b..b593a9c 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -30,7 +30,7 @@ // Layout: import Navbar from '@/components/navbar.svelte'; - import WarningNewApi from '@/components/warningNewApi.svelte'; + import WarningRaycast from '@/components/warningRaycast.svelte'; @@ -88,7 +88,7 @@
- +