Skip to content

Commit 62cbd00

Browse files
committed
Merge branch 'staging'
2 parents 36fe1f2 + d93feb8 commit 62cbd00

File tree

33 files changed

+1636
-1136
lines changed

33 files changed

+1636
-1136
lines changed

.github/workflows/docker-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ jobs:
163163
VERSION=${{ steps.version.outputs.tag }}
164164
BUILD_DATE=${{ steps.builddate.outputs.timestamp }}
165165
GIT_SHA=${{ github.sha }}
166-
cache-from: type=gha,scope=${{ matrix.service }}-${{ matrix.platform.arch }}
167-
cache-to: type=gha,mode=max,scope=${{ matrix.service }}-${{ matrix.platform.arch }}
166+
cache-from: type=registry,ref=${{ env.IMAGE_PREFIX }}-${{ matrix.service }}:cache-${{ matrix.platform.arch }}
167+
cache-to: type=registry,ref=${{ env.IMAGE_PREFIX }}-${{ matrix.service }}:cache-${{ matrix.platform.arch }},mode=max
168168

169169
- name: Scan image for vulnerabilities
170170
if: always() && steps.build.outcome != 'cancelled'

apps/api/src/ai/tools/links.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,12 @@ export function createLinksTools() {
9393
ogDescription: z.string().max(500).optional(),
9494
ogImageUrl: z.string().url().optional(),
9595
externalId: z.string().max(255).optional(),
96+
deepLinkApp: z
97+
.string()
98+
.optional()
99+
.describe(
100+
"App ID for deep linking (instagram, tiktok, youtube, x, spotify, linkedin, facebook, whatsapp, telegram). On mobile, opens the native app."
101+
),
96102
confirmed: z.boolean().describe("false=preview, true=apply"),
97103
}),
98104
execute: async (
@@ -107,6 +113,7 @@ export function createLinksTools() {
107113
ogDescription,
108114
ogImageUrl,
109115
externalId,
116+
deepLinkApp,
110117
confirmed,
111118
},
112119
options
@@ -151,6 +158,7 @@ export function createLinksTools() {
151158
ogDescription: ogDescription ?? null,
152159
ogImageUrl: ogImageUrl ?? null,
153160
externalId: externalId ?? null,
161+
deepLinkApp: deepLinkApp ?? null,
154162
},
155163
context
156164
)) as LinkData;
@@ -184,6 +192,7 @@ export function createLinksTools() {
184192
ogDescription: z.string().max(500).nullable().optional(),
185193
ogImageUrl: z.string().url().nullable().optional(),
186194
externalId: z.string().max(255).nullable().optional(),
195+
deepLinkApp: z.string().nullable().optional(),
187196
confirmed: z.boolean().describe("false=preview, true=apply"),
188197
}),
189198
execute: async ({ id, websiteId, confirmed, ...updates }, options) => {

apps/dashboard/app/(dby)/dby/l/[slug]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ async function getLinkBySlug(slug: string): Promise<CachedLink | null> {
2929
ogVideoUrl: true,
3030
iosUrl: true,
3131
androidUrl: true,
32+
deepLinkApp: true,
3233
},
3334
});
3435

apps/dashboard/app/(main)/design/_components/design-showcase.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ export function DesignShowcase() {
431431
title="Accordion"
432432
>
433433
<div className="space-y-2">
434-
<div className="rounded-md border">
434+
<div className="overflow-hidden rounded-md border">
435435
<Accordion defaultOpen>
436436
<Accordion.Trigger>
437437
<Text variant="label">Permissions</Text>
@@ -448,7 +448,7 @@ export function DesignShowcase() {
448448
</Accordion.Content>
449449
</Accordion>
450450
</div>
451-
<div className="rounded-md border">
451+
<div className="overflow-hidden rounded-md border">
452452
<Accordion>
453453
<Accordion.Trigger>
454454
<Text variant="label">Advanced settings</Text>
@@ -461,7 +461,7 @@ export function DesignShowcase() {
461461
</Accordion.Content>
462462
</Accordion>
463463
</div>
464-
<div className="rounded-md border">
464+
<div className="overflow-hidden rounded-md border">
465465
<Accordion>
466466
<Accordion.Trigger>
467467
<Text variant="label">Webhook destination</Text>

apps/dashboard/app/(main)/layout.tsx

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { FeedbackPrompt } from "@/components/feedback-prompt";
22
import { Sidebar } from "@/components/layout/sidebar";
33
import { SidebarNavigationProvider } from "@/components/layout/sidebar-navigation-provider";
44
import { BillingProvider } from "@/components/providers/billing-provider";
5+
import { SessionGuard } from "@/components/providers/session-guard";
56
import { CommandSearchProvider } from "@/components/ui/command-search";
67
import { AutumnProvider } from "autumn-js/react";
78
import { Suspense } from "react";
@@ -19,17 +20,19 @@ export default function MainLayout({
1920
<BillingProvider>
2021
<CommandSearchProvider>
2122
<SidebarNavigationProvider>
22-
<div className="flex min-h-0 flex-1 flex-col overflow-hidden text-foreground">
23-
<Suspense fallback={null}>
24-
<Sidebar />
25-
</Suspense>
26-
<div className="relative flex min-h-0 flex-1 flex-col pl-0 md:pl-76 lg:pl-84">
27-
<div className="flex min-h-0 flex-1 flex-col overflow-hidden overflow-x-hidden overscroll-none pt-12 md:pt-0">
28-
{children}
23+
<SessionGuard>
24+
<div className="flex min-h-0 flex-1 flex-col overflow-hidden text-foreground">
25+
<Suspense fallback={null}>
26+
<Sidebar />
27+
</Suspense>
28+
<div className="relative flex min-h-0 flex-1 flex-col pl-0 md:pl-76 lg:pl-84">
29+
<div className="flex min-h-0 flex-1 flex-col overflow-hidden overflow-x-hidden overscroll-none pt-12 md:pt-0">
30+
{children}
31+
</div>
2932
</div>
33+
<FeedbackPrompt />
3034
</div>
31-
<FeedbackPrompt />
32-
</div>
35+
</SessionGuard>
3336
</SidebarNavigationProvider>
3437
</CommandSearchProvider>
3538
</BillingProvider>

apps/dashboard/app/(main)/links/_components/collapsible-section.tsx

Lines changed: 0 additions & 72 deletions
This file was deleted.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
const ICONS: Record<string, { path: string; hex: string }> = {
2+
instagram: {
3+
hex: "#FF0069",
4+
path: "M7.0301.084c-1.2768.0602-2.1487.264-2.911.5634-.7888.3075-1.4575.72-2.1228 1.3877-.6652.6677-1.075 1.3368-1.3802 2.127-.2954.7638-.4956 1.6365-.552 2.914-.0564 1.2775-.0689 1.6882-.0626 4.947.0062 3.2586.0206 3.6671.0825 4.9473.061 1.2765.264 2.1482.5635 2.9107.308.7889.72 1.4573 1.388 2.1228.6679.6655 1.3365 1.0743 2.1285 1.38.7632.295 1.6361.4961 2.9134.552 1.2773.056 1.6884.069 4.9462.0627 3.2578-.0062 3.668-.0207 4.9478-.0814 1.28-.0607 2.147-.2652 2.9098-.5633.7889-.3086 1.4578-.72 2.1228-1.3881.665-.6682 1.0745-1.3378 1.3795-2.1284.2957-.7632.4966-1.636.552-2.9124.056-1.2809.0692-1.6898.063-4.948-.0063-3.2583-.021-3.6668-.0817-4.9465-.0607-1.2797-.264-2.1487-.5633-2.9117-.3084-.7889-.72-1.4568-1.3876-2.1228C21.2982 1.33 20.628.9208 19.8378.6165 19.074.321 18.2017.1197 16.9244.0645 15.6471.0093 15.236-.005 11.977.0014 8.718.0076 8.31.0215 7.0301.0839m.1402 21.6932c-1.17-.0509-1.8053-.2453-2.2287-.408-.5606-.216-.96-.4771-1.3819-.895-.422-.4178-.6811-.8186-.9-1.378-.1644-.4234-.3624-1.058-.4171-2.228-.0595-1.2645-.072-1.6442-.079-4.848-.007-3.2037.0053-3.583.0607-4.848.05-1.169.2456-1.805.408-2.2282.216-.5613.4762-.96.895-1.3816.4188-.4217.8184-.6814 1.3783-.9003.423-.1651 1.0575-.3614 2.227-.4171 1.2655-.06 1.6447-.072 4.848-.079 3.2033-.007 3.5835.005 4.8495.0608 1.169.0508 1.8053.2445 2.228.408.5608.216.96.4754 1.3816.895.4217.4194.6816.8176.9005 1.3787.1653.4217.3617 1.056.4169 2.2263.0602 1.2655.0739 1.645.0796 4.848.0058 3.203-.0055 3.5834-.061 4.848-.051 1.17-.245 1.8055-.408 2.2294-.216.5604-.4763.96-.8954 1.3814-.419.4215-.8181.6811-1.3783.9-.4224.1649-1.0577.3617-2.2262.4174-1.2656.0595-1.6448.072-4.8493.079-3.2045.007-3.5825-.006-4.848-.0608M16.953 5.5864A1.44 1.44 0 1 0 18.39 4.144a1.44 1.44 0 0 0-1.437 1.4424M5.8385 12.012c.0067 3.4032 2.7706 6.1557 6.173 6.1493 3.4026-.0065 6.157-2.7701 6.1506-6.1733-.0065-3.4032-2.771-6.1565-6.174-6.1498-3.403.0067-6.156 2.771-6.1496 6.1738M8 12.0077a4 4 0 1 1 4.008 3.9921A3.9996 3.9996 0 0 1 8 12.0077",
5+
},
6+
tiktok: {
7+
hex: "#000000",
8+
path: "M12.525.02c1.31-.02 2.61-.01 3.91-.02.08 1.53.63 3.09 1.75 4.17 1.12 1.11 2.7 1.62 4.24 1.79v4.03c-1.44-.05-2.89-.35-4.2-.97-.57-.26-1.1-.59-1.62-.93-.01 2.92.01 5.84-.02 8.75-.08 1.4-.54 2.79-1.35 3.94-1.31 1.92-3.58 3.17-5.91 3.21-1.43.08-2.86-.31-4.08-1.03-2.02-1.19-3.44-3.37-3.65-5.71-.02-.5-.03-1-.01-1.49.18-1.9 1.12-3.72 2.58-4.96 1.66-1.44 3.98-2.13 6.15-1.72.02 1.48-.04 2.96-.04 4.44-.99-.32-2.15-.23-3.02.37-.63.41-1.11 1.04-1.36 1.75-.21.51-.15 1.07-.14 1.61.24 1.64 1.82 3.02 3.5 2.87 1.12-.01 2.19-.66 2.77-1.61.19-.33.4-.67.41-1.06.1-1.79.06-3.57.07-5.36.01-4.03-.01-8.05.02-12.07z",
9+
},
10+
youtube: {
11+
hex: "#FF0000",
12+
path: "M23.498 6.186a3.016 3.016 0 0 0-2.122-2.136C19.505 3.545 12 3.545 12 3.545s-7.505 0-9.377.505A3.017 3.017 0 0 0 .502 6.186C0 8.07 0 12 0 12s0 3.93.502 5.814a3.016 3.016 0 0 0 2.122 2.136c1.871.505 9.376.505 9.376.505s7.505 0 9.377-.505a3.015 3.015 0 0 0 2.122-2.136C24 15.93 24 12 24 12s0-3.93-.502-5.814zM9.545 15.568V8.432L15.818 12l-6.273 3.568z",
13+
},
14+
x: {
15+
hex: "#000000",
16+
path: "M14.234 10.162 22.977 0h-2.072l-7.591 8.824L7.251 0H.258l9.168 13.343L.258 24H2.33l8.016-9.318L16.749 24h6.993zm-2.837 3.299-.929-1.329L3.076 1.56h3.182l5.965 8.532.929 1.329 7.754 11.09h-3.182z",
17+
},
18+
spotify: {
19+
hex: "#1ED760",
20+
path: "M12 0C5.4 0 0 5.4 0 12s5.4 12 12 12 12-5.4 12-12S18.66 0 12 0zm5.521 17.34c-.24.359-.66.48-1.021.24-2.82-1.74-6.36-2.101-10.561-1.141-.418.122-.779-.179-.899-.539-.12-.421.18-.78.54-.9 4.56-1.021 8.52-.6 11.64 1.32.42.18.479.659.301 1.02zm1.44-3.3c-.301.42-.841.6-1.262.3-3.239-1.98-8.159-2.58-11.939-1.38-.479.12-1.02-.12-1.14-.6-.12-.48.12-1.021.6-1.141C9.6 9.9 15 10.561 18.72 12.84c.361.181.54.78.241 1.2zm.12-3.36C15.24 8.4 8.82 8.16 5.16 9.301c-.6.179-1.2-.181-1.38-.721-.18-.601.18-1.2.72-1.381 4.26-1.26 11.28-1.02 15.721 1.621.539.3.719 1.02.419 1.56-.299.421-1.02.599-1.559.3z",
21+
},
22+
linkedin: {
23+
hex: "#0A66C2",
24+
path: "M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85 3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433c-1.144 0-2.063-.926-2.063-2.065 0-1.138.92-2.063 2.063-2.063 1.14 0 2.064.925 2.064 2.063 0 1.139-.925 2.065-2.064 2.065zm1.782 13.019H3.555V9h3.564v11.452zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0h.003z",
25+
},
26+
facebook: {
27+
hex: "#0866FF",
28+
path: "M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z",
29+
},
30+
whatsapp: {
31+
hex: "#25D366",
32+
path: "M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413Z",
33+
},
34+
telegram: {
35+
hex: "#26A5E4",
36+
path: "M11.944 0A12 12 0 0 0 0 12a12 12 0 0 0 12 12 12 12 0 0 0 12-12A12 12 0 0 0 12 0a12 12 0 0 0-.056 0zm4.962 7.224c.1-.002.321.023.465.14a.506.506 0 0 1 .171.325c.016.093.036.306.02.472-.18 1.898-.962 6.502-1.36 8.627-.168.9-.499 1.201-.82 1.23-.696.065-1.225-.46-1.9-.902-1.056-.693-1.653-1.124-2.678-1.8-1.185-.78-.417-1.21.258-1.91.177-.184 3.247-2.977 3.307-3.23.007-.032.014-.15-.056-.212s-.174-.041-.249-.024c-.106.024-1.793 1.14-5.061 3.345-.48.33-.913.49-1.302.48-.428-.008-1.252-.241-1.865-.44-.752-.245-1.349-.374-1.297-.789.027-.216.325-.437.893-.663 3.498-1.524 5.83-2.529 6.998-3.014 3.332-1.386 4.025-1.627 4.476-1.635z",
37+
},
38+
};
39+
40+
export function DeepLinkAppIcon({
41+
appId,
42+
size = 20,
43+
className,
44+
}: {
45+
appId: string;
46+
className?: string;
47+
size?: number;
48+
}) {
49+
const icon = ICONS[appId];
50+
if (!icon) {
51+
return null;
52+
}
53+
54+
return (
55+
<svg
56+
aria-label={appId}
57+
className={className}
58+
fill={icon.hex}
59+
height={size}
60+
role="img"
61+
viewBox="0 0 24 24"
62+
width={size}
63+
>
64+
<path d={icon.path} />
65+
</svg>
66+
);
67+
}

0 commit comments

Comments
 (0)