formatted mobile devices list
This commit is contained in:
parent
8743cba65a
commit
80683e29e5
3 changed files with 79 additions and 9 deletions
|
|
@ -16,6 +16,9 @@ import {
|
|||
import { NexusST } from "./Nexus/NexusDescriber";
|
||||
import { MiPCAV2, OmniAir } from "./OmniAir/OmniAirDescriber";
|
||||
import { ConfigurablePin } from "pbHelpers/AddressTypes";
|
||||
import { useTheme } from "@mui/material";
|
||||
import { Device } from "models";
|
||||
import { or } from "utils";
|
||||
|
||||
export type ProductTab = "components" | "presets";
|
||||
|
||||
|
|
@ -101,11 +104,12 @@ export function GetDeviceProductLabel(product: pond.DeviceProduct): string {
|
|||
}
|
||||
|
||||
export function GetDeviceProductIcon(
|
||||
product: pond.DeviceProduct,
|
||||
platform: pond.DevicePlatform,
|
||||
theme?: "dark" | "light"
|
||||
device: pond.Device | Device
|
||||
): string | undefined {
|
||||
return getDescriber(product).icon(platform, theme);
|
||||
const theme = useTheme()
|
||||
const product = or(device.settings?.product, pond.DeviceProduct.DEVICE_PRODUCT_NONE)
|
||||
const platform = or(device.settings?.platform, pond.DevicePlatform.DEVICE_PLATFORM_INVALID)
|
||||
return getDescriber(product).icon(platform, theme.palette.mode);
|
||||
}
|
||||
|
||||
export function IsCardController(product?: pond.DeviceProduct): boolean {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue