mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-05 05:18:56 +08:00
添加源版本号、作者名称显示
This commit is contained in:
parent
b861f16d4b
commit
4611e79719
@ -14,7 +14,9 @@ import settingState from '@/store/setting/state'
|
|||||||
import apiSourceInfo from '@/utils/musicSdk/api-source-info'
|
import apiSourceInfo from '@/utils/musicSdk/api-source-info'
|
||||||
import { setApiSource } from '@/core/apiSource'
|
import { setApiSource } from '@/core/apiSource'
|
||||||
|
|
||||||
|
const formatVersionName = (version: string) => {
|
||||||
|
return /^\d/.test(version) ? `v${version}` : version
|
||||||
|
}
|
||||||
const ListItem = ({ item, activeId, onRemove, onChangeAllowShowUpdateAlert }: {
|
const ListItem = ({ item, activeId, onRemove, onChangeAllowShowUpdateAlert }: {
|
||||||
item: LX.UserApi.UserApiInfo
|
item: LX.UserApi.UserApiInfo
|
||||||
activeId: string
|
activeId: string
|
||||||
@ -33,7 +35,19 @@ const ListItem = ({ item, activeId, onRemove, onChangeAllowShowUpdateAlert }: {
|
|||||||
return (
|
return (
|
||||||
<View style={{ ...styles.listItem, backgroundColor: activeId == item.id ? theme['c-primary-background-active'] : 'transparent' }}>
|
<View style={{ ...styles.listItem, backgroundColor: activeId == item.id ? theme['c-primary-background-active'] : 'transparent' }}>
|
||||||
<View style={styles.listItemLeft}>
|
<View style={styles.listItemLeft}>
|
||||||
<Text size={14}>{item.name}</Text>
|
<Text size={14}>
|
||||||
|
{item.name}
|
||||||
|
{
|
||||||
|
item.version ? (
|
||||||
|
<Text size={11} color={theme['c-font-label']}>{ ' ' + formatVersionName(item.version) }</Text>
|
||||||
|
) : null
|
||||||
|
}
|
||||||
|
{
|
||||||
|
item.author ? (
|
||||||
|
<Text size={11} color={theme['c-font-label']}>{ ' ' + item.author }</Text>
|
||||||
|
) : null
|
||||||
|
}
|
||||||
|
</Text>
|
||||||
<Text size={12} color={theme['c-font-label']}>{item.description}</Text>
|
<Text size={12} color={theme['c-font-label']}>{item.description}</Text>
|
||||||
<CheckBox check={item.allowShowUpdateAlert} label={t('user_api_allow_show_update_alert')} onChange={changeAllowShowUpdateAlert} size={0.86} />
|
<CheckBox check={item.allowShowUpdateAlert} label={t('user_api_allow_show_update_alert')} onChange={changeAllowShowUpdateAlert} size={0.86} />
|
||||||
</View>
|
</View>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user