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 Wilson1cbf2d09e30d
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 c7dc4190f3..1c3276cfdf 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: "c",
+ shortcutKey: "h",
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: "t",
+ shortcutKey: "c",
conversionEnabled: true,
type: "boolean",
},
@@ -86,7 +86,7 @@ export const MOBILE_MORE_ITEMS = [
description:
"Target your links to specific audiences based on their location, device, or browser.",
learnMoreUrl: "https://dub.co/help/article/geo-targeting",
- shortcutKey: "T",
+ shortcutKey: "t",
enabled: (data: LinkFormData) =>
Boolean(
data.ios || data.android || Object.keys(data.geo || {}).length > 0,
diff --git a/apps/web/ui/modals/add-edit-link-modal-new/targeting-modal.tsx b/apps/web/ui/modals/add-edit-link-modal-new/targeting-modal.tsx
index 6258da7f58..8c49d152fa 100644
--- a/apps/web/ui/modals/add-edit-link-modal-new/targeting-modal.tsx
+++ b/apps/web/ui/modals/add-edit-link-modal-new/targeting-modal.tsx
@@ -6,7 +6,7 @@ import {
Tooltip,
useKeyboardShortcut,
} from "@dub/ui";
-import { ArrowBoldUp, Crosshairs3 } from "@dub/ui/src/icons";
+import { Crosshairs3 } from "@dub/ui/src/icons";
import { cn, COUNTRIES } from "@dub/utils";
import {
Dispatch,
@@ -91,16 +91,14 @@ function TargetingModal({
content={
<div className="px-2 py-1 text-xs text-gray-700">
Press{" "}
- <strong className="font-medium text-gray-950">
- Shift+T
- </strong>{" "}
- to open this quickly
+ <strong className="font-medium text-gray-950">T</strong> to
+ open this quickly
</div>
}
side="right"
>
- <kbd className="flex h-6 cursor-default items-center justify-center gap-1 rounded-md border border-gray-200 px-1.5 font-sans text-xs text-gray-950">
- <ArrowBoldUp className="size-3 shrink-0" />T
+ <kbd className="flex size-6 cursor-default items-center justify-center gap-1 rounded-md border border-gray-200 font-sans text-xs text-gray-950">
+ T
</kbd>
</Tooltip>
</div>
@@ -313,7 +311,7 @@ function TargetingButton({
const { watch } = useFormContext<LinkFormData>();
const [ios, android, geo] = watch(["ios", "android", "geo"]);
- useKeyboardShortcut("T", () => setShowTargetingModal(true), {
+ useKeyboardShortcut("t", () => setShowTargetingModal(true), {
modal: true,
});