Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
import { StatusBar } from 'expo-status-bar';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { DefaultTheme, Provider as PaperProvider } from "react-native-paper";
import { Provider as PaperProvider } from "react-native-paper";

import useCachedResources from "./hooks/useCachedResources";
import useColorScheme from "./hooks/useColorScheme";
import Navigation from "./navigation";
const theme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
primary: "#2196f3",
},
};
import { APP_THEME } from './theme';

export default function App() {
const isLoadingComplete = useCachedResources();
Expand All @@ -21,7 +15,7 @@ export default function App() {
return null;
} else {
return (
<PaperProvider theme={theme}>
<PaperProvider theme={APP_THEME}>
<SafeAreaProvider>
<Navigation colorScheme={colorScheme} />
<StatusBar />
Expand Down
5 changes: 4 additions & 1 deletion android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,17 @@
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- for android 11 -->
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE"/>

<queries>
<intent>
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data android:scheme="https"/>
</intent>
</queries>
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true">
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="true" android:theme="@style/AppTheme" android:usesCleartextTraffic="true" android:requestLegacyExternalStorage="true">
<meta-data android:name="expo.modules.updates.ENABLED" android:value="true"/>
<meta-data android:name="expo.modules.updates.EXPO_SDK_VERSION" android:value="44.0.0"/>
<meta-data android:name="expo.modules.updates.EXPO_UPDATES_CHECK_ON_LAUNCH" android:value="ALWAYS"/>
Expand Down
7 changes: 5 additions & 2 deletions lang/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"respondTime": "Respond Time",
"downloadSpeed": "Download Speed",
"showAllData": "Show All Data",
"showSortedTop": "Show Sorted Top"
"showSortedTop": "Show Sorted Top",
"getPermFailed": "Get Permissions Failed"
},
"testRun": {
"title": "Test Run",
Expand All @@ -29,6 +30,8 @@
"hideSomeColumns": "Hide Some Columns"
},
"testConfig": {
"title": "Test Config"
"title": "Test Config",
"clearHistoryStatistics": "Clear history statistics",
"saveAllDataToDevice": "Save all data to device"
}
}
7 changes: 5 additions & 2 deletions lang/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"respondTime": "响应时长",
"downloadSpeed": "下载速度",
"showAllData": "展示所有数据",
"showSortedTop": "展示排序后的前"
"showSortedTop": "展示排序后的前",
"getPermFailed": "获取权限失败"
},
"testRun": {
"title": "运行测试",
Expand All @@ -29,6 +30,8 @@
"hideSomeColumns": "隐藏某些列"
},
"testConfig": {
"title": "测试配置"
"title": "测试配置",
"clearHistoryStatistics": "清除历史统计数据",
"saveAllDataToDevice": "保存数据到设备"
}
}
2 changes: 1 addition & 1 deletion localize/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ I18n.translations = {
en,
};

export { I18n };
export { I18n as AppI18n };
12 changes: 6 additions & 6 deletions navigation/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ import useColorScheme from '../hooks/useColorScheme';
import ModalScreen from '../screens/ModalScreen';
import NotFoundScreen from '../screens/NotFoundScreen';
import TestRunScreen from "../screens/TestRunScreen/index";
import ConfigScreen from "../screens/TestConfigScreen";
import TestConfigScreen from "../screens/TestConfigScreen/index";
import {
RootStackParamList,
RootTabParamList,
RootTabScreenProps,
} from "../types";
import LinkingConfiguration from "./LinkingConfiguration";
import TestStatisticsScreen from "@/screens/TestStatisticsScreen";
import { I18n } from "@/localize";
import { AppI18n } from "@/localize";

export default function Navigation({
colorScheme,
Expand Down Expand Up @@ -86,7 +86,7 @@ function BottomTabNavigator() {
name="TestRun"
component={TestRunScreen}
options={({ navigation }: RootTabScreenProps<"TestRun">) => ({
title: I18n.t("testRun.title"),
title: AppI18n.t("testRun.title"),
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
headerRight: () => (
<Pressable
Expand All @@ -109,7 +109,7 @@ function BottomTabNavigator() {
name="TestStatistics"
component={TestStatisticsScreen}
options={({ navigation }: RootTabScreenProps<"TestStatistics">) => ({
title: I18n.t("testStatistics.title"),
title: AppI18n.t("testStatistics.title"),
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
headerRight: () => (
<Pressable
Expand All @@ -130,9 +130,9 @@ function BottomTabNavigator() {
/>
<BottomTab.Screen
name="TestConfig"
component={ConfigScreen}
component={TestConfigScreen}
options={{
title: I18n.t("testConfig.title"),
title: AppI18n.t("testConfig.title"),
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
}}
/>
Expand Down
Loading