The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
update device icons
Steven Tey350539ff72c4
diff --git a/apps/web/ui/analytics/device-icon.tsx b/apps/web/ui/analytics/device-icon.tsxindex 7cd0f0ada5..ba8275f16e 100644--- a/apps/web/ui/analytics/device-icon.tsx+++ b/apps/web/ui/analytics/device-icon.tsx@@ -1,6 +1,14 @@import { DeviceTabs } from "@/lib/analytics/types";import { Apple, Chrome, Safari } from "@/ui/shared/icons/devices";import { BlurImage } from "@dub/ui";+import {+ Desktop,+ GamingConsole,+ MobilePhone,+ TV,+ Tablet,+ Watch,+} from "@dub/ui/src/icons";export default function DeviceIcon({display,@@ -12,20 +20,22 @@ export default function DeviceIcon({className: string;}) {if (tab === "devices") {- return (- <BlurImage- src={- display === "Desktop"- ? `https://faisalman.github.io/ua-parser-js/images/types/default.png`- : `https://faisalman.github.io/ua-parser-js/images/types/${display.toLowerCase()}.png`- }- alt={display}- width={20}- height={20}- sizes="10vw"- className={className}- />- );+ switch (display) {+ case "Desktop":+ return <Desktop className={className} />;+ case "Mobile":+ return <MobilePhone className={className} />;+ case "Tablet":+ return <Tablet className={className} />;+ case "Wearable":+ return <Watch className={className} />;+ case "Console":+ return <GamingConsole className={className} />;+ case "Smarttv":+ return <TV className={className} />;+ default:+ return <Desktop className={className} />;+ }} else if (tab === "browsers") {if (display === "Chrome") {return <Chrome className={className} />;diff --git a/packages/ui/src/icons/nucleo/desktop.tsx b/packages/ui/src/icons/nucleo/desktop.tsxnew file mode 100644index 0000000000..dc31b67703--- /dev/null+++ b/packages/ui/src/icons/nucleo/desktop.tsx@@ -0,0 +1,24 @@+import { SVGProps } from "react";++export function Desktop(props: SVGProps<SVGSVGElement>) {+ return (+ <svg+ height="18"+ width="18"+ viewBox="0 0 18 18"+ xmlns="http://www.w3.org/2000/svg"+ {...props}+ >+ <g fill="currentColor">+ <path+ d="M12.476,15.535c-.887-.279-1.803-.445-2.726-.504v-1.781c0-.414-.336-.75-.75-.75s-.75,.336-.75,.75v1.781c-.923,.06-1.839,.225-2.726,.504-.395,.125-.614,.545-.489,.941,.124,.394,.541,.612,.94,.49,1.958-.617,4.087-.618,6.049,0,.075,.023,.151,.035,.226,.035,.319,0,.614-.205,.716-.525,.124-.395-.096-.816-.49-.94Z"+ fill="#212121"+ />+ <path+ d="M14.25,14H3.75c-1.517,0-2.75-1.233-2.75-2.75V4.75c0-1.517,1.233-2.75,2.75-2.75H14.25c1.517,0,2.75,1.233,2.75,2.75v6.5c0,1.517-1.233,2.75-2.75,2.75ZM3.75,3.5c-.689,0-1.25,.561-1.25,1.25v6.5c0,.689,.561,1.25,1.25,1.25H14.25c.689,0,1.25-.561,1.25-1.25V4.75c0-.689-.561-1.25-1.25-1.25H3.75Z"+ fill="#212121"+ />+ </g>+ </svg>+ );+}diff --git a/packages/ui/src/icons/nucleo/gaming-console.tsx b/packages/ui/src/icons/nucleo/gaming-console.tsxnew file mode 100644index 0000000000..8bf470febe--- /dev/null+++ b/packages/ui/src/icons/nucleo/gaming-console.tsx@@ -0,0 +1,41 @@+import { SVGProps } from "react";++export function GamingConsole(props: SVGProps<SVGSVGElement>) {+ return (+ <svg+ height="18"+ width="18"+ viewBox="0 0 18 18"+ xmlns="http://www.w3.org/2000/svg"+ {...props}+ >+ <g fill="currentColor">+ <circle cx="10.25" cy="7.5" fill="currentColor" r=".75" stroke="none" />+ <circle cx="13.25" cy="7.5" fill="currentColor" r=".75" stroke="none" />+ <circle+ cx="11.75"+ cy="6.25"+ fill="currentColor"+ r=".75"+ stroke="none"+ />+ <circle+ cx="11.75"+ cy="8.75"+ fill="currentColor"+ r=".75"+ stroke="none"+ />+ <circle cx="6" cy="7.5" fill="currentColor" r="1" stroke="none" />+ <path+ d="M9,11.25h2.752c.533,0,1.044,.213,1.419,.591l2.392,2.409s1.745-.34,1.388-2.915-2.07-6.538-2.07-6.538c-.429-.867-1.022-1.047-3.231-1.047h-2.651s-2.651,0-2.651,0c-2.209,0-2.802,.179-3.231,1.047,0,0-1.714,3.963-2.07,6.538s1.388,2.915,1.388,2.915l2.392-2.409c.375-.378,.886-.591,1.419-.591h2.752Z"+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ />+ </g>+ </svg>+ );+}diff --git a/packages/ui/src/icons/nucleo/index.ts b/packages/ui/src/icons/nucleo/index.tsindex 63645e9884..c57fb83ed7 100644--- a/packages/ui/src/icons/nucleo/index.ts+++ b/packages/ui/src/icons/nucleo/index.ts@@ -1,8 +1,10 @@export * from "./crosshairs";export * from "./cube";export * from "./cursor-rays";+export * from "./desktop";export * from "./download";export * from "./flag-wavy";+export * from "./gaming-console";export * from "./globe";export * from "./hyperlink";export * from "./invoice-dollar";@@ -10,5 +12,8 @@ export * from "./mobile-phone";export * from "./office-building";export * from "./qrcode";export * from "./referred-via";+export * from "./tablet";export * from "./tag";+export * from "./tv";+export * from "./watch";export * from "./window";diff --git a/packages/ui/src/icons/nucleo/tablet.tsx b/packages/ui/src/icons/nucleo/tablet.tsxnew file mode 100644index 0000000000..46bede121e--- /dev/null+++ b/packages/ui/src/icons/nucleo/tablet.tsx@@ -0,0 +1,38 @@+import { SVGProps } from "react";++export function Tablet(props: SVGProps<SVGSVGElement>) {+ return (+ <svg+ height="18"+ width="18"+ viewBox="0 0 18 18"+ xmlns="http://www.w3.org/2000/svg"+ {...props}+ >+ <g fill="currentColor">+ <path+ d="M7,14.25h-2.25c-1.105,0-2-.895-2-2V3.75c0-1.105,.895-2,2-2h6.5c1.105,0,2,.895,2,2v1.25"+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ />+ <rect+ height="5.5"+ width="8.5"+ fill="none"+ rx="1.5"+ ry="1.5"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ transform="translate(24.5 -.5) rotate(90)"+ x="8.25"+ y="9.25"+ />+ </g>+ </svg>+ );+}diff --git a/packages/ui/src/icons/nucleo/tv.tsx b/packages/ui/src/icons/nucleo/tv.tsxnew file mode 100644index 0000000000..eb63e0fb4d--- /dev/null+++ b/packages/ui/src/icons/nucleo/tv.tsx@@ -0,0 +1,37 @@+import { SVGProps } from "react";++export function TV(props: SVGProps<SVGSVGElement>) {+ return (+ <svg+ height="18"+ width="18"+ viewBox="0 0 18 18"+ xmlns="http://www.w3.org/2000/svg"+ {...props}+ >+ <g fill="currentColor">+ <rect+ height="9.5"+ width="14.5"+ fill="none"+ rx="2"+ ry="2"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x="1.75"+ y="2.75"+ />+ <path+ d="M13.25,15.5c-.924-.337-2.4-.75-4.25-.75s-3.326,.413-4.25,.75"+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ />+ </g>+ </svg>+ );+}diff --git a/packages/ui/src/icons/nucleo/watch.tsx b/packages/ui/src/icons/nucleo/watch.tsxnew file mode 100644index 0000000000..1cd477b6ec--- /dev/null+++ b/packages/ui/src/icons/nucleo/watch.tsx@@ -0,0 +1,59 @@+import { SVGProps } from "react";++export function Watch(props: SVGProps<SVGSVGElement>) {+ return (+ <svg+ height="18"+ width="18"+ viewBox="0 0 18 18"+ xmlns="http://www.w3.org/2000/svg"+ {...props}+ >+ <g fill="currentColor">+ <rect+ height="9.5"+ width="10.5"+ fill="none"+ rx="2"+ ry="2"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x="3.75"+ y="4.25"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="12"+ x2="6"+ y1="1.75"+ y2="1.75"+ />+ <line+ fill="none"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ x1="12"+ x2="6"+ y1="16.25"+ y2="16.25"+ />+ <polyline+ fill="none"+ points="9 6.75 9 9 11.25 10.5"+ stroke="currentColor"+ strokeLinecap="round"+ strokeLinejoin="round"+ strokeWidth="1.5"+ />+ </g>+ </svg>+ );+}