leon 1 anno fa
parent
commit
9e4c141895

+ 2 - 2
ios/hola.xcodeproj/project.pbxproj

@@ -530,7 +530,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 1.0.0;
+				MARKETING_VERSION = 1.0.1;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",
@@ -562,7 +562,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 1.0.0;
+				MARKETING_VERSION = 1.0.1;
 				OTHER_LDFLAGS = (
 					"$(inherited)",
 					"-ObjC",

+ 3 - 3
ios/hola/Info.plist

@@ -17,7 +17,7 @@
 	<key>CFBundlePackageType</key>
 	<string>APPL</string>
 	<key>CFBundleShortVersionString</key>
-	<string>1.0</string>
+	<string>1.0.1</string>
 	<key>CFBundleSignature</key>
 	<string>????</string>
 	<key>CFBundleURLTypes</key>
@@ -63,13 +63,13 @@
 	<key>NSMicrophoneUsageDescription</key>
 	<string>Allow $(PRODUCT_NAME) to access your microphone</string>
 	<key>NSMotionUsageDescription</key>
-	<string>Allow $(PRODUCT_NAME) to access your device&apos;s accelerometer</string>
+	<string>Allow $(PRODUCT_NAME) to access your device's accelerometer</string>
 	<key>NSPhotoLibraryAddUsageDescription</key>
 	<string>So you can add or update your profile picture, which helps you stand out on the upcoming Community Leaderboard.</string>
 	<key>NSPhotoLibraryUsageDescription</key>
 	<string>So you can add or update your profile picture, which helps you stand out on the upcoming Community Leaderboard.</string>
 	<key>NSUserNotificationsUsageDescription</key>
-	<string>You&apos;ll get reminders at scheduled times.</string>
+	<string>You'll get reminders at scheduled times.</string>
 	<key>UILaunchStoryboardName</key>
 	<string>LaunchScreen</string>
 	<key>UIRequiredDeviceCapabilities</key>

File diff suppressed because it is too large
+ 0 - 0
ios/main.jsbundle


+ 10 - 10
src/features/daynight/DayNightRing.tsx

@@ -44,8 +44,8 @@ export default function DayNightRing(props: {
             realRingBig.color = ColorType.day
             var duration = (authInfo.day_completed.sunset_ts - authInfo.day_completed.sunrise_ts) / 1000
             var time = authInfo.day_completed.sunrise
-            time = time.substring(time.length-8, time.length)
-            var start = new Date('2024-01-01T'+time)
+            time = time.substring(time.length - 8, time.length)
+            var start = new Date('2024-01-01T' + time)
             realRingBig.startArc = (start.getHours() * 3600 + start.getMinutes() * 60) / (24 * 3600) * 2 * Math.PI - Math.PI / 2.0;
             realRingBig.durationArc = (duration) / (24 * 3600) * 2 * Math.PI;
             // if (!realRingBig.startArc){
@@ -66,8 +66,8 @@ export default function DayNightRing(props: {
 
         var duration = sunSet - sunRise
 
-        if (global.dayObj){
-            duration = (global.dayObj.sunset.timestamp-global.dayObj.sunrise.timestamp)/60000
+        if (global.dayObj) {
+            duration = (global.dayObj.sunset.timestamp - global.dayObj.sunrise.timestamp) / 60000
         }
 
         realRingBig.startArc = (sunRise * 60) / (24 * 3600) * 2 * Math.PI - Math.PI / 2.0;
@@ -75,7 +75,7 @@ export default function DayNightRing(props: {
 
         var currentDot = getDot(null, false)
 
-        if (authInfo && authInfo.timezone.id) {
+        if (authInfo && authInfo.timezone && authInfo.timezone.id) {
             var current1 = dayjs()
             var current = dayjs().tz(authInfo.timezone.id)
             var offset = current.day() * 24 * 60 + current.hour() * 60 + current.minute() - current1.day() * 24 * 60 - current1.hour() * 60 - current1.minute()
@@ -152,9 +152,9 @@ export default function DayNightRing(props: {
             realRingBig.color = ColorType.night
             var duration = (authInfo.night_completed.sunrise_ts - authInfo.night_completed.sunset_ts) / 1000
             var time = authInfo.night_completed.sunset
-            time = time.substring(time.length-8, time.length)
-            var start = new Date('2024-01-01T'+time)
-            
+            time = time.substring(time.length - 8, time.length)
+            var start = new Date('2024-01-01T' + time)
+
             realRingBig.startArc = (start.getHours() * 3600 + start.getMinutes() * 60) / (24 * 3600) * 2 * Math.PI - Math.PI / 2.0;
             realRingBig.durationArc = (duration) / (24 * 3600) * 2 * Math.PI;
             //已结束未更新暂停时,显示current_dot
@@ -177,8 +177,8 @@ export default function DayNightRing(props: {
         }
         var duration = sunRise - sunSet
 
-        if (global.nightObj){
-            duration = (global.nightObj.sunrise.timestamp-global.nightObj.sunset.timestamp)/60000
+        if (global.nightObj) {
+            duration = (global.nightObj.sunrise.timestamp - global.nightObj.sunset.timestamp) / 60000
             // if (global.nightObj.sunrise.timestamp-new Date().getTime()>48*3600*1000){
             //     duration = 24*60
             // }

+ 3 - 5
src/features/trackTimeDuration/components/TimelineFastSleep.tsx

@@ -42,7 +42,7 @@ export default function TimelineFastSleep(props: {
             }
             else {
 
-                var real_time_zone = props.data.last_timezone.gmt
+                var real_time_zone = props.data.last_timezone?props.data.last_timezone.gmt:''
 
                 var newTimestamp = TimeFormatter.transferTimestamp(obj.target_end_time, real_time_zone)
                 return TimeFormatter.timelineFormatTime(newTimestamp)
@@ -57,7 +57,7 @@ export default function TimelineFastSleep(props: {
                 // return diffTimeZone ? TimeFormatter.timelineFullFormatTime(newTimestamp) : TimeFormatter.timelineFormatTime(obj.real_start_time)
             }
             else {
-                var real_time_zone = props.data.last_timezone.gmt
+                var real_time_zone = props.data.last_timezone?props.data.last_timezone.gmt:''
                 var newTimestamp = TimeFormatter.transferTimestamp(obj.target_start_time, real_time_zone)
 
                 return TimeFormatter.timelineFormatTime(newTimestamp)
@@ -119,7 +119,7 @@ export default function TimelineFastSleep(props: {
                 return TimeFormatter.dateDescription(newTimestamp, true, diffTimeZone || multTimeZone)
             }
             else {
-                var real_time_zone = props.data.last_timezone.gmt
+                var real_time_zone = props.data.last_timezone? props.data.last_timezone.gmt:''
                 var newTimestamp = TimeFormatter.transferTimestamp(obj.target_end_time, real_time_zone)
                 if (diffTimeZone || multTimeZone) {
                     return TimeFormatter.getMonthAndDayByTimestamp(newTimestamp, true) + ' '
@@ -192,8 +192,6 @@ export default function TimelineFastSleep(props: {
             }
         }
 
-        debugger
-
         timelineItems.push(
             {
                 status: status,

Some files were not shown because too many files changed in this diff