Skip to content

Commit

Permalink
[console] - fixed Control + R to rename
Browse files Browse the repository at this point in the history
  • Loading branch information
emilbon99 committed Sep 26, 2024
1 parent 41bed72 commit c6ad614
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions console/src/layout/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { useSelectWindowKey } from "@synnaxlabs/drift/react";
import {
type AsyncDestructor,
type Nav,
Text,
Theming,
Triggers,
useAsyncEffect,
Expand Down Expand Up @@ -265,4 +266,15 @@ export const useTriggers = () => {
openInNewWindow(active);
},
});
Triggers.use({
triggers: [["Control", "R"]],
loose: true,
callback: ({ stage }) => {
if (stage !== "start") return;
const state = store.getState();
const active = selectActiveMosaicTabKey(state);
if (active == null) return;
Text.edit(`pluto-tab-${active}`);
},
});
};

0 comments on commit c6ad614

Please sign in to comment.