mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-05-01 11:02:56 +02:00
Fix inversion of const definition location
This commit is contained in:
@@ -13,7 +13,11 @@ import { api } from '../api';
|
||||
import { toast } from './ui/sonner';
|
||||
import { handleKeyboardActivate } from '../utils/a11y';
|
||||
import { applyTheme, getSavedTheme, THEME_CHANGE_EVENT } from '../utils/theme';
|
||||
import { getShowBatteryPercent, getShowBatteryVoltage } from '../utils/batteryDisplay';
|
||||
import {
|
||||
BATTERY_DISPLAY_CHANGE_EVENT,
|
||||
getShowBatteryPercent,
|
||||
getShowBatteryVoltage,
|
||||
} from '../utils/batteryDisplay';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
// Meshtastic default OCV table (meshtastic/firmware src/power.h)
|
||||
@@ -43,8 +47,6 @@ function mvToPercent(mv: number): number {
|
||||
return 0;
|
||||
}
|
||||
|
||||
export const BATTERY_DISPLAY_CHANGE_EVENT = 'remoteterm-battery-display-change';
|
||||
|
||||
interface StatusBarProps {
|
||||
health: HealthStatus | null;
|
||||
config: RadioConfig | null;
|
||||
|
||||
@@ -29,12 +29,12 @@ import {
|
||||
} from '../../utils/fontScale';
|
||||
import { getAutoFocusInputEnabled, setAutoFocusInputEnabled } from '../../utils/autoFocusInput';
|
||||
import {
|
||||
BATTERY_DISPLAY_CHANGE_EVENT,
|
||||
getShowBatteryPercent,
|
||||
setShowBatteryPercent as saveBatteryPercent,
|
||||
getShowBatteryVoltage,
|
||||
setShowBatteryVoltage as saveBatteryVoltage,
|
||||
} from '../../utils/batteryDisplay';
|
||||
import { BATTERY_DISPLAY_CHANGE_EVENT } from '../StatusBar';
|
||||
|
||||
export function SettingsLocalSection({
|
||||
onLocalLabelChange,
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
export const BATTERY_DISPLAY_CHANGE_EVENT = 'remoteterm-battery-display-change';
|
||||
|
||||
const PERCENT_KEY = 'remoteterm-show-battery-percent';
|
||||
const VOLTAGE_KEY = 'remoteterm-show-battery-voltage';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user