Skip to content

Commit 48878dd

Browse files
Merge pull request #111 from alrescha79-cmd/feature/signal-finder-metric-selector
feat(signal-finder): add RSRP/SINR metric toggle and UI improvements
2 parents 7efec48 + f24d421 commit 48878dd

9 files changed

Lines changed: 867 additions & 28 deletions

File tree

src/app/(tabs)/home.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { useRouter } from 'expo-router';
1212
import AsyncStorage from '@react-native-async-storage/async-storage';
1313
import { MaterialIcons } from '@expo/vector-icons';
1414
import { useTheme } from '@/theme';
15-
import { Card, ThemedAlertHelper, WebViewLogin, BandSelectionModal, getSelectedBandsDisplay, MonthlySettingsModal, DiagnosisResultModal, SpeedtestModal, MeshGradientBackground, AnimatedScreen, BouncingDots, ModernRefreshIndicator, CustomRefreshScrollView } from '@/components';
15+
import { Card, ThemedAlertHelper, WebViewLogin, BandSelectionModal, getSelectedBandsDisplay, MonthlySettingsModal, DiagnosisResultModal, SpeedtestModal, MeshGradientBackground, AnimatedScreen, BouncingDots, ModernRefreshIndicator, CustomRefreshScrollView, SignalPointingModal } from '@/components';
1616
import { QuickActionsCard, ConnectionStatusCard, NoDataWarningCard, SignalInfoCard, TrafficStatsCard, ConnectionStatusSkeleton, QuickActionsSkeleton, TrafficStatsSkeleton, homeStyles as styles } from '@/components/home';
1717
import { useAuthStore } from '@/stores/auth.store';
1818
import { useModemStore } from '@/stores/modem.store';
@@ -92,6 +92,7 @@ export default function HomeScreen() {
9292
const [diagnosisSummary, setDiagnosisSummary] = useState('');
9393

9494
const [showSpeedtestModal, setShowSpeedtestModal] = useState(false);
95+
const [showSignalPointingModal, setShowSignalPointingModal] = useState(false);
9596

9697
const [isClearingHistory, setIsClearingHistory] = useState(false);
9798
const [lastClearedDate, setLastClearedDate] = useState<string | null>(null);
@@ -762,12 +763,11 @@ export default function HomeScreen() {
762763
mobileDataEnabled={!!mobileDataStatus?.dataswitch}
763764
isTogglingData={isTogglingData}
764765
isChangingIp={isChangingIp}
765-
isRunningDiagnosis={isRunningDiagnosis}
766766
isRunningCheck={isRunningCheck}
767767
onOpenBandModal={() => setShowBandModal(true)}
768768
onChangeIp={handleChangeIp}
769769
onToggleMobileData={handleToggleMobileData}
770-
onDiagnosis={handleDiagnosis}
770+
onSignalPointing={() => setShowSignalPointingModal(true)}
771771
onQuickCheck={handleOneClickCheck}
772772
onSpeedtest={() => setShowSpeedtestModal(true)}
773773
/>
@@ -846,6 +846,12 @@ export default function HomeScreen() {
846846
visible={showSpeedtestModal}
847847
onClose={() => setShowSpeedtestModal(false)}
848848
/>
849+
850+
{/* Signal Pointing Modal */}
851+
<SignalPointingModal
852+
visible={showSignalPointingModal}
853+
onClose={() => setShowSignalPointingModal(false)}
854+
/>
849855
</ScrollView>
850856
</MeshGradientBackground>
851857
</AnimatedScreen>

src/app/(tabs)/settings/mobile-network.tsx

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import {
77
TouchableOpacity,
88
Text,
99
} from 'react-native';
10+
import { useRouter } from 'expo-router';
1011
import { useTheme } from '@/theme';
1112
import { useAuthStore } from '@/stores/auth.store';
1213
import { ModemService } from '@/services/modem.service';
1314
import { useTranslation } from '@/i18n';
14-
import { BandSelectionModal, ThemedAlertHelper, getSelectedBandsDisplay, SettingsSection, SettingsItem, MonthlySettingsModal, SelectionModal, MeshGradientBackground, PageHeader, ThemedSwitch, BouncingDots, AnimatedScreen } from '@/components';
15+
import { BandSelectionModal, ThemedAlertHelper, getSelectedBandsDisplay, SettingsSection, SettingsItem, MonthlySettingsModal, SelectionModal, MeshGradientBackground, PageHeader, ThemedSwitch, BouncingDots, AnimatedScreen, SignalPointingModal } from '@/components';
1516
import { MaterialIcons } from '@expo/vector-icons';
1617

1718
const NETWORK_MODES = [
@@ -26,6 +27,7 @@ export default function MobileNetworkSettingsScreen() {
2627
const { colors, typography } = useTheme();
2728
const { t } = useTranslation();
2829
const { credentials } = useAuthStore();
30+
const router = useRouter();
2931

3032
const [modemService, setModemService] = useState<ModemService | null>(null);
3133

@@ -45,6 +47,7 @@ export default function MobileNetworkSettingsScreen() {
4547
const [selectedBandsDisplay, setSelectedBandsDisplay] = useState<string[]>([]);
4648

4749
const [showMonthlyModal, setShowMonthlyModal] = useState(false);
50+
const [showSignalPointingModal, setShowSignalPointingModal] = useState(false);
4851
const [monthlySettings, setMonthlySettings] = useState({
4952
enabled: false,
5053
startDay: 1,
@@ -273,6 +276,16 @@ export default function MobileNetworkSettingsScreen() {
273276
/>
274277
</SettingsSection>
275278

279+
{/* Signal Tools */}
280+
<SettingsSection title={t('settings.signalTools')}>
281+
<SettingsItem
282+
title={t('home.signalPointing')}
283+
subtitle={t('settings.signalPointingDesc')}
284+
onPress={() => setShowSignalPointingModal(true)}
285+
isLast
286+
/>
287+
</SettingsSection>
288+
276289
<SelectionModal
277290
visible={showNetworkModeModal}
278291
title={t('settings.preferredNetwork')}
@@ -301,6 +314,12 @@ export default function MobileNetworkSettingsScreen() {
301314
onSave={handleSaveMonthlySettings}
302315
initialSettings={monthlySettings}
303316
/>
317+
318+
{/* Signal Pointing Modal */}
319+
<SignalPointingModal
320+
visible={showSignalPointingModal}
321+
onClose={() => setShowSignalPointingModal(false)}
322+
/>
304323
</ScrollView>
305324
</MeshGradientBackground>
306325
</AnimatedScreen>

0 commit comments

Comments
 (0)