refactor: clean up unused resources and update color references (#2559)

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
This commit is contained in:
James Rich 2025-07-29 10:31:59 -05:00 committed by GitHub
parent ff9e0bdde4
commit 9418dceeef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 4 additions and 202 deletions

View file

@ -25,6 +25,7 @@ import androidx.compose.ui.graphics.Color
val MeshtasticGreen = Color(0xFF67EA94)
val MeshtasticAlt = Color(0xFF2C2D3C)
val HyperlinkBlue = Color(0xFF43C3B0)
val AnnotationColor = Color(0xFF039BE5)
object IAQColors {
val IAQExcellent = Color(0xFF00E400)

View file

@ -61,7 +61,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.graphicsLayer
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.res.colorResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.AnnotatedString
import androidx.compose.ui.text.SpanStyle
@ -82,6 +81,7 @@ import com.geeksville.mesh.model.DebugViewModel
import com.geeksville.mesh.model.DebugViewModel.UiMeshLog
import com.geeksville.mesh.ui.common.components.CopyIconButton
import com.geeksville.mesh.ui.common.components.SimpleAlertDialog
import com.geeksville.mesh.ui.common.theme.AnnotationColor
import com.geeksville.mesh.ui.common.theme.AppTheme
import kotlinx.collections.immutable.toImmutableList
import kotlinx.coroutines.Dispatchers
@ -290,7 +290,7 @@ private fun rememberAnnotatedString(text: String, searchText: String): Annotated
@Composable
private fun rememberAnnotatedLogMessage(log: UiMeshLog, searchText: String): AnnotatedString {
val theme = MaterialTheme.colorScheme
val style = SpanStyle(color = colorResource(id = R.color.colorAnnotation), fontStyle = FontStyle.Italic)
val style = SpanStyle(color = AnnotationColor, fontStyle = FontStyle.Italic)
val highlightStyle = SpanStyle(background = theme.primary.copy(alpha = 0.3f), color = theme.onSurface)
return remember(log.uuid, searchText) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

View file

@ -1,32 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2025 Meshtastic LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<resources>
<color name="colorOnPrimary">#141414</color>
<color name="colorPrimary">#67EA94</color>
<color name="colorPrimaryDark">#141414</color>
<color name="colorMsg">#212121</color>
<color name="colorMyMsg">#28463C</color>
<color name="colorAdvancedBackground">#141414</color>
<color name="colorMenuItem">#FFFFFF</color>
<color name="selectedColor">#67EA94</color>
<color name="unselectedColor">#AAAAAA</color>
<color name="colorAnnotation">#039BE5</color>
<color name="toolbarBackground">#141414</color>
<color name="toolbarText">#67EA94</color>
</resources>

View file

@ -1,34 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (c) 2025 Meshtastic LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
-->
<resources>
<color name="colorOnPrimary">#FFFFFF</color>
<color name="colorPrimary">#67EA94</color>
<color name="colorPrimaryDark">#67EA94</color>
<color name="colorMsg">#F2F2F2</color>
<color name="colorMyMsg">#EDEAF4</color>
<color name="colorAdvancedBackground">#FFFFFF</color>
<color name="colorMenuItem">#000000</color>
<color name="selectedColor">#67EA94</color>
<color name="unselectedColor">#212121</color>
<color name="buttonColor">#67EA94</color>
<color name="colourGrey">#535353</color>
<color name="colorAnnotation">#0288D1</color>
<color name="toolbarBackground">#67EA94</color>
<color name="toolbarText">#FFFFFF</color>
</resources>

View file

@ -1,10 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- This file is used by the android app for software updates.
It reflects the firmware version included in: ./app/src/main/assets/firmware/
Matches output from Meshtastic-device/bin/buildinfo.py 'long' & 'short' -->
<resources>
<string name="cur_firmware_version" translatable="false">0.2.0.abcdefg</string>
<string name="short_firmware_version" translatable="false">0.2.0</string>
</resources>

View file

@ -23,20 +23,9 @@
<string name="zh_TW" translatable="false">繁體中文</string>
<string name="app_name" translatable="false">Meshtastic</string>
<string name="sample_distance" translatable="false">2.13 km</string>
<string name="some_username" translatable="false">SKH</string>
<string name="test_devname1" translatable="false">Meshtastic_ac23</string>
<string name="test_devname2" translatable="false">Meshtastic_1267</string>
<string name="sample_coords" translatable="false">55.332244 34.442211</string>
<string name="sample_message" translatable="false">hey I found the cache, it is over here next to the big tiger. I\'m kinda scared.</string>
<string name="main_tab_messages">Messages</string>
<string name="main_tab_users">Users</string>
<string name="main_tab_map">Map</string>
<string name="main_tab_channel">Channel</string>
<string name="main_tab_settings">Settings</string>
<string name="unknown_node_short_name" translatable="false">\???</string>
<string name="fallback_node_name">Meshtastic %s</string>
<string name="node_filter_placeholder">Filter</string>
<string name="desc_node_filter_clear">clear node filter</string>
@ -100,40 +89,27 @@
<string name="config_device_ledHeartbeatDisabled_summary">Controls the blinking LED on the device. For most devices this will control one of the up to 4 LEDs, the charger and GPS LEDs are not controllable.</string>
<string name="config_device_transmitOverLora_summary">Whether in addition to sending it to MQTT and the PhoneAPI, our NeighborInfo should be transmitted over LoRa. Not available on a channel with default key and name.</string>
<string name="config_security_public_key">Public Key</string>
<string name="config_security_private_key">Private Key</string>
<string name="elevation_suffix" translatable="false">MSL</string>
<string name="channel_air_util" translatable="false">ChUtil %.1f%% AirUtilTX %.1f%%</string>
<string name="channel_name">Channel Name</string>
<string name="channel_options">Channel options</string>
<string name="qr_code">QR code</string>
<string name="unset">Unset</string>
<string name="connection_status">Connection status</string>
<string name="application_icon">application icon</string>
<string name="unknown_username">Unknown Username</string>
<string name="send">Send</string>
<string name="send_text">Send Text</string>
<string name="warning_not_paired">You haven\'t yet paired a Meshtastic compatible radio with this phone. Please pair a device and set your username.\n\nThis open-source application is in development, if you find problems please post on our forum: https://github.com/orgs/meshtastic/discussions.\n\nFor more information see our web page - www.meshtastic.org.</string>
<string name="you">You</string>
<string name="your_name">Your Name</string>
<string name="analytics_okay">Anonymous usage statistics and crash reports.</string>
<string name="looking_for_meshtastic_devices">Looking for Meshtastic devices…</string>
<string name="starting_pairing">Starting pairing</string>
<string name="url_for_join">A URL for joining a Meshtastic mesh</string>
<string name="accept">Accept</string>
<string name="cancel">Cancel</string>
<string name="clear_changes">Clear changes</string>
<string name="change_channel">Change channel</string>
<string name="are_you_sure_channel">Are you sure you want to change the channel? All communication with other nodes will stop until you share the new channel settings.</string>
<string name="new_channel_rcvd">New Channel URL received</string>
<string name="permission_missing">Meshtastic needs location permission and location must be turned on to find new devices via Bluetooth. You can turn it off again afterwards.</string>
<string name="report_bug">Report Bug</string>
<string name="report_a_bug">Report a bug</string>
<string name="report_bug_text">Are you sure you want to report a bug? After reporting, please post in https://github.com/orgs/meshtastic/discussions so we can match up the report with what you found.</string>
<string name="report">Report</string>
<string name="not_paired_yet">You have not paired a radio yet.</string>
<string name="change_radio">Change radio</string>
<string name="pairing_completed">Pairing completed, starting service</string>
<string name="pairing_failed_try_again">Pairing failed, please select again</string>
<string name="location_disabled">Location access is turned off, can not provide position to mesh.</string>
@ -142,33 +118,21 @@
<string name="disconnected">Disconnected</string>
<string name="device_sleeping">Device sleeping</string>
<string name="connected_count">Connected: %1$s online</string>
<string name="update_firmware">Update Firmware</string>
<string name="ip_address">IP Address:</string>
<string name="ip_port">Port:</string>
<string name="connected">Connected to radio</string>
<string name="connected_to">Connected to radio (%s)</string>
<string name="not_connected">Not connected</string>
<string name="connected_sleeping">Connected to radio, but it is sleeping</string>
<string name="update_to">Update to %s</string>
<string name="app_too_old">Application update required</string>
<string name="must_update">You must update this application on the app store (or Github). It is too old to talk to this radio firmware. Please read our <a href="https://meshtastic.org/docs/software/android/installation">docs</a> on this topic.</string>
<string name="none">None (disable)</string>
<string name="modem_config_turbo">Short Range / Turbo</string>
<string name="modem_config_short">Short Range / Fast</string>
<string name="modem_config_medium">Medium Range / Fast</string>
<string name="modem_config_long">Long Range / Fast</string>
<string name="modem_config_mod_long">Long Range / Moderate</string>
<string name="modem_config_very_long">Very Long Range / Slow</string>
<string name="modem_config_unrecognized">UNRECOGNIZED</string>
<string name="meshtastic_service_notifications">Service notifications</string>
<string name="location_disabled_warning">Location must be turned on to find new devices via Bluetooth. You can turn it off again afterwards.</string>
<string name="about">About</string>
<string name="text_messages">Text messages</string>
<string name="channel_invalid">This Channel URL is invalid and can not be used</string>
<string name="debug_panel">Debug Panel</string>
<string name="debug_decoded_payload">Decoded Payload:</string>
<string name="debug_logs_export">Export Logs</string>
<string name="debug_last_messages">500 last messages</string>
<string name="debug_filters">Filters</string>
<string name="debug_active_filters">Active filters</string>
<string name="debug_default_search">Search in logs…</string>
@ -183,21 +147,14 @@
<string name="match_all">Match All | Any</string>
<string name="debug_clear_logs_confirm">This will remove all log packets and database entries from your device - It is a full reset, and is permanent.</string>
<string name="clear">Clear</string>
<string name="updating_firmware">Updating firmware, wait up to eight minutes…</string>
<string name="update_successful">Update successful</string>
<string name="update_failed">Update failed</string>
<string name="message_reception_time">message reception time</string>
<string name="message_reception_state">message reception state</string>
<string name="message_delivery_status">Message delivery status</string>
<string name="meshtastic_messages_notifications">Direct message notifications</string>
<string name="meshtastic_broadcast_notifications">Broadcast message notifications</string>
<string name="meshtastic_alerts_notifications">Alert notifications</string>
<string name="protocol_stress_test">Protocol stress test</string>
<string name="firmware_too_old">Firmware update required.</string>
<string name="firmware_old">The radio firmware is too old to talk to this application. For more information on this see <a href="https://meshtastic.org/docs/getting-started/flashing-firmware">our Firmware Installation guide</a>.</string>
<string name="okay">OK</string>
<string name="must_set_region">You must set a region!</string>
<string name="region">Region</string>
<string name="cant_change_no_radio">Couldn\'t change channel, because radio is not yet connected. Please try again.</string>
<string name="save_messages">Export rangetest.csv</string>
<string name="reset">Reset</string>
@ -205,23 +162,12 @@
<string name="are_you_sure_change_default">Are you sure you want to change to the default channel?</string>
<string name="reset_to_defaults">Reset to defaults</string>
<string name="apply">Apply</string>
<string name="no_app_found">No application found to send URLs</string>
<string name="theme">Theme</string>
<string name="theme_light">Light</string>
<string name="theme_dark">Dark</string>
<string name="theme_system">System default</string>
<string name="choose_theme">Choose theme</string>
<string name="background_required">Background location</string>
<string name="why_background_required">For this feature, you must grant Location permission option \"Allow all the time\".\nThis allows Meshtastic to read your smartphone location and send it to other members of your mesh, even when the app is closed or not in use.</string>
<string name="required_permissions">Required permissions</string>
<string name="provide_location_to_mesh">Provide phone location to mesh</string>
<string name="camera_required">Camera permission</string>
<string name="why_camera_required">We must be granted access to the camera to read QR codes. No pictures or videos will be saved.</string>
<string name="notification_required">Notification permission</string>
<string name="why_notification_required">Meshtastic needs permission for service and message notifications.</string>
<string name="notification_denied">Notification permission denied. To turn on notifications, access: Android Settings > Apps > Meshtastic > Notifications.</string>
<string name="modem_config_slow_short">Short Range / Slow</string>
<string name="modem_config_slow_medium">Medium Range / Slow</string>
<plurals name="delete_messages">
<item quantity="one">Delete message?</item>
<item quantity="other">Delete %s messages?</item>
@ -232,7 +178,6 @@
<string name="select_all">Select all</string>
<string name="close_selection">Close selection</string>
<string name="delete_selection">Delete selected</string>
<string name="modem_config_slow_long">Long Range / Slow</string>
<string name="map_style_selection">Style Selection</string>
<string name="map_download_region">Download Region</string>
<string name="name">Name</string>
@ -247,11 +192,6 @@
<string name="reboot">Reboot</string>
<string name="traceroute">Traceroute</string>
<string name="intro_show">Show Introduction</string>
<string name="intro_welcome_text">Meshtastic is an open-source, off-grid, encrypted communication platform. The Meshtastic radios form a mesh network and communicate using the LoRa protocol to send text messages.</string>
<string name="intro_started">…Let\'s get started!</string>
<string name="intro_started_text">Connect your Meshtastic device by using either Bluetooth, Serial or WiFi. \n\nYou can see which devices are compatible at www.meshtastic.org/docs/hardware</string>
<string name="intro_encryption">"Setting up encryption"</string>
<string name="intro_encryption_text">As standard, a default encryption key is set. To enable your own channel and enhanced encryption, go to the channel tab and change the channel name, this will set a random key for AES256 encryption. \n\nTo communicate with other devices they will need to scan your QR code or follow the shared link to configure the channel settings.</string>
<string name="message">Message</string>
<string name="quick_chat">Quick chat options</string>
<string name="quick_chat_new">New quick chat</string>
@ -261,12 +201,10 @@
<string name="quick_chat_show">Show quick chat menu</string>
<string name="quick_chat_hide">Hide quick chat menu</string>
<string name="factory_reset">Factory reset</string>
<string name="factory_reset_description">This will clear all device configuration you have done.</string>
<string name="bluetooth_disabled">Bluetooth disabled</string>
<string name="permission_missing_31">Meshtastic needs Nearby devices permission to find and connect to devices via Bluetooth. You can turn it off when not in use.</string>
<string name="direct_message">Direct Message</string>
<string name="nodedb_reset">NodeDB reset</string>
<string name="nodedb_reset_description">This will clear all nodes from this list.</string>
<string name="delivery_confirmed">Delivery confirmed</string>
<string name="error">Error</string>
<string name="ignore">Ignore</string>
@ -301,7 +239,6 @@
<string name="error_duty_cycle">Duty Cycle limit reached. Cannot send messages right now, please try again later.</string>
<string name="remove">Remove</string>
<string name="remove_node_text">This node will be removed from your list until your node receives data from it again.</string>
<string name="mute">Mute</string>
<string name="mute_notifications">Mute notifications</string>
<string name="mute_8_hours">8 hours</string>
<string name="mute_1_week">1 week</string>
@ -351,7 +288,6 @@
<string name="good">Good</string>
<string name="none_quality">None</string>
<string name="share_to">Share to…</string>
<string name="share_message">Share message</string>
<string name="signal">Signal</string>
<string name="signal_quality">Signal Quality</string>
<string name="traceroute_log">Traceroute Log</string>
@ -370,10 +306,6 @@
<string name="unknown_age">Unknown Age</string>
<string name="copy">Copy</string>
<string name="alert_bell_text">Alert Bell Character!</string>
<string name="channel_settings">Channel Settings</string>
<string name="samsung_instructions">Samsung Instructions</string>
<string name="alerts_dnd_request_title">Enable Critical Alerts to bypass Do Not Disturb</string>
<string name="alerts_dnd_request_text"><![CDATA[To allow Critical Alerts while your phone is on Do Not Disturb - enable Override Do Not Disturb for the Alerts channel in the Meshtastic app notification settings.<br/><br/>Samsung users may need to add an exception in system settings before enabling it for the Alerts Channel. <a href="https://www.samsung.com/latin_en/support/mobile-devices/how-to-use-the-do-not-disturb-mode-on-your-galaxy-phone/">Visit Samsung Support for assistance.</a>.]]></string>
<string name="critical_alert">Critical Alert!</string>
<string name="favorite">Favorite</string>
<string name="favorite_add">Add \'%s\' as a favorite node?</string>
@ -651,7 +583,6 @@
<string name="node_number">Node Number</string>
<string name="user_id">User ID</string>
<string name="uptime">Uptime</string>
<string name="firmware_version">Firmware version</string>
<string name="timestamp">Timestamp</string>
<string name="heading">Heading</string>
<string name="speed">Speed</string>
@ -665,7 +596,6 @@
<string name="secondary_no_telemetry">No periodic telemetry broadcast</string>
<string name="manual_position_request">Manual position request required</string>
<string name="press_and_drag">Press and drag to reorder</string>
<string name="set_region">Set Region</string>
<string name="unmute">Unmute</string>
<string name="dynamic">Dynamic</string>
<string name="scan_qr_code">Scan QR Code</string>
@ -683,7 +613,6 @@
<string name="display_time_in_12h_format">When enabled, the device will display the time in 12-hour format on screen.</string>
<string name="host_metrics_log">Host Metrics Log</string>
<string name="host">Host</string>
<string name="host_metrics">Host Metrics</string>
<string name="free_memory">Free Memory</string>
<string name="disk_free">Disk Free</string>
<string name="load">Load</string>
@ -726,44 +655,14 @@
<string name="scroll_to_bottom">Scroll to bottom</string>
<string name="meshtastic">Meshtastic</string>
<string name="scanning">Scanning</string>
<string name="app_intro_back_button">Back</string>
<string name="app_intro_next_button">Next</string>
<string name="app_intro_done_button">Done</string>
<string name="app_intro_skip_button">Skip</string>
<string name="security_icon_description">Security Status</string>
<string name="security_icon_secure">Secure</string>
<string name="security_icon_insecure_precise"> - WARNING, insecure location enabled</string>
<string name="security_icon_badge_warning_description">Warning Badge</string>
<string name="unknown_channel">Unknown Channel</string>
<string name="warning">Warning</string>
<string name="overflow_menu">Overflow menu</string>
<string name="uv_lux">UV Lux</string>
<string name="unknown">Unknown</string>
<string name="map_type_normal">Normal</string>
<string name="map_type_satellite">Satellite</string>
<string name="map_type_terrain">Terrain</string>
<string name="map_type_hybrid">Hybrid</string>
<string name="manage_map_layers">Manage Map Layers</string>
<string name="map_layers_title">Map Layers</string>
<string name="no_map_layers_loaded">No custom layers loaded.</string>
<string name="add_layer_button">Add Layer</string>
<string name="hide_layer">Hide Layer</string>
<string name="show_layer">Show Layer</string>
<string name="remove_layer">Remove Layer</string>
<string name="add_layer">Add Layer</string>
<string name="nodes_at_this_location">Nodes at this location</string>
<string name="selected_map_type">Selected Map Type</string>
<string name="manage_custom_tile_sources">Manage Custom Tile Sources</string>
<string name="add_custom_tile_source">Add Custom Tile Source</string>
<string name="no_custom_tile_sources_found">No Custom Tile Sources</string>
<string name="edit_custom_tile_source">Edit Custom Tile Source</string>
<string name="delete_custom_tile_source">Delete Custom Tile Source</string>
<string name="name_cannot_be_empty">Name cannot be empty.</string>
<string name="provider_name_exists">Provider name exists.</string>
<string name="url_cannot_be_empty">URL cannot be empty.</string>
<string name="url_must_contain_placeholders">URL must contain placeholders.</string>
<string name="url_template">URL Template</string>
<string name="url_template_hint">e.g. https://a.tile.openstreetmap.org/{z}/{x}/{y}.png</string>
<string name="security_icon_help_green_lock">A green lock means the channel is securely encrypted with either a 128 or 256 bit AES key.</string>
@ -820,7 +719,6 @@
<string name="track_and_share_locations">Track and Share Locations</string>
<string name="share_your_location_in_real_time">Share your location in real-time and keep your group coordinated with integrated GPS features.</string>
<string name="app_notifications">App Notifications</string>
<string name="send_notifications">Send Notifications</string>
<string name="incoming_messages">Incoming Messages</string>
<string name="notifications_for_channel_and_direct_messages">Notifications for channel and direct messages.</string>
<string name="new_nodes">New Nodes</string>
@ -833,7 +731,6 @@
<string name="phone_location_description">Meshtastic uses your phone\'s location to enable a number of features. You can update your location permissions at any time from settings.</string>
<string name="share_location">Share Location</string>
<string name="share_location_description">Use your phone GPS to send locations to your node to instead of using a hardware GPS on your node.</string>
<string name="enable_location_sharing">Enable Location Sharing</string>
<string name="distance_measurements">Distance Measurements</string>
<string name="distance_measurements_description">Display the distance between your phone and other Meshtastic nodes with positions.</string>
<string name="distance_filters">Distance Filters</string>

View file

@ -17,23 +17,6 @@
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.Material3.DynamicColors.DayNight.NoActionBar"/>
<style name="Theme.App.Starting" parent="Theme.SplashScreen">
// Set the splash screen background, animated icon, and animation duration.
<item name="windowSplashScreenBackground">@color/selectedColor</item>
// Use windowSplashScreenAnimatedIcon to add either a drawable or an
// animated drawable. One of these is required.
<item name="windowSplashScreenAnimatedIcon">@drawable/ic_launcher2_foreground</item>
<item name="windowSplashScreenAnimationDuration">1000</item>
# Required for
# animated icons
// Set the theme of the Activity that directly follows your splash screen.
<item name="postSplashScreenTheme">@style/AppTheme</item>
# Required.
</style>
</resources>

View file

@ -1,5 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="black">#FF000000</color>
<color name="white">#FFFFFFFF</color>
</resources>
<resources></resources>