Selaa lähdekoodia

fix some bugs

leon 1 vuosi sitten
vanhempi
commit
6cb9c000b5

+ 25 - 24
package.json

@@ -41,6 +41,7 @@
 	],
 	"author": "",
 	"dependencies": {
+		"@babel/preset-react": "^7.26.3",
 		"@babel/runtime": "^7.7.7",
 		"@bam.tech/react-native-image-resizer": "~3.0.4",
 		"@expo/react-native-action-sheet": "^4.0.1",
@@ -59,24 +60,24 @@
 		"@react-navigation/native": "^6.1.9",
 		"@react-navigation/stack": "^6.3.19",
 		"@reduxjs/toolkit": "^1.9.7",
-		"@tarojs/components": "3.6.19",
-		"@tarojs/helper": "3.6.19",
-		"@tarojs/plugin-framework-react": "3.6.19",
-		"@tarojs/plugin-mini-ci": "^3.6.27",
-		"@tarojs/plugin-platform-alipay": "3.6.19",
-		"@tarojs/plugin-platform-h5": "3.6.19",
-		"@tarojs/plugin-platform-jd": "3.6.19",
-		"@tarojs/plugin-platform-qq": "3.6.19",
-		"@tarojs/plugin-platform-swan": "3.6.19",
-		"@tarojs/plugin-platform-tt": "3.6.19",
-		"@tarojs/plugin-platform-weapp": "3.6.19",
-		"@tarojs/react": "3.6.19",
-		"@tarojs/rn-supporter": "3.6.19",
-		"@tarojs/runtime": "3.6.19",
-		"@tarojs/runtime-rn": "3.6.19",
-		"@tarojs/shared": "3.6.19",
-		"@tarojs/taro": "3.6.19",
-		"@tarojs/taro-rn": "3.6.19",
+		"@tarojs/components": "4.0.9",
+		"@tarojs/helper": "4.0.9",
+		"@tarojs/plugin-framework-react": "4.0.9",
+		"@tarojs/plugin-mini-ci": "4.0.9",
+		"@tarojs/plugin-platform-alipay": "4.0.9",
+		"@tarojs/plugin-platform-h5": "4.0.9",
+		"@tarojs/plugin-platform-jd": "4.0.9",
+		"@tarojs/plugin-platform-qq": "4.0.9",
+		"@tarojs/plugin-platform-swan": "4.0.9",
+		"@tarojs/plugin-platform-tt": "4.0.9",
+		"@tarojs/plugin-platform-weapp": "4.0.9",
+		"@tarojs/react": "4.0.9",
+		"@tarojs/rn-supporter": "4.0.9",
+		"@tarojs/runtime": "4.0.9",
+		"@tarojs/runtime-rn": "4.0.9",
+		"@tarojs/shared": "4.0.9",
+		"@tarojs/taro": "4.0.9",
+		"@tarojs/taro-rn": "4.0.9",
 		"@xstate/react": "^3.2.2",
 		"ahooks": "^3.7.8",
 		"dayjs": "^1.11.10",
@@ -127,19 +128,19 @@
 	"devDependencies": {
 		"@babel/core": "^7.12.9",
 		"@pmmmwh/react-refresh-webpack-plugin": "^0.5.5",
-		"@tarojs/cli": "3.6.19",
-		"@tarojs/rn-runner": "3.6.19",
-		"@tarojs/taro-loader": "3.6.19",
-		"@tarojs/webpack5-runner": "3.6.19",
+		"@tarojs/cli": "4.0.9",
+		"@tarojs/rn-runner": "4.0.9",
+		"@tarojs/taro-loader": "4.0.9",
+		"@tarojs/webpack5-runner": "4.0.9",
 		"@types/node": "^18.15.11",
 		"@types/react": "^18.0.0",
 		"@types/react-native": "^0.69.8",
 		"@types/webpack-env": "^1.13.6",
 		"@typescript-eslint/eslint-plugin": "^5.20.0",
 		"@typescript-eslint/parser": "^5.20.0",
-		"babel-preset-taro": "3.6.19",
+		"babel-preset-taro": "4.0.9",
 		"eslint": "^8.12.0",
-		"eslint-config-taro": "3.6.19",
+		"eslint-config-taro": "4.0.9",
 		"eslint-plugin-import": "^2.12.0",
 		"eslint-plugin-react": "^7.8.2",
 		"eslint-plugin-react-hooks": "^4.2.0",

+ 16 - 3
src/_account/pages/Album.scss

@@ -1,19 +1,32 @@
+.album_item {
 
+    display: flex;
+    flex-direction: row;
+    width: 750px;
+    padding: 40px;
+    padding-top: 0;
+    padding-bottom: 60px;
+    box-sizing: border-box;
+    position: relative;
+    background-color: #fff;
+    flex-shrink: 0;
+
+}
 
-.album_container{
+.album_container {
     display: flex;
     flex-direction: row;
     flex-wrap: wrap;
 }
 
-.album_phone{
+.album_phone {
     width: 155px;
     height: 155px;
     margin-left: 4px;
     margin-bottom: 4px;
 }
 
-.streak_toolbar_btn{
+.streak_toolbar_btn {
     height: 72px;
     border-radius: 18px;
     display: flex;

+ 2 - 2
src/_account/pages/Album.tsx

@@ -312,11 +312,11 @@ export default function Album() {
             }}>
                 {
                     medias.map((item, index) => {
-                        return <View key={index} id={`history-${index}`} style={{ display: 'flex', flexDirection: 'column', paddingTop: rpxToPx(6), backgroundColor: '#fff' }}>
+                        return <View key={index} id={`history-${index}`} style={{ display: 'flex', flexDirection: 'column',  backgroundColor: '#fff' }}>
                             {
                                 historyYear(index)
                             }
-                            <View className="history_item2" style={{ paddingRight: rpxToPx(30) }}>
+                            <View className="album_item" style={{ paddingRight: rpxToPx(30) }}>
                                 <View className="cell_date" >
                                     <View className="h42 bold" style={{ lineHeight: rpxToPx(60) + 'px' }}>{historyDate(item, index)}</View>
                                     <View className="h24 bold" style={{ marginLeft: rpxToPx(6), marginTop: rpxToPx(13), lineHeight: rpxToPx(47) + 'px' }}>{historyMonth(item, index)}</View>

+ 21 - 4
src/_health/components/time_title_desc.tsx

@@ -14,7 +14,8 @@ export default function TimeTitleDesc(props: {
     desc?: string,
     className?: string,
     key?: any,
-    style?: any
+    style?: any,
+    isSkyline?:any,
 }) {
     function tapTime(e) {
         if (process.env.TARO_ENV == 'weapp') {
@@ -51,12 +52,28 @@ export default function TimeTitleDesc(props: {
         // }
         return props.title
     }
+
+    return <Text key={props.key} 
+    className={props.isSkyline?'':props.className}
+    overflow="ellipsis"
+        style={{
+            lineHeight: rpxToPx(48) + 'px',
+            marginLeft: props.showPoint ? 5 : 0, ...props.style
+        }}
+        maxLines={props.className == 'line2' ? 2 : props.className == 'line3' ? 3 : 100}>
+        {
+            props.title && <Text className="h32 w400" style={{ color: '#000' }}> {titleFunc()} </Text>
+        }
+        {
+            props.desc && <Text className="h32 w300" style={{ color: '#000' }}> {props.desc.trim()} </Text>
+        }
+    </Text>
+
     return <Text key={props.key} className={props.className}
-        // overflow="ellipsis"
+        overflow="ellipsis"
         maxLines={props.className == 'line2' ? 2 : props.className == 'line3' ? 3 : 100}
         style={{
             lineHeight: rpxToPx(48) + 'px',
-            overflow: 'ellipsis',
             marginLeft: props.showPoint ? 5 : 0, ...props.style
         }}>
         {/* {
@@ -71,7 +88,7 @@ export default function TimeTitleDesc(props: {
             props.title && <Text className="h32 w400" style={{ color: '#000' }}> {titleFunc()} </Text>
         }
         {
-            props.desc && <Text className="h32 w300" style={{ color: '#000' }}> {props.desc} </Text>
+            props.desc && <Text className="h32 w300" style={{ color: '#000' }}> {props.desc.trim()} </Text>
         }
     </Text>
 }

+ 1 - 0
src/_health/components/timeline_date.scss

@@ -2,4 +2,5 @@
     width: 122px;
     display: flex;
     flex-direction: column;
+    flex-shrink: 0;
 }

+ 9 - 4
src/_moment/components/recent_item.tsx

@@ -24,7 +24,11 @@ export default function RecentItem(props: { data: any, index: number }) {
             }
         }
         if (showDate) {
-            return <View className="history_year_month h42 bold" style={{ marginBottom: index==0?rpxToPx(60):0 }}>{dateStr}</View>
+            return <View className="history_year_month h42 bold"
+                style={{
+                    marginBottom: index == 0 ? rpxToPx(60) : 0,
+                    marginTop: index == 0 ? 0 : rpxToPx(60),
+                }}>{dateStr}</View>
         }
         return <View />
     }
@@ -56,7 +60,7 @@ export default function RecentItem(props: { data: any, index: number }) {
         }
         <View className="recent_item1" style={{ paddingTop: time.is_start_day ? rpxToPx(60) : spaceY }} onClick={goDetail}>
             <TimelineDate timestamp={time.timestamp} pre_timestamp={0} isJournal={false} hideDate={!time.is_start_day} />
-            <View className="history_content" style={{ paddingTop: rpxToPx(0) }}>
+            <View className="history_content" style={{ paddingTop: rpxToPx(0), flex: 1 }}>
                 <View style={{ display: 'flex', flexDirection: 'row', marginBottom: rpxToPx(0), flex: 1 }}>
                     {
                         hasImg && medias()
@@ -74,6 +78,7 @@ export default function RecentItem(props: { data: any, index: number }) {
                             paddingBottom: rpxToPx(12)
                         }}>
                             <TimeTitleDesc
+                                isSkyline={global.supportSkyline}
                                 className={'line2'}
                                 time=''
                                 title={moment.title}
@@ -83,7 +88,7 @@ export default function RecentItem(props: { data: any, index: number }) {
 
                 </View>
                 {
-                    link && link.ring && <View style={{ marginTop: (hasImg || hasText) ? spaceY : 0 }}>
+                    link && link.ring && <View style={{ marginTop: (hasImg || hasText) ? spaceY : 0, flex: 1 }}>
                         <TargetProgress
                             color={getThemeColor(link.window)}
                             showRing={true}
@@ -96,7 +101,7 @@ export default function RecentItem(props: { data: any, index: number }) {
                     </View>
                 }
                 {
-                    link && link.move && <View style={{ marginTop: (hasImg || hasText) ? spaceY : 0 }}>
+                    link && link.move && <View style={{ marginTop: (hasImg || hasText) ? spaceY : 0, flex: 1 }}>
                         <TargetProgress
                             color={getThemeColor(link.window)}
                             showRing={false}

+ 0 - 1
src/_moment/pages/home.tsx

@@ -302,7 +302,6 @@ export default function UserHome() {
                     }
                 </View>
             }
-            {/* <View style={{height:rpxToPx(60)}}/> */}
             {
                 list.map((item, index) => {
                     if (itemLayouts.length >= index + 1 && pageTop > 0 && index > 5) {

+ 1 - 1
src/app.scss

@@ -669,7 +669,7 @@ page {
 }
 
 .history_year_month {
-    height: 84px;
+    height: 70px;
     padding-left: 40px;
     display: flex;
     flex-direction: row;

+ 1 - 0
src/app.tsx

@@ -37,6 +37,7 @@ const App: React.FC<PropsWithChildren> = ({ children }) => {
 
 
   global.hideRingIcon = false
+  global.supportSkyline = Taro.getSkylineInfoSync().isSupported
 
   Taro.setStorage({ key: 'showedDisqualifiedAlert', data: false })
   if (process.env.TARO_ENV == 'weapp') {

+ 13 - 0
src/pages/account/Journal.scss

@@ -57,4 +57,17 @@ page{
     padding-right: 48px;
     margin-right: 12px;
     flex-shrink: 0;
+}
+
+.journal_item {
+    display: flex;
+    flex-direction: row;
+    width: 750px;
+    padding: 40px;
+    padding-top: 0;
+    padding-bottom: 60px;
+    box-sizing: border-box;
+    position: relative;
+    background-color: #fff;
+    flex-shrink: 0;
 }

+ 3 - 3
src/pages/account/Journal.tsx

@@ -277,9 +277,9 @@ export default function Journal() {
                 position: 'relative',
                 marginLeft: rpxToPx(40),
                 marginRight: rpxToPx(40),
-                paddingTop: rpxToPx(44),
+                paddingTop: index==0?rpxToPx(44):0,
                 paddingBottom: rpxToPx(20),
-                marginBottom: rpxToPx(60)
+                marginBottom: rpxToPx(60),
             }}>
                 <View className="h50 bold">{dateStr2}</View>
                 <View className="h30 g03" style={{ marginTop: rpxToPx(20) }}>{yearCount(dateStr2)}</View>
@@ -450,7 +450,7 @@ export default function Journal() {
                 </View>
             }
         }
-        return <View className="history_item2" id={`history-${index}`} onClick={() => {
+        return <View className="journal_item" id={`history-${index}`} onClick={() => {
             jumpPage('/pages/account/JournalDetail?date=' + item.date + '&window=' + window) //JSON.stringify(item))
         }}>
             <TimelineDate

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 996 - 1918
yarn.lock


Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä