File tree Expand file tree Collapse file tree
packages/frontend/src/page Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import Resizable , { type ContextValue } from "@corvu/resizable" ;
2- import { makeEventListener } from "@solid-primitives/event-listener" ;
32import { Title } from "@solidjs/meta" ;
43import { useNavigate , useParams } from "@solidjs/router" ;
54import ChevronsRight from "lucide-solid/icons/chevrons-right" ;
@@ -406,27 +405,6 @@ export function DocumentPane(props: {
406405
407406 const history = useSnapshotHistory ( ( ) => props . docRef . refId ) ;
408407
409- makeEventListener ( window , "keydown" , ( evt ) => {
410- const mod = evt . metaKey || evt . ctrlKey ;
411- if ( ! mod || evt . altKey ) {
412- return ;
413- }
414-
415- if ( evt . key === "z" || evt . key === "Z" ) {
416- if ( evt . shiftKey ) {
417- if ( history . canRedo ( ) ) {
418- evt . preventDefault ( ) ;
419- history . onRedo ( ) ;
420- }
421- } else {
422- if ( history . canUndo ( ) ) {
423- evt . preventDefault ( ) ;
424- history . onUndo ( ) ;
425- }
426- }
427- }
428- } ) ;
429-
430408 return (
431409 < div class = "document-pane-layout" >
432410 < div class = "document-pane-content" >
Original file line number Diff line number Diff line change 11import { HistoryNavigator } from "catcolab-ui-components" ;
22import { type SnapshotHistory , useSnapshotHistory } from "./use_snapshot_history" ;
33
4- const isMac = typeof navigator !== "undefined" && / M a c | i P h o n e | i P a d / . test ( navigator . userAgent ) ;
5- const mod = isMac ? "\u2318" : "Ctrl" ;
6-
74export function HistorySidebar ( props : { refId : string ; history ?: SnapshotHistory } ) {
85 const ownHistory = useSnapshotHistory ( ( ) => props . refId ) ;
96 const history = ( ) => props . history ?? ownHistory ;
@@ -16,8 +13,8 @@ export function HistorySidebar(props: { refId: string; history?: SnapshotHistory
1613 onUndo = { history ( ) . onUndo }
1714 onRedo = { history ( ) . onRedo }
1815 onSelect = { history ( ) . navigate }
19- undoTooltip = { ` Undo ( ${ mod } +Z)` }
20- redoTooltip = { ` Redo ( ${ mod } +Shift+Z)` }
16+ undoTooltip = " Undo"
17+ redoTooltip = " Redo"
2118 />
2219 ) ;
2320}
You can’t perform that action at this time.
0 commit comments