mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-08 01:33:01 +02:00
More code rip out
This commit is contained in:
@@ -108,7 +108,7 @@ function createLocalMessage(conversationKey: string, text: string, outgoing: boo
|
||||
};
|
||||
}
|
||||
|
||||
export interface UseAirtimeTrackingResult {
|
||||
interface UseAirtimeTrackingResult {
|
||||
/** Returns true if this was an airtime command that was handled */
|
||||
handleAirtimeCommand: (command: string, conversationId: string) => Promise<boolean>;
|
||||
/** Stop any active airtime tracking */
|
||||
|
||||
@@ -144,7 +144,6 @@ export function useAppSettings() {
|
||||
|
||||
return {
|
||||
appSettings,
|
||||
setAppSettings,
|
||||
favorites,
|
||||
fetchAppSettings,
|
||||
handleSaveAppSettings,
|
||||
|
||||
@@ -57,13 +57,12 @@ export function getMessageContentKey(msg: Message): string {
|
||||
return `${msg.type}-${msg.conversation_key}-${msg.text}-${ts}`;
|
||||
}
|
||||
|
||||
export interface UseConversationMessagesResult {
|
||||
interface UseConversationMessagesResult {
|
||||
messages: Message[];
|
||||
messagesLoading: boolean;
|
||||
loadingOlder: boolean;
|
||||
hasOlderMessages: boolean;
|
||||
setMessages: React.Dispatch<React.SetStateAction<Message[]>>;
|
||||
fetchMessages: (showLoading?: boolean) => Promise<void>;
|
||||
fetchOlderMessages: () => Promise<void>;
|
||||
addMessageIfNew: (msg: Message) => boolean;
|
||||
updateMessageAck: (messageId: number, ackCount: number, paths?: MessagePath[]) => void;
|
||||
@@ -433,7 +432,6 @@ export function useConversationMessages(
|
||||
loadingOlder,
|
||||
hasOlderMessages,
|
||||
setMessages,
|
||||
fetchMessages,
|
||||
fetchOlderMessages,
|
||||
addMessageIfNew,
|
||||
updateMessageAck,
|
||||
|
||||
@@ -12,7 +12,7 @@ import { CONTACT_TYPE_REPEATER } from '../types';
|
||||
import { useAirtimeTracking } from './useAirtimeTracking';
|
||||
|
||||
// Format seconds into human-readable duration (e.g., 1d17h2m, 1h5m, 3m)
|
||||
export function formatDuration(seconds: number): string {
|
||||
function formatDuration(seconds: number): string {
|
||||
if (seconds < 60) return `${seconds}s`;
|
||||
|
||||
const days = Math.floor(seconds / 86400);
|
||||
@@ -32,7 +32,7 @@ export function formatDuration(seconds: number): string {
|
||||
}
|
||||
|
||||
// Format telemetry response as human-readable text
|
||||
export function formatTelemetry(telemetry: TelemetryResponse): string {
|
||||
function formatTelemetry(telemetry: TelemetryResponse): string {
|
||||
const lines = [
|
||||
`Telemetry`,
|
||||
`Battery Voltage: ${telemetry.battery_volts.toFixed(3)}V`,
|
||||
@@ -57,7 +57,7 @@ export function formatTelemetry(telemetry: TelemetryResponse): string {
|
||||
}
|
||||
|
||||
// Format neighbors list as human-readable text
|
||||
export function formatNeighbors(neighbors: NeighborInfo[]): string {
|
||||
function formatNeighbors(neighbors: NeighborInfo[]): string {
|
||||
if (neighbors.length === 0) {
|
||||
return 'Neighbors\nNo neighbors reported';
|
||||
}
|
||||
@@ -73,7 +73,7 @@ export function formatNeighbors(neighbors: NeighborInfo[]): string {
|
||||
}
|
||||
|
||||
// Format ACL list as human-readable text
|
||||
export function formatAcl(acl: AclEntry[]): string {
|
||||
function formatAcl(acl: AclEntry[]): string {
|
||||
if (acl.length === 0) {
|
||||
return 'ACL\nNo ACL entries';
|
||||
}
|
||||
@@ -108,7 +108,7 @@ function createLocalMessage(
|
||||
};
|
||||
}
|
||||
|
||||
export interface UseRepeaterModeResult {
|
||||
interface UseRepeaterModeResult {
|
||||
repeaterLoggedIn: boolean;
|
||||
activeContactIsRepeater: boolean;
|
||||
handleTelemetryRequest: (password: string) => Promise<void>;
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
import type { Channel, Contact, Conversation, Message, UnreadCounts } from '../types';
|
||||
import { takePrefetch } from '../prefetch';
|
||||
|
||||
export interface UseUnreadCountsResult {
|
||||
interface UseUnreadCountsResult {
|
||||
unreadCounts: Record<string, number>;
|
||||
/** Tracks which conversations have unread messages that mention the user */
|
||||
mentions: Record<string, boolean>;
|
||||
|
||||
Reference in New Issue
Block a user