@@ -8,12 +8,13 @@ import {
88} from 'react-native' ;
99import Icon from 'react-native-vector-icons/MaterialIcons' ;
1010import LogManager , { LogEntry } from '../services/LogManager' ;
11+ import { AppColors } from '../theme' ;
1112
1213const LEVEL_COLORS : Record < string , string > = {
13- D : '#9E9E9E' ,
14- I : '#64B5F6' ,
15- W : '#FFB74D' ,
16- E : '#EF5350' ,
14+ D : AppColors . osLogDebug ,
15+ I : AppColors . osLogInfo ,
16+ W : AppColors . osLogWarn ,
17+ E : AppColors . osLogError ,
1718} ;
1819
1920export default function LogView ( ) {
@@ -28,7 +29,6 @@ export default function LogView() {
2829 useEffect ( ( ) => {
2930 const unsub = LogManager . getInstance ( ) . subscribe ( updated => {
3031 setEntries ( updated ) ;
31- // auto-scroll to end
3232 setTimeout ( ( ) => {
3333 vertScrollRef . current ?. scrollToEnd ( { animated : false } ) ;
3434 } , 50 ) ;
@@ -43,7 +43,6 @@ export default function LogView() {
4343 style = { [ styles . container , { height : expanded ? 200 : 36 } ] }
4444 testID = "log_view_container"
4545 >
46- { /* Header */ }
4746 < TouchableOpacity
4847 style = { styles . header }
4948 onPress = { ( ) => setExpanded ( prev => ! prev ) }
@@ -58,12 +57,12 @@ export default function LogView() {
5857 hitSlop = { { top : 8 , bottom : 8 , left : 8 , right : 8 } }
5958 testID = "log_view_clear_button"
6059 >
61- < Icon name = "delete" size = { 18 } color = "#9E9E9E" />
60+ < Icon name = "delete" size = { 18 } color = { AppColors . osGrey500 } />
6261 </ TouchableOpacity >
6362 < Icon
6463 name = { expanded ? 'expand-less' : 'expand-more' }
6564 size = { 18 }
66- color = "#9E9E9E"
65+ color = { AppColors . osGrey500 }
6766 style = { styles . expandIcon }
6867 />
6968 </ View >
@@ -105,7 +104,7 @@ export default function LogView() {
105104 < Text
106105 style = { [
107106 styles . level ,
108- { color : LEVEL_COLORS [ entry . level ] ?? '#9E9E9E' } ,
107+ { color : LEVEL_COLORS [ entry . level ] ?? AppColors . osGrey500 } ,
109108 ] }
110109 testID = { `log_entry_${ index } _level` }
111110 >
@@ -131,19 +130,19 @@ export default function LogView() {
131130const styles = StyleSheet . create ( {
132131 container : {
133132 width : '100%' ,
134- backgroundColor : '#1A1B1E' ,
133+ backgroundColor : AppColors . osLogBackground ,
135134 } ,
136135 header : {
137136 flexDirection : 'row' ,
138137 alignItems : 'center' ,
139138 justifyContent : 'space-between' ,
140- paddingHorizontal : 12 ,
141- paddingVertical : 6 ,
139+ paddingHorizontal : 16 ,
140+ paddingVertical : 12 ,
142141 } ,
143142 headerText : {
144143 fontSize : 11 ,
145- fontWeight : '600 ' ,
146- color : '#9E9E9E' ,
144+ fontWeight : '700 ' ,
145+ color : AppColors . white ,
147146 letterSpacing : 0.8 ,
148147 } ,
149148 headerRight : {
@@ -166,7 +165,7 @@ const styles = StyleSheet.create({
166165 } ,
167166 timestamp : {
168167 fontSize : 11 ,
169- color : '#757575' ,
168+ color : AppColors . osLogTimestamp ,
170169 fontFamily : 'monospace' ,
171170 } ,
172171 level : {
@@ -176,12 +175,12 @@ const styles = StyleSheet.create({
176175 } ,
177176 message : {
178177 fontSize : 11 ,
179- color : '#E0E0E0' ,
178+ color : AppColors . white ,
180179 fontFamily : 'monospace' ,
181180 } ,
182181 emptyText : {
183182 fontSize : 11 ,
184- color : '#757575' ,
183+ color : AppColors . osGrey500 ,
185184 fontStyle : 'italic' ,
186185 paddingVertical : 4 ,
187186 } ,
0 commit comments