Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/command title error #323

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/PageComponents/Config/Device.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const Device = (): JSX.Element => {
"Lost and Found":
Protobuf.Config.Config_DeviceConfig_Role.LOST_AND_FOUND,
"TAK Tracker":
Protobuf.Config.Config_DeviceConfig_Role.SENSOR,
Protobuf.Config.Config_DeviceConfig_Role.TAK_TRACKER,
},
formatEnumName: true,
},
Expand Down
2 changes: 2 additions & 0 deletions src/components/PageComponents/Connect/BLE.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export const BLE = ({ closeDialog }: TabElementProps): JSX.Element => {
const { setSelectedDevice } = useAppStore();

const updateBleDeviceList = useCallback(async (): Promise<void> => {
if (!navigator.bluetooth.getDevices) return;
setBleDevices(await navigator.bluetooth.getDevices());
}, []);

Expand Down Expand Up @@ -65,6 +66,7 @@ export const BLE = ({ closeDialog }: TabElementProps): JSX.Element => {
}
});
}}
disabled={!navigator.bluetooth.getDevices}
>
<span>New device</span>
</Button>
Expand Down
2 changes: 1 addition & 1 deletion src/components/PageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const PageLayout = ({
<div className="flex justify-end space-x-4">
{actions?.map((action, index) => (
<button
key={action.icon.name}
key={action.icon.displayName}
type="button"
className="transition-all hover:text-accent"
onClick={action.onClick}
Expand Down
3 changes: 2 additions & 1 deletion src/components/UI/Command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Command as CommandPrimitive } from "cmdk";
import { Search } from "lucide-react";
import * as React from "react";

import { Dialog, DialogContent } from "@components/UI/Dialog.tsx";
import { Dialog, DialogContent, DialogTitle } from "@components/UI/Dialog.tsx";
import { cn } from "@core/utils/cn.ts";

const Command = React.forwardRef<
Expand All @@ -24,6 +24,7 @@ Command.displayName = CommandPrimitive.displayName;
const CommandDialog = ({ children, ...props }: DialogProps) => {
return (
<Dialog {...props}>
<DialogTitle />
<DialogContent className="overflow-hidden p-0 shadow-2xl [&_[dialog-overlay]]:bg-red-100">
<Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-slate-500 [&_[cmdk-group]]:px-2 [&_[cmdk-group]_+[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
{children}
Expand Down
1 change: 1 addition & 0 deletions src/components/UI/Dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const DialogContent = React.forwardRef<
>(({ className, children, ...props }, ref) => (
<DialogPortal>
<DialogOverlay />
<DialogDescription />
<DialogPrimitive.Content
ref={ref}
className={cn(
Expand Down