@liujitcn/kratos-taro-app-system 0.0.1 → 0.0.17
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/package.json
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@liujitcn/kratos-taro-app-system",
|
|
3
3
|
"description": "Kratos Taro system module with profile, settings, and AI views.",
|
|
4
|
-
"
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"homepage": "https://github.com/liujitcn/kratos-admin",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@github.com:liujitcn/kratos-admin.git"
|
|
9
|
+
},
|
|
10
|
+
"version": "0.0.17",
|
|
5
11
|
"type": "module",
|
|
6
12
|
"files": [
|
|
7
13
|
"dist",
|
|
@@ -25,8 +31,8 @@
|
|
|
25
31
|
"@tarojs/components": "4.2.1",
|
|
26
32
|
"@tarojs/taro": "4.2.1",
|
|
27
33
|
"react": "18.3.1",
|
|
28
|
-
"@liujitcn/kratos-taro-app-
|
|
29
|
-
"@liujitcn/kratos-taro-app-
|
|
34
|
+
"@liujitcn/kratos-taro-app-ui": "^0.0.17",
|
|
35
|
+
"@liujitcn/kratos-taro-app-core": "^0.0.17"
|
|
30
36
|
},
|
|
31
37
|
"scripts": {
|
|
32
38
|
"build": "pnpm run build:entries && pnpm pack --pack-destination ../../../dist/npm",
|
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { Image, ScrollView, Text, View } from '@tarojs/components'
|
|
2
|
+
import centerBackground from '@liujitcn/kratos-taro-app-core/static/images/center_bg.png'
|
|
3
|
+
import defaultAvatar from '@liujitcn/kratos-taro-app-core/static/images/avatar.png'
|
|
2
4
|
import {
|
|
3
5
|
formatSrc,
|
|
4
6
|
navigateAppRoute,
|
|
5
7
|
navigateToLogin,
|
|
6
|
-
resolveBundledAsset,
|
|
7
8
|
useUserStore,
|
|
8
9
|
} from '@liujitcn/kratos-taro-app-core'
|
|
9
10
|
import './my.scss'
|
|
10
11
|
|
|
11
|
-
const defaultAvatar = resolveBundledAsset('static/images/avatar.png')
|
|
12
|
-
const centerBackground = resolveBundledAsset('static/images/center_bg.png')
|
|
13
|
-
|
|
14
12
|
/** 个人中心首页。 */
|
|
15
13
|
export default function MyPage() {
|
|
16
14
|
const profile = useUserStore((state) => state.userInfo)
|
|
@@ -71,7 +71,7 @@ export default function AiPage() {
|
|
|
71
71
|
let safeAreaTop = windowInfo.safeArea?.top || windowInfo.statusBarHeight || windowInfo.safeAreaInsets?.top || 0
|
|
72
72
|
if (process.env.TARO_ENV === 'weapp') safeAreaTop ||= 44
|
|
73
73
|
const safeAreaBottom = Math.max(windowInfo.safeAreaInsets?.bottom || 0, 9)
|
|
74
|
-
const composerBottom = `${safeAreaBottom}px`
|
|
74
|
+
const composerBottom = `${safeAreaBottom + 48}px`
|
|
75
75
|
const drawerTopPadding = `${safeAreaTop + 12}px`
|
|
76
76
|
|
|
77
77
|
const [showSessionDrawer, setShowSessionDrawer] = useState(false)
|
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
} from '@tarojs/components'
|
|
11
11
|
import Taro, { useLoad } from '@tarojs/taro'
|
|
12
12
|
import { useState } from 'react'
|
|
13
|
+
import defaultAvatar from '@liujitcn/kratos-taro-app-core/static/images/avatar.png'
|
|
14
|
+
import navigatorBackground from '@liujitcn/kratos-taro-app-core/static/images/navigator_bg.png'
|
|
13
15
|
import { defAuthService } from '@liujitcn/kratos-taro-app-core/api/system/auth'
|
|
14
16
|
import { defBaseDictService } from '@liujitcn/kratos-taro-app-core/api/system/base_dict'
|
|
15
17
|
import type { BaseDictForm_DictItem } from '@liujitcn/kratos-taro-app-core/rpc/system/app/v1/base_dict'
|
|
@@ -17,15 +19,12 @@ import type { UserProfileForm } from '@liujitcn/kratos-taro-app-core/rpc/system/
|
|
|
17
19
|
import {
|
|
18
20
|
formatSrc,
|
|
19
21
|
navigateToLogin,
|
|
20
|
-
resolveBundledAsset,
|
|
21
22
|
uploadFile,
|
|
22
23
|
useUserStore,
|
|
23
24
|
} from '@liujitcn/kratos-taro-app-core'
|
|
24
25
|
import './profile.scss'
|
|
25
26
|
|
|
26
27
|
const IMG_MAX_SIZE = 1024 * 1024
|
|
27
|
-
const defaultAvatar = resolveBundledAsset('static/images/avatar.png')
|
|
28
|
-
const navigatorBackground = resolveBundledAsset('static/images/navigator_bg.png')
|
|
29
28
|
|
|
30
29
|
/** 用户个人资料编辑页。 */
|
|
31
30
|
export default function ProfilePage() {
|