@liujitcn/kratos-taro-app-system 0.0.43 → 0.0.45

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
@@ -7,7 +7,7 @@
7
7
  "type": "git",
8
8
  "url": "git@github.com:liujitcn/kratos-admin.git"
9
9
  },
10
- "version": "0.0.43",
10
+ "version": "0.0.45",
11
11
  "type": "module",
12
12
  "files": [
13
13
  "dist",
@@ -38,8 +38,8 @@
38
38
  "@tarojs/components": "4.2.1",
39
39
  "@tarojs/taro": "4.2.1",
40
40
  "react": "18.3.1",
41
- "@liujitcn/kratos-taro-app-ui": "^0.0.43",
42
- "@liujitcn/kratos-taro-app-core": "^0.0.43"
41
+ "@liujitcn/kratos-taro-app-core": "^0.0.45",
42
+ "@liujitcn/kratos-taro-app-ui": "^0.0.45"
43
43
  },
44
44
  "scripts": {
45
45
  "build": "pnpm run build:entries && pnpm pack --pack-destination ../../../dist/npm",
@@ -6,6 +6,7 @@ import {
6
6
  navigateAppRoute,
7
7
  navigateToLogin,
8
8
  useI18n,
9
+ useSettingStore,
9
10
  useUserStore,
10
11
  } from '@liujitcn/kratos-taro-app-core'
11
12
  import Taro from '@tarojs/taro'
@@ -18,6 +19,7 @@ export default function MyPage() {
18
19
  const profile = useUserStore((state) => state.userInfo)
19
20
  const isLoggedIn = useUserStore((state) => state.isAuthenticated())
20
21
  const ensureAuthenticated = useUserStore((state) => state.ensureAuthenticated)
22
+ const aiEnabled = useSettingStore((state) => state.aiEnabled)
21
23
 
22
24
  useEffect(() => {
23
25
  void Taro.setNavigationBarTitle({ title: t('core.navigation.my') })
@@ -75,14 +77,14 @@ export default function MyPage() {
75
77
  </View>
76
78
  </View>
77
79
 
78
- <View className='my-ai-entry' onClick={() => openAuthenticatedPage('app/ai')}>
80
+ {aiEnabled ? <View className='my-ai-entry' onClick={() => openAuthenticatedPage('app/ai')}>
79
81
  <View className='my-ai-entry__icon'>AI</View>
80
82
  <View className='my-ai-entry__content'>
81
83
  <View className='my-ai-entry__title'>{t('system.settings.ai_title')}</View>
82
84
  <View className='my-ai-entry__desc'>{t('system.settings.ai_description')}</View>
83
85
  </View>
84
86
  <View className='my-ai-entry__action'>{t('system.settings.go_ask')}</View>
85
- </View>
87
+ </View> : null}
86
88
  </ScrollView>
87
89
  )
88
90
  }