@liujitcn/kratos-taro-app-system 0.0.96 → 0.0.99

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.96",
10
+ "version": "0.0.99",
11
11
  "type": "module",
12
12
  "files": [
13
13
  "dist",
@@ -39,8 +39,8 @@
39
39
  "@tarojs/components": "4.2.1",
40
40
  "@tarojs/taro": "4.2.1",
41
41
  "react": "18.3.1",
42
- "@liujitcn/kratos-taro-app-ui": "^0.0.96",
43
- "@liujitcn/kratos-taro-app-core": "^0.0.96"
42
+ "@liujitcn/kratos-taro-app-ui": "^0.0.99",
43
+ "@liujitcn/kratos-taro-app-core": "^0.0.99"
44
44
  },
45
45
  "scripts": {
46
46
  "build": "pnpm run build:entries && pnpm pack --pack-destination ../../../dist/npm",
@@ -43,8 +43,8 @@ export default function Composer(props: ComposerProps) {
43
43
  const [showModelPicker, setShowModelPicker] = useState(false)
44
44
  const [showKnowledgePicker, setShowKnowledgePicker] = useState(false)
45
45
  const themeStore = useThemeStore()
46
- const iconColor = themeStore.theme === 'light' ? '#5a7083' : '#8aa0b4'
47
- const primaryIconColor = themeStore.theme === 'light' ? '#039e8c' : '#28f0d4'
46
+ const iconColor = themeStore.colors.aiTextMuted
47
+ const primaryIconColor = themeStore.colors.aiPrimary
48
48
 
49
49
  const selectedModelDisplayName = useMemo(() => {
50
50
  const provider = props.modelProviders.find((item) => item.provider_id === props.providerId)
@@ -40,8 +40,8 @@ function formatSessionTime(session: AiSession) {
40
40
  export default function SessionDrawer(props: SessionDrawerProps) {
41
41
  useI18n()
42
42
  const themeStore = useThemeStore()
43
- const primaryIconColor = themeStore.theme === 'light' ? '#039e8c' : '#28f0d4'
44
- const mutedIconColor = themeStore.theme === 'light' ? '#5a7083' : '#8aa0b4'
43
+ const primaryIconColor = themeStore.colors.aiPrimary
44
+ const mutedIconColor = themeStore.colors.aiTextMuted
45
45
  return (
46
46
  <>
47
47
  {props.open ? <View className='session-mask' onClick={props.onClose} /> : null}
@@ -17,8 +17,8 @@ type WelcomePanelProps = {
17
17
  export default function WelcomePanel(props: WelcomePanelProps) {
18
18
  useI18n()
19
19
  const themeStore = useThemeStore()
20
- const primaryIconColor = themeStore.theme === 'light' ? '#039e8c' : '#28f0d4'
21
- const mutedIconColor = themeStore.theme === 'light' ? '#9aabbb' : '#8aa0b4'
20
+ const primaryIconColor = themeStore.colors.aiPrimary
21
+ const mutedIconColor = themeStore.colors.aiTextDim
22
22
  return (
23
23
  <View className='welcome-panel'>
24
24
  <View className='welcome-row is-hello'>
@@ -580,8 +580,8 @@ export default function AiPage() {
580
580
  title: session?.title || t('system.ai.current_session'),
581
581
  }),
582
582
  confirmText: t('common.action.delete'),
583
- confirmColor: themeStore.theme === 'light' ? '#e0324f' : '#ff4d6d',
584
- cancelColor: themeStore.theme === 'light' ? '#5a7083' : '#8aa0b4',
583
+ confirmColor: themeStore.colors.aiDanger,
584
+ cancelColor: themeStore.colors.aiTextMuted,
585
585
  })
586
586
  if (!result.confirm) return
587
587
  try {
@@ -220,7 +220,7 @@ export default function ProfilePage() {
220
220
  <Label className='profile-radio' key={item.value}>
221
221
  <Radio
222
222
  value={item.value}
223
- color={themeStore.theme === 'light' ? '#039e8c' : '#28f0d4'}
223
+ color={themeStore.colors.aiPrimary}
224
224
  checked={userInfo.gender === Number(item.value)}
225
225
  />
226
226
  {item.label}
@@ -46,9 +46,9 @@ export default function SettingsPage() {
46
46
  languageOptions.findIndex((item) => item.language_code === locale),
47
47
  )
48
48
  const settingsIcons = useMemo(() => {
49
- const primary = themeStore.theme === 'light' ? '#039e8c' : '#28f0d4'
50
- const warning = themeStore.theme === 'light' ? '#d9880f' : '#ffb648'
51
- const violet = themeStore.theme === 'light' ? '#5f4fe0' : '#9b8cff'
49
+ const primary = themeStore.colors.aiPrimary
50
+ const warning = themeStore.colors.aiWarning
51
+ const violet = themeStore.colors.aiViolet
52
52
  const createIcon = (body: string, color: string) =>
53
53
  'data:image/svg+xml;charset=utf-8,' +
54
54
  encodeURIComponent(
@@ -145,8 +145,8 @@ export default function SettingsPage() {
145
145
  if (logoutLoading) return
146
146
  const result = await Taro.showModal({
147
147
  content: t('system.settings.logout_confirm'),
148
- confirmColor: themeStore.theme === 'light' ? '#039e8c' : '#28f0d4',
149
- cancelColor: themeStore.theme === 'light' ? '#5a7083' : '#8aa0b4',
148
+ confirmColor: themeStore.colors.aiPrimary,
149
+ cancelColor: themeStore.colors.aiTextMuted,
150
150
  })
151
151
  if (!result.confirm) return
152
152
  setLogoutLoading(true)