Skip to content

Commit 87619ee

Browse files
committed
fix: disbaled shortcuts whne blocked
1 parent bb309de commit 87619ee

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/lib/commandCenter/commandCenter.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,7 @@
4646
{
4747
callback: toggleCommandCenter,
4848
keys: ['k'],
49-
ctrl: true,
50-
forceEnable: true
49+
ctrl: true
5150
},
5251
{
5352
label: 'Toggle debug overlay',

src/lib/components/navbar.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@
203203
<Button.Button
204204
variant="text"
205205
aria-label="Toggle Command Center"
206+
disabled={isProjectBlocked}
206207
on:click={toggleCommandCenter}
207208
icon>
208209
<Icon icon={IconSearch} />

src/routes/(console)/project-[region]-[project]/+layout.svelte

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import { project, stats } from './store';
66
77
import { goto } from '$app/navigation';
8-
import { registerCommands, registerSearchers } from '$lib/commandCenter';
8+
import { disableCommands, registerCommands, registerSearchers } from '$lib/commandCenter';
99
1010
import {
1111
bucketSearcher,
@@ -39,6 +39,7 @@
3939
4040
export let data: LayoutData;
4141
$: isProjectBlocked = getIsProjectBlocked(data.project);
42+
$: $disableCommands(isProjectBlocked);
4243
$: allOrgsHavePremiumSupport = $organizationList.teams.every(
4344
(team) => (team as Models.Organization).billingPlanDetails.premiumSupport
4445
);

0 commit comments

Comments
 (0)