ipanel-rnapp-ajb-base 1.0.0 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/App.js +120 -119
- package/bin/local-dev.js +5 -1
- package/package.json +1 -1
package/app/App.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, {useState, useEffect, useMemo} from
|
|
1
|
+
import React, { useState, useEffect, useMemo } from "react";
|
|
2
2
|
import {
|
|
3
3
|
View,
|
|
4
4
|
LogBox,
|
|
@@ -11,59 +11,57 @@ import {
|
|
|
11
11
|
AppState,
|
|
12
12
|
NativeEventEmitter,
|
|
13
13
|
DeviceEventEmitter,
|
|
14
|
-
} from
|
|
15
|
-
import {NavigationContainer} from
|
|
16
|
-
import {createStackNavigator} from
|
|
17
|
-
import {SheetProvider} from
|
|
18
|
-
import DeviceInfo from
|
|
19
|
-
import {SafeAreaProvider, SafeAreaView} from
|
|
20
|
-
import VersionUpdateConfirm from
|
|
14
|
+
} from "react-native";
|
|
15
|
+
import { NavigationContainer } from "@react-navigation/native";
|
|
16
|
+
import { createStackNavigator } from "@react-navigation/stack";
|
|
17
|
+
import { SheetProvider } from "react-native-actions-sheet";
|
|
18
|
+
import DeviceInfo from "react-native-device-info";
|
|
19
|
+
import { SafeAreaProvider, SafeAreaView } from "react-native-safe-area-context";
|
|
20
|
+
import VersionUpdateConfirm from "./components/VersionUpdateConfirm";
|
|
21
21
|
// import NetInfo from '@react-native-community/netinfo';
|
|
22
22
|
|
|
23
23
|
// 重要:base.js需放在一切自定义代码之前初始化
|
|
24
|
-
import
|
|
24
|
+
import "./base.js";
|
|
25
25
|
// 版本升级相关代码
|
|
26
|
-
import
|
|
26
|
+
import "./utils/bundleUpdater";
|
|
27
27
|
// 对接声必可屏幕
|
|
28
|
-
import
|
|
28
|
+
import "./utils/SBK_plugin";
|
|
29
29
|
|
|
30
30
|
// 注册actionSheet组件
|
|
31
|
-
import
|
|
31
|
+
import "./components/sheets.js";
|
|
32
32
|
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import Notify from './components/common/Notify';
|
|
39
|
-
import storage from './storage';
|
|
33
|
+
import Loading from "./components/common/Loading";
|
|
34
|
+
import Toast from "./components/common/Toast";
|
|
35
|
+
import Dialog from "./components/common/Dialog";
|
|
36
|
+
import Notify from "./components/common/Notify";
|
|
37
|
+
import storage from "./storage";
|
|
40
38
|
|
|
41
|
-
import {navigationRef} from
|
|
42
|
-
import checkLogin from
|
|
43
|
-
import {getModuleVersionInfo} from
|
|
44
|
-
import {appReport} from
|
|
39
|
+
import { navigationRef } from "./utils/RootNavigation";
|
|
40
|
+
import checkLogin from "./hooks/checkLogin";
|
|
41
|
+
import { getModuleVersionInfo } from "./api/";
|
|
42
|
+
import { appReport } from "./utils/common";
|
|
45
43
|
|
|
46
44
|
// 基础导航页、登录页
|
|
47
|
-
import BaseScreen from
|
|
48
|
-
import LoginScreen from
|
|
49
|
-
import NewLoginScreen from
|
|
50
|
-
import ResePasswordScreen from
|
|
51
|
-
import SbkScreen from
|
|
52
|
-
|
|
53
|
-
import eventBus, {EVENTS} from
|
|
54
|
-
|
|
55
|
-
import useDynamicPackages from
|
|
56
|
-
import useAddress from
|
|
57
|
-
import useAddress2 from
|
|
58
|
-
import useNavigationFocus from
|
|
59
|
-
import useLatest from
|
|
60
|
-
import useDebounceFn from
|
|
61
|
-
import useUser from
|
|
62
|
-
import useKeyboard from
|
|
45
|
+
import BaseScreen from "./screens/BaseScreen";
|
|
46
|
+
import LoginScreen from "./screens/LoginScreen";
|
|
47
|
+
import NewLoginScreen from "./screens/LoginScreen/indexNew";
|
|
48
|
+
import ResePasswordScreen from "./screens/ResePassword";
|
|
49
|
+
import SbkScreen from "./screens/SbkScreen";
|
|
50
|
+
|
|
51
|
+
import eventBus, { EVENTS } from "./eventBus";
|
|
52
|
+
|
|
53
|
+
import useDynamicPackages from "./hooks/useDynamicPackages";
|
|
54
|
+
import useAddress from "./hooks/useAddress";
|
|
55
|
+
import useAddress2 from "./hooks/useAddress2";
|
|
56
|
+
import useNavigationFocus from "./hooks/useNavigationFocus";
|
|
57
|
+
import useLatest from "./hooks/useLatest";
|
|
58
|
+
import useDebounceFn from "./hooks/useDebounceFn";
|
|
59
|
+
import useUser from "./hooks/useUser";
|
|
60
|
+
import useKeyboard from "./hooks/useKeyboard";
|
|
63
61
|
|
|
64
62
|
LogBox.ignoreLogs([
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
"ViewPropTypes will be removed",
|
|
64
|
+
"ColorPropType will be removed",
|
|
67
65
|
]);
|
|
68
66
|
|
|
69
67
|
// base hooks, 内部可能依赖基础的base函数,因此放在基础base初始化之后
|
|
@@ -78,25 +76,25 @@ global.base.hooks = {
|
|
|
78
76
|
};
|
|
79
77
|
|
|
80
78
|
// 公共页面
|
|
81
|
-
import WebviewScreen from
|
|
82
|
-
import ScanQRCodeScreen from
|
|
83
|
-
import OperatorSelectScreen from
|
|
84
|
-
import EditInvoiceTitleScreen from
|
|
85
|
-
import InvoiceTitleListScreen from
|
|
86
|
-
import TvAlbumScreen from
|
|
87
|
-
import DeviceFeedbackScreen from
|
|
88
|
-
import DeviceAnswerDetailScreen from
|
|
79
|
+
import WebviewScreen from "./screens/WebviewScreen";
|
|
80
|
+
import ScanQRCodeScreen from "./screens/CommonScreens/ScanQRCodeScreen";
|
|
81
|
+
import OperatorSelectScreen from "./screens/CommonScreens/OperatorSelectScreen";
|
|
82
|
+
import EditInvoiceTitleScreen from "./screens/CommonScreens/EditInvoiceTitleScreen";
|
|
83
|
+
import InvoiceTitleListScreen from "./screens/CommonScreens/InvoiceTitleListScreen";
|
|
84
|
+
import TvAlbumScreen from "./screens/CommonScreens/TvAlbumScreen";
|
|
85
|
+
import DeviceFeedbackScreen from "./screens/CommonScreens/DeviceFeedbackScreen";
|
|
86
|
+
import DeviceAnswerDetailScreen from "./screens/CommonScreens/DeviceAnswerDetailScreen";
|
|
89
87
|
|
|
90
88
|
// Boss绑定页面
|
|
91
|
-
import BindBossScreen from
|
|
89
|
+
import BindBossScreen from "./screens/CommonScreens/BossScreen";
|
|
92
90
|
|
|
93
91
|
const Stack = createStackNavigator();
|
|
94
92
|
|
|
95
|
-
const envVersion = NativeModules?.RNToNativeEmitter?.serverCluster ||
|
|
93
|
+
const envVersion = NativeModules?.RNToNativeEmitter?.serverCluster || "alpha";
|
|
96
94
|
// const envVersion = 'release';
|
|
97
95
|
|
|
98
96
|
let eventEmitter;
|
|
99
|
-
if (Platform.OS ===
|
|
97
|
+
if (Platform.OS === "android") {
|
|
100
98
|
// ----yusm:安卓使用DeviceEventEmitter
|
|
101
99
|
eventEmitter = DeviceEventEmitter;
|
|
102
100
|
} else {
|
|
@@ -107,23 +105,23 @@ const CommonScreens = {
|
|
|
107
105
|
Home: {
|
|
108
106
|
component: BaseScreen,
|
|
109
107
|
screenOptions: {
|
|
110
|
-
title:
|
|
108
|
+
title: "首页",
|
|
111
109
|
headerShown: false,
|
|
112
110
|
includeBottom: true,
|
|
113
111
|
},
|
|
114
112
|
},
|
|
115
113
|
Login: {
|
|
116
114
|
component:
|
|
117
|
-
DeviceInfo.getBrand() ===
|
|
115
|
+
DeviceInfo.getBrand() === "Allwinner" ? LoginScreen : NewLoginScreen,
|
|
118
116
|
screenOptions: {
|
|
119
|
-
title:
|
|
117
|
+
title: "登录",
|
|
120
118
|
headerShown: false,
|
|
121
119
|
},
|
|
122
120
|
},
|
|
123
121
|
ResePasswordScreen: {
|
|
124
122
|
component: ResePasswordScreen,
|
|
125
123
|
screenOptions: {
|
|
126
|
-
title:
|
|
124
|
+
title: "重置密码",
|
|
127
125
|
headerShown: false,
|
|
128
126
|
},
|
|
129
127
|
},
|
|
@@ -136,62 +134,62 @@ const CommonScreens = {
|
|
|
136
134
|
OperatorSelectScreen: {
|
|
137
135
|
component: OperatorSelectScreen,
|
|
138
136
|
screenOptions: {
|
|
139
|
-
title:
|
|
137
|
+
title: "选择运营商",
|
|
140
138
|
headerShown: false,
|
|
141
139
|
},
|
|
142
140
|
},
|
|
143
141
|
InvoiceTitleListScreen: {
|
|
144
142
|
component: InvoiceTitleListScreen,
|
|
145
143
|
screenOptions: {
|
|
146
|
-
title:
|
|
144
|
+
title: "发票抬头",
|
|
147
145
|
headerShown: false,
|
|
148
146
|
},
|
|
149
147
|
},
|
|
150
148
|
EditInvoiceTitleScreen: {
|
|
151
149
|
component: EditInvoiceTitleScreen,
|
|
152
150
|
screenOptions: {
|
|
153
|
-
title:
|
|
151
|
+
title: "编辑发票抬头",
|
|
154
152
|
headerShown: false,
|
|
155
153
|
},
|
|
156
154
|
},
|
|
157
155
|
WebviewScreen: {
|
|
158
156
|
component: WebviewScreen,
|
|
159
157
|
screenOptions: {
|
|
160
|
-
title:
|
|
158
|
+
title: "",
|
|
161
159
|
headerShown: false,
|
|
162
160
|
},
|
|
163
161
|
},
|
|
164
162
|
TvAlbumScreen: {
|
|
165
163
|
component: TvAlbumScreen,
|
|
166
164
|
screenOptions: {
|
|
167
|
-
title:
|
|
165
|
+
title: "电视相册",
|
|
168
166
|
},
|
|
169
167
|
},
|
|
170
168
|
DeviceFeedbackScreen: {
|
|
171
169
|
component: DeviceFeedbackScreen,
|
|
172
170
|
screenOptions: {
|
|
173
|
-
title:
|
|
171
|
+
title: "帮助与反馈",
|
|
174
172
|
headerShown: false,
|
|
175
173
|
},
|
|
176
174
|
},
|
|
177
175
|
DeviceAnswerDetailScreen: {
|
|
178
176
|
component: DeviceAnswerDetailScreen,
|
|
179
177
|
screenOptions: {
|
|
180
|
-
title:
|
|
178
|
+
title: "解答",
|
|
181
179
|
headerShown: false,
|
|
182
180
|
},
|
|
183
181
|
},
|
|
184
182
|
SbkScreen: {
|
|
185
183
|
component: SbkScreen,
|
|
186
184
|
screenOptions: {
|
|
187
|
-
title:
|
|
185
|
+
title: "爱家宝",
|
|
188
186
|
headerShown: false,
|
|
189
187
|
},
|
|
190
188
|
},
|
|
191
189
|
BindBossScreen: {
|
|
192
190
|
component: BindBossScreen,
|
|
193
191
|
screenOptions: {
|
|
194
|
-
title:
|
|
192
|
+
title: "绑定boss账号",
|
|
195
193
|
headerShown: false,
|
|
196
194
|
},
|
|
197
195
|
},
|
|
@@ -199,7 +197,7 @@ const CommonScreens = {
|
|
|
199
197
|
|
|
200
198
|
// screen分组
|
|
201
199
|
function StackScreenGroup(screens) {
|
|
202
|
-
return Object.entries(screens).map(([name, {component, screenOptions}]) => (
|
|
200
|
+
return Object.entries(screens).map(([name, { component, screenOptions }]) => (
|
|
203
201
|
<Stack.Screen
|
|
204
202
|
name={name}
|
|
205
203
|
component={component}
|
|
@@ -212,24 +210,24 @@ function StackScreenGroup(screens) {
|
|
|
212
210
|
// 兜底的底部导航模块
|
|
213
211
|
const initialNavigationPackages = [
|
|
214
212
|
{
|
|
215
|
-
bundleName:
|
|
213
|
+
bundleName: "index.ios.bundle",
|
|
216
214
|
isMain: 1,
|
|
217
|
-
md5:
|
|
218
|
-
moduleName:
|
|
219
|
-
modulePublishDesc:
|
|
220
|
-
upgradeMode:
|
|
221
|
-
url:
|
|
222
|
-
version:
|
|
215
|
+
md5: "7284896d821f9e206efc979590561e18",
|
|
216
|
+
moduleName: "tvShare",
|
|
217
|
+
modulePublishDesc: "电视分享ios",
|
|
218
|
+
upgradeMode: "force",
|
|
219
|
+
url: "https://dev.ipanelcloud2.ipanel.cn:50443/jshomeapp/appFiles/packFiles/ipanel/ios/tvShare/v1.0.2/20230601120633/ipanel_ios_tvShare_v1.0.2_20230601120633.zip",
|
|
220
|
+
version: "v1.0.2",
|
|
223
221
|
},
|
|
224
222
|
{
|
|
225
|
-
bundleName:
|
|
223
|
+
bundleName: "index.ios.bundle",
|
|
226
224
|
isMain: 1,
|
|
227
|
-
md5:
|
|
228
|
-
moduleName:
|
|
229
|
-
modulePublishDesc:
|
|
230
|
-
upgradeMode:
|
|
231
|
-
url:
|
|
232
|
-
version:
|
|
225
|
+
md5: "0fd7a6212a7b70baa54ce2a9cc99698b",
|
|
226
|
+
moduleName: "smartHome",
|
|
227
|
+
modulePublishDesc: "智能家居ios",
|
|
228
|
+
upgradeMode: "force",
|
|
229
|
+
url: "https://dev.ipanelcloud2.ipanel.cn:50443/jshomeapp/appFiles/packFiles/ipanel/ios/smartHome/v1.0.2/20230601120752/ipanel_ios_smartHome_v1.0.2_20230601120752.zip",
|
|
230
|
+
version: "v1.0.2",
|
|
233
231
|
},
|
|
234
232
|
// {
|
|
235
233
|
// bundleName: 'index.ios.bundle',
|
|
@@ -257,7 +255,7 @@ global.base.initialNavigationPackages = initialNavigationPackages;
|
|
|
257
255
|
// updateNavigationPackagesFromStorage(1);
|
|
258
256
|
|
|
259
257
|
const App = () => {
|
|
260
|
-
const {DynamicStackScreens} = useDynamicPackages();
|
|
258
|
+
const { DynamicStackScreens } = useDynamicPackages();
|
|
261
259
|
// 当前页面是否需要包括底部安全区
|
|
262
260
|
const [includeBottom, setIncludeBottom] = useState(false);
|
|
263
261
|
const [versionUpdateConfirmVisible, setVersionUpdateConfirmVisible] =
|
|
@@ -278,16 +276,16 @@ const App = () => {
|
|
|
278
276
|
|
|
279
277
|
// mounted
|
|
280
278
|
useEffect(() => {
|
|
281
|
-
StatusBar.setBackgroundColor(
|
|
282
|
-
StatusBar.setBarStyle(
|
|
283
|
-
storage.get(
|
|
284
|
-
global.base.accountType = res ||
|
|
279
|
+
StatusBar.setBackgroundColor("transparent");
|
|
280
|
+
StatusBar.setBarStyle("dark-content");
|
|
281
|
+
storage.get("accountType").then((res) => {
|
|
282
|
+
global.base.accountType = res || "ajb";
|
|
285
283
|
});
|
|
286
284
|
|
|
287
285
|
const rnToNative = NativeModules.RNToNativeEmitter;
|
|
288
286
|
// 应用通知app可正常显示,页面正常运行了,在componentDidMount 中加
|
|
289
287
|
rnToNative?.notifyApplicationReady({
|
|
290
|
-
moduleName:
|
|
288
|
+
moduleName: "base",
|
|
291
289
|
}); // 不用传参数
|
|
292
290
|
|
|
293
291
|
// 首次进入app登录鉴权
|
|
@@ -296,35 +294,35 @@ const App = () => {
|
|
|
296
294
|
// 获取最新版本并通知原生平台,由平台判断后弹出升级确认提示
|
|
297
295
|
checkBaseVersion();
|
|
298
296
|
|
|
299
|
-
AppState.addEventListener(
|
|
300
|
-
console.log(
|
|
301
|
-
if (nextAppState ===
|
|
302
|
-
appReport(
|
|
297
|
+
AppState.addEventListener("change", async (nextAppState) => {
|
|
298
|
+
console.log("nextAppState", nextAppState);
|
|
299
|
+
if (nextAppState === "active") {
|
|
300
|
+
appReport("APP_STARTUP");
|
|
303
301
|
}
|
|
304
302
|
});
|
|
305
303
|
|
|
306
304
|
const keyboardDidShowListener = Keyboard.addListener(
|
|
307
|
-
|
|
305
|
+
"keyboardDidShow",
|
|
308
306
|
() => {
|
|
309
307
|
setIsKeyboardVisible(true);
|
|
310
|
-
}
|
|
308
|
+
}
|
|
311
309
|
);
|
|
312
310
|
|
|
313
311
|
const keyboardDidHideListener = Keyboard.addListener(
|
|
314
|
-
|
|
312
|
+
"keyboardDidHide",
|
|
315
313
|
() => {
|
|
316
314
|
setIsKeyboardVisible(false);
|
|
317
|
-
}
|
|
315
|
+
}
|
|
318
316
|
);
|
|
319
317
|
|
|
320
318
|
const cellularDataStateListener = eventEmitter.addListener(
|
|
321
|
-
|
|
322
|
-
data => {
|
|
323
|
-
console.log(JSON.stringify(data),
|
|
319
|
+
"CellularDataState",
|
|
320
|
+
(data) => {
|
|
321
|
+
console.log(JSON.stringify(data), "CellularDataState");
|
|
324
322
|
if (data?.state && data?.state !== 0) {
|
|
325
323
|
checkBaseVersion();
|
|
326
324
|
}
|
|
327
|
-
}
|
|
325
|
+
}
|
|
328
326
|
);
|
|
329
327
|
|
|
330
328
|
return () => {
|
|
@@ -343,23 +341,23 @@ const App = () => {
|
|
|
343
341
|
|
|
344
342
|
const checkBaseVersion = async () => {
|
|
345
343
|
// 当前版本
|
|
346
|
-
const baseVersionInfo = await global.base.getBundleInfo(
|
|
344
|
+
const baseVersionInfo = await global.base.getBundleInfo("base");
|
|
347
345
|
if (!baseVersionInfo) {
|
|
348
346
|
return false;
|
|
349
347
|
}
|
|
350
348
|
try {
|
|
351
349
|
const res = await getModuleVersionInfo({
|
|
352
350
|
platform: Platform.OS,
|
|
353
|
-
operatorId:
|
|
354
|
-
moduleName:
|
|
351
|
+
operatorId: "ipanel",
|
|
352
|
+
moduleName: "base",
|
|
355
353
|
});
|
|
356
354
|
if (res.code === 0) {
|
|
357
355
|
const versionInfo = res.data.packages[0];
|
|
358
356
|
const newVersion = Number(
|
|
359
|
-
versionInfo.version.slice(1).replace(/\./g,
|
|
357
|
+
versionInfo.version.slice(1).replace(/\./g, "")
|
|
360
358
|
);
|
|
361
359
|
const currentVersion = Number(
|
|
362
|
-
baseVersionInfo.version.slice(1).replace(/\./g,
|
|
360
|
+
baseVersionInfo.version.slice(1).replace(/\./g, "")
|
|
363
361
|
);
|
|
364
362
|
if (newVersion > currentVersion) {
|
|
365
363
|
setVersionUpdateConfirmVisible(true);
|
|
@@ -373,21 +371,21 @@ const App = () => {
|
|
|
373
371
|
global.base.checkBaseVersion = checkBaseVersion;
|
|
374
372
|
|
|
375
373
|
// 升级测试
|
|
376
|
-
const onUpdate = versionInfo => {
|
|
374
|
+
const onUpdate = (versionInfo) => {
|
|
377
375
|
const rnToNative = NativeModules.RNToNativeEmitter;
|
|
378
376
|
rnToNative?.selectedInfo({
|
|
379
377
|
packages: [versionInfo],
|
|
380
|
-
operatorId:
|
|
378
|
+
operatorId: "ipanel",
|
|
381
379
|
});
|
|
382
380
|
};
|
|
383
381
|
|
|
384
|
-
const handleStateChange = ({routes}) => {
|
|
382
|
+
const handleStateChange = ({ routes }) => {
|
|
385
383
|
const routeName = routes[routes.length - 1].name;
|
|
386
384
|
setIncludeBottom(
|
|
387
|
-
allStackScreens[routeName]?.screenOptions?.includeBottom || false
|
|
385
|
+
allStackScreens[routeName]?.screenOptions?.includeBottom || false
|
|
388
386
|
);
|
|
389
387
|
/* 加载之后每次navigate都鉴权一把登录状态(重置密码不需要检测) */
|
|
390
|
-
if (routeName !==
|
|
388
|
+
if (routeName !== "ResePasswordScreen") {
|
|
391
389
|
checkLogin();
|
|
392
390
|
}
|
|
393
391
|
|
|
@@ -401,12 +399,14 @@ const App = () => {
|
|
|
401
399
|
<SheetProvider>
|
|
402
400
|
<NavigationContainer
|
|
403
401
|
ref={navigationRef}
|
|
404
|
-
onStateChange={handleStateChange}
|
|
402
|
+
onStateChange={handleStateChange}
|
|
403
|
+
>
|
|
405
404
|
<Stack.Navigator
|
|
406
|
-
initialRouteName={
|
|
405
|
+
initialRouteName={"Login"}
|
|
407
406
|
screenOptions={{
|
|
408
407
|
headerStyle: {},
|
|
409
|
-
}}
|
|
408
|
+
}}
|
|
409
|
+
>
|
|
410
410
|
{/* 首页 */}
|
|
411
411
|
{/*<Stack.Screen*/}
|
|
412
412
|
{/* name="Home"*/}
|
|
@@ -435,10 +435,10 @@ const App = () => {
|
|
|
435
435
|
</NavigationContainer>
|
|
436
436
|
</SheetProvider>
|
|
437
437
|
|
|
438
|
-
<Loading onRef={ref => (global.loading = ref)} />
|
|
439
|
-
<Toast onRef={ref => (global.toast = ref)} />
|
|
440
|
-
<Notify onRef={ref => (global.notify = ref)} />
|
|
441
|
-
<Dialog onRef={ref => (global.dialog = ref)} />
|
|
438
|
+
<Loading onRef={(ref) => (global.loading = ref)} />
|
|
439
|
+
<Toast onRef={(ref) => (global.toast = ref)} />
|
|
440
|
+
<Notify onRef={(ref) => (global.notify = ref)} />
|
|
441
|
+
<Dialog onRef={(ref) => (global.dialog = ref)} />
|
|
442
442
|
{versionUpdateConfirmVisible && (
|
|
443
443
|
<VersionUpdateConfirm
|
|
444
444
|
onVisibleChange={setVersionUpdateConfirmVisible}
|
|
@@ -446,7 +446,7 @@ const App = () => {
|
|
|
446
446
|
onUpdate={onUpdate}
|
|
447
447
|
/>
|
|
448
448
|
)}
|
|
449
|
-
{isKeyboardVisible && Platform.OS ===
|
|
449
|
+
{isKeyboardVisible && Platform.OS === "ios" && (
|
|
450
450
|
<TouchableWithoutFeedback onPress={handleTouchOutside}>
|
|
451
451
|
<View style={styles.touchableContainer} />
|
|
452
452
|
</TouchableWithoutFeedback>
|
|
@@ -455,11 +455,12 @@ const App = () => {
|
|
|
455
455
|
);
|
|
456
456
|
};
|
|
457
457
|
|
|
458
|
-
return Platform.OS ===
|
|
458
|
+
return Platform.OS === "ios" ? (
|
|
459
459
|
<SafeAreaProvider>
|
|
460
460
|
<SafeAreaView
|
|
461
|
-
style={{flex: 1}}
|
|
462
|
-
edges={includeBottom ? [
|
|
461
|
+
style={{ flex: 1 }}
|
|
462
|
+
edges={includeBottom ? ["right", "left"] : ["right", "bottom", "left"]}
|
|
463
|
+
>
|
|
463
464
|
{renderContent()}
|
|
464
465
|
</SafeAreaView>
|
|
465
466
|
</SafeAreaProvider>
|
package/bin/local-dev.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
"use strict";
|
|
3
3
|
const fs = require("fs");
|
|
4
|
+
const path = require("path");
|
|
4
5
|
|
|
5
6
|
(function () {
|
|
6
7
|
console.log("ipanel_rnapp_ajb_base local_dev=====");
|
|
8
|
+
|
|
9
|
+
const env = path.resolve(__dirname, "../app/.local_dev/env.js");
|
|
10
|
+
fs.writeFileSync(env, `export default '__LOCAL_DEV__';`);
|
|
7
11
|
})();
|