Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Update keyboard shortcuts

Tim Wilson8dbbab336ce0
diff --git a/apps/web/ui/modals/add-edit-link-modal-new/constants.ts b/apps/web/ui/modals/add-edit-link-modal-new/constants.ts
index d7382b1e4a..c7dc4190f3 100644
--- a/apps/web/ui/modals/add-edit-link-modal-new/constants.ts
+++ b/apps/web/ui/modals/add-edit-link-modal-new/constants.ts
@@ -21,7 +21,7 @@ export const TOGGLES = [
description:
"Mask your destination URL so your users only see the short link in the browser address bar.",
learnMoreUrl: "https://dub.co/help/article/link-cloaking",
- shortcutKey: "l",
+ shortcutKey: "c",
type: "boolean",
},
{
@@ -31,7 +31,7 @@ export const TOGGLES = [
description:
"Track conversions on your short link to measure the effectiveness of your marketing campaigns.",
learnMoreUrl: "https://dub.co/help/article/conversion-tracking",
- shortcutKey: "c",
+ shortcutKey: "t",
conversionEnabled: true,
type: "boolean",
},
@@ -56,7 +56,7 @@ export const MOBILE_MORE_ITEMS = [
description:
"Protect your links with a password so only authorized users can access them.",
learnMoreUrl: "https://dub.co/help/article/password-protected-links",
- shortcutKey: "p",
+ shortcutKey: "l",
enabled: (data: LinkFormData) => Boolean(data.password),
remove: (setValue: UseFormSetValue<LinkWithTagsProps>) =>
setValue("password", null),
diff --git a/apps/web/ui/modals/add-edit-link-modal-new/link-preview.tsx b/apps/web/ui/modals/add-edit-link-modal-new/link-preview.tsx
index c1ce8cf109..fbd994c06d 100644
--- a/apps/web/ui/modals/add-edit-link-modal-new/link-preview.tsx
+++ b/apps/web/ui/modals/add-edit-link-modal-new/link-preview.tsx
@@ -82,7 +82,7 @@ export function LinkPreview() {
const isValidUrl = useMemo(() => isValidUrlFn(debouncedUrl), [debouncedUrl]);
const { OGModal, setShowOGModal } = useOGModal();
- useKeyboardShortcut("d", () => setShowOGModal(true), {
+ useKeyboardShortcut("p", () => setShowOGModal(true), {
modal: true,
enabled: isValidUrl,
});
diff --git a/apps/web/ui/modals/add-edit-link-modal-new/og-modal.tsx b/apps/web/ui/modals/add-edit-link-modal-new/og-modal.tsx
index 6d24e0d7f0..5e79bec614 100644
--- a/apps/web/ui/modals/add-edit-link-modal-new/og-modal.tsx
+++ b/apps/web/ui/modals/add-edit-link-modal-new/og-modal.tsx
@@ -202,20 +202,20 @@ function OGModalInner({
}}
>
<div className="flex items-center justify-between">
- <h3 className="text-lg font-medium">Link Design</h3>
+ <h3 className="text-lg font-medium">Link Preview</h3>
<div className="max-md:hidden">
<Tooltip
content={
<div className="px-2 py-1 text-xs text-gray-700">
Press{" "}
- <strong className="font-medium text-gray-950">D</strong> to
+ <strong className="font-medium text-gray-950">P</strong> to
open this quickly
</div>
}
side="right"
>
<kbd className="flex size-6 cursor-default items-center justify-center rounded-md border border-gray-200 font-sans text-xs text-gray-950">
- D
+ P
</kbd>
</Tooltip>
</div>
diff --git a/apps/web/ui/modals/add-edit-link-modal-new/password-modal.tsx b/apps/web/ui/modals/add-edit-link-modal-new/password-modal.tsx
index c2384f2451..db078b6dae 100644
--- a/apps/web/ui/modals/add-edit-link-modal-new/password-modal.tsx
+++ b/apps/web/ui/modals/add-edit-link-modal-new/password-modal.tsx
@@ -86,14 +86,14 @@ function PasswordModal({
content={
<div className="px-2 py-1 text-xs text-gray-700">
Press{" "}
- <strong className="font-medium text-gray-950">P</strong> to
+ <strong className="font-medium text-gray-950">L</strong> to
open this quickly
</div>
}
side="right"
>
<kbd className="flex size-6 cursor-default items-center justify-center rounded-md border border-gray-200 font-sans text-xs text-gray-950">
- P
+ L
</kbd>
</Tooltip>
</div>
@@ -198,7 +198,7 @@ function PasswordButton({
const { watch } = useFormContext<LinkFormData>();
const password = watch("password");
- useKeyboardShortcut("p", () => setShowPasswordModal(true), {
+ useKeyboardShortcut("l", () => setShowPasswordModal(true), {
modal: true,
});