mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
chore: Add tracking for hyperlinks (#4703)
* chore: Add tracking for hyperlinks * update * fix * remove * tweak * disable ga logging in dev again * add logging for hyperlink `edit` & support for tracking in manager * event label tweaks * fix tests & make more typesafe Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
parent
e203203993
commit
21e9fcb2f5
8 changed files with 68 additions and 13 deletions
|
@ -1,8 +1,10 @@
|
|||
import { t } from "../i18n";
|
||||
import { isDarwin } from "../keys";
|
||||
import { getShortcutKey } from "../utils";
|
||||
import { ActionName } from "./types";
|
||||
|
||||
export type ShortcutName =
|
||||
export type ShortcutName = SubtypeOf<
|
||||
ActionName,
|
||||
| "cut"
|
||||
| "copy"
|
||||
| "paste"
|
||||
|
@ -26,7 +28,8 @@ export type ShortcutName =
|
|||
| "viewMode"
|
||||
| "flipHorizontal"
|
||||
| "flipVertical"
|
||||
| "link";
|
||||
| "hyperlink"
|
||||
>;
|
||||
|
||||
const shortcutMap: Record<ShortcutName, string[]> = {
|
||||
cut: [getShortcutKey("CtrlOrCmd+X")],
|
||||
|
@ -63,7 +66,7 @@ const shortcutMap: Record<ShortcutName, string[]> = {
|
|||
flipHorizontal: [getShortcutKey("Shift+H")],
|
||||
flipVertical: [getShortcutKey("Shift+V")],
|
||||
viewMode: [getShortcutKey("Alt+R")],
|
||||
link: [getShortcutKey("CtrlOrCmd+K")],
|
||||
hyperlink: [getShortcutKey("CtrlOrCmd+K")],
|
||||
};
|
||||
|
||||
export const getShortcutFromShortcutName = (name: ShortcutName) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue