leon 1 рік тому
батько
коміт
a03e562228

+ 1 - 1
android/build.gradle

@@ -5,7 +5,7 @@ buildscript {
         buildToolsVersion = "31.0.0"
         minSdkVersion = 21
         compileSdkVersion = 33
-        targetSdkVersion = 33
+        targetSdkVersion = 34
 //        compileSdkVersion = 33
 //        targetSdkVersion = 26
 

+ 1 - 1
ios/AppDelegate.mm

@@ -132,7 +132,7 @@ static NSString *const kRNConcurrentRoot = @"concurrentRoot";
 - (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
 {
 //  return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
-#if DEBUGaaa
+#if DEBUG
   return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"];
 #else
   return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];

+ 27 - 0
src/features/trackSomething/components/Metric.tsx

@@ -20,10 +20,13 @@ import MetricModalTime from "./MetricModalTime";
 import Modal from "@/components/layout/Modal.weapp";
 import { rpxToPx } from "@/utils/tools";
 import { AtActivityIndicator } from "taro-ui";
+import showActionSheet from "@/components/basic/ActionSheet";
 
 let useNavigation;
+let useActionSheet;
 if (process.env.TARO_ENV == 'rn') {
     useNavigation = require("@react-navigation/native").useNavigation
+    useActionSheet = require('@expo/react-native-action-sheet').useActionSheet
 }
 
 
@@ -55,8 +58,10 @@ export default function Component(props: any) {
     const [loaded, setLoaded] = useState(false)
     const dispatch = useDispatch();
     let navigation;
+    let showActionSheetWithOptions;
     if (useNavigation) {
         navigation = useNavigation()
+        showActionSheetWithOptions = useActionSheet()
     }
 
 
@@ -284,6 +289,28 @@ export default function Component(props: any) {
     }
 
     function addBtnClick() {
+        if (process.env.TARO_ENV == 'rn') {
+            showActionSheet({
+                showActionSheetWithOptions: showActionSheetWithOptions,
+                itemList: [
+                    t('feature.track_something.metric.choose_metric'),
+                    t('feature.track_something.metric.order')
+                ],
+                success: (res) => {
+                    switch (res) {
+                        case 0:
+                            chooseMore()
+                            break;
+                        case 1:
+                            global.metricAdd = false
+                            setModalType(MetricModalType.order)
+                            setShowPageContainer(true)
+                            break;
+                    }
+                }
+            })
+            return;
+        }
         Taro.showActionSheet({
             itemList: [t('feature.track_something.metric.choose_metric'),
             t('feature.track_something.metric.order')]

+ 1 - 1
src/features/trackTimeDuration/components/WeekCalendar.tsx

@@ -268,7 +268,7 @@ const WeekCalendar = memo((props: { isFastSleep: boolean }) => {
     }
 
     if (!calendarData)
-        return <View />
+        return <View style={{height:parseInt(rpxToPx(520) + '')+rpxToPx(16)+rpxToPx(32)+rpxToPx(20)+rpxToPx(72)}}/>
     return <View style={{ display: 'flex', flexDirection: 'column' }}>
         <View className="calendar_summary_top">
             <View style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', flex: 1 }}>