mirror of
https://github.com/ikun0014/lx-music-mobile.git
synced 2025-07-05 21:58:56 +08:00
新增是否在左侧导航栏显示退出应用按钮设置
This commit is contained in:
parent
46d982ee4e
commit
d64a70852f
Binary file not shown.
@ -19,6 +19,7 @@
|
||||
- 新增播放器播放速率设置,可以去播放详情页-播放器设置-播放速率更改
|
||||
- 新增播放详情页歌词对齐方式设置,可以去播放详情页-播放器设置-歌词对齐方式更改
|
||||
- 新增是否在左侧导航栏显示返回桌面按钮设置,默认关闭,可以去设置-基本设置-是否显示返回桌面按钮开启
|
||||
- 新增是否在左侧导航栏显示退出应用按钮设置,默认关闭,可以去设置-基本设置-是否显示退出应用按钮开启
|
||||
- 支持wy源flac hires歌曲类型的显示
|
||||
- 添加kg源评论图片展示(@helloplhm-qwq)
|
||||
- 支持kg源搜索列表、排行榜flac hires歌曲类型的显示(@helloplhm-qwq, @Folltoshe)
|
||||
|
@ -9,6 +9,7 @@ const defaultSetting: LX.AppSetting = {
|
||||
'common.autoHidePlayBar': true,
|
||||
'common.drawerLayoutPosition': 'left',
|
||||
'common.showBackBtn': false,
|
||||
'common.showExitBtn': true,
|
||||
|
||||
'player.startupAutoPlay': false,
|
||||
'player.togglePlayMethod': 'listLoop',
|
||||
|
@ -190,6 +190,7 @@
|
||||
"setting_basic_share_type_system": "Share using the system",
|
||||
"setting_basic_show_animation": "Show switching animation",
|
||||
"setting_basic_show_back_btn": "Show back to desktop button",
|
||||
"setting_basic_show_exit_btn": "Show exit app button",
|
||||
"setting_basic_source": "Music source",
|
||||
"setting_basic_source_direct": "Direct API",
|
||||
"setting_basic_source_temp": "Temporary API (some features not available; workaround if Test API unavailable)",
|
||||
|
@ -190,6 +190,7 @@
|
||||
"setting_basic_share_type_system": "使用系统分享",
|
||||
"setting_basic_show_animation": "显示切换动画",
|
||||
"setting_basic_show_back_btn": "显示返回桌面按钮",
|
||||
"setting_basic_show_exit_btn": "显示退出应用按钮",
|
||||
"setting_basic_source": "音乐来源",
|
||||
"setting_basic_source_direct": "试听接口(这是最后的选择...)",
|
||||
"setting_basic_source_temp": "临时接口(软件的某些功能不可用,建议测试接口不可用再使用本接口)",
|
||||
|
Binary file not shown.
File diff suppressed because one or more lines are too long
@ -105,6 +105,7 @@ export default memo(() => {
|
||||
const theme = useTheme()
|
||||
// console.log('render drawer nav')
|
||||
const showBackBtn = useSettingValue('common.showBackBtn')
|
||||
const showExitBtn = useSettingValue('common.showExitBtn')
|
||||
|
||||
const handlePress = (id: IdType) => {
|
||||
switch (id) {
|
||||
@ -135,9 +136,11 @@ export default memo(() => {
|
||||
</View>
|
||||
</ScrollView>
|
||||
{
|
||||
showBackBtn ? <MenuItem id="back_home" icon="back-2" onPress={handlePress} /> : null
|
||||
showBackBtn ? <MenuItem id="back_home" icon="home" onPress={handlePress} /> : null
|
||||
}
|
||||
{
|
||||
showExitBtn ? <MenuItem id="nav_exit" icon="exit2" onPress={handlePress} /> : null
|
||||
}
|
||||
<MenuItem id="nav_exit" icon="exit2" onPress={handlePress} />
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
@ -99,6 +99,7 @@ export default memo(() => {
|
||||
const theme = useTheme()
|
||||
// console.log('render drawer nav')
|
||||
const showBackBtn = useSettingValue('common.showBackBtn')
|
||||
const showExitBtn = useSettingValue('common.showExitBtn')
|
||||
|
||||
const handlePress = (id: IdType) => {
|
||||
switch (id) {
|
||||
@ -131,9 +132,11 @@ export default memo(() => {
|
||||
</ScrollView>
|
||||
|
||||
{
|
||||
showBackBtn ? <MenuItem id="back_home" icon="back-2" onPress={handlePress} /> : null
|
||||
showBackBtn ? <MenuItem id="back_home" icon="home" onPress={handlePress} /> : null
|
||||
}
|
||||
{
|
||||
showExitBtn ? <MenuItem id="nav_exit" icon="exit2" onPress={handlePress} /> : null
|
||||
}
|
||||
<MenuItem id="nav_exit" icon="exit2" onPress={handlePress} />
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
@ -11,13 +11,13 @@ import CheckBoxItem from '../../components/CheckBoxItem'
|
||||
export default memo(() => {
|
||||
const t = useI18n()
|
||||
const showBackBtn = useSettingValue('common.showBackBtn')
|
||||
const setShowBaclBtn = (showBackBtn: boolean) => {
|
||||
const setShowBackBtn = (showBackBtn: boolean) => {
|
||||
updateSetting({ 'common.showBackBtn': showBackBtn })
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={styles.content}>
|
||||
<CheckBoxItem check={showBackBtn} label={t('setting_basic_show_back_btn')} onChange={setShowBaclBtn} />
|
||||
<CheckBoxItem check={showBackBtn} label={t('setting_basic_show_back_btn')} onChange={setShowBackBtn} />
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
@ -0,0 +1,30 @@
|
||||
import { updateSetting } from '@/core/common'
|
||||
import { useI18n } from '@/lang'
|
||||
import { createStyle } from '@/utils/tools'
|
||||
import React, { memo } from 'react'
|
||||
import { View } from 'react-native'
|
||||
import { useSettingValue } from '@/store/setting/hook'
|
||||
|
||||
|
||||
import CheckBoxItem from '../../components/CheckBoxItem'
|
||||
|
||||
export default memo(() => {
|
||||
const t = useI18n()
|
||||
const showExitBtn = useSettingValue('common.showExitBtn')
|
||||
const setShowExitBtn = (showExitBtn: boolean) => {
|
||||
updateSetting({ 'common.showExitBtn': showExitBtn })
|
||||
}
|
||||
|
||||
return (
|
||||
<View style={styles.content}>
|
||||
<CheckBoxItem check={showExitBtn} label={t('setting_basic_show_exit_btn')} onChange={setShowExitBtn} />
|
||||
</View>
|
||||
)
|
||||
})
|
||||
|
||||
|
||||
const styles = createStyle({
|
||||
content: {
|
||||
marginTop: 5,
|
||||
},
|
||||
})
|
@ -9,6 +9,7 @@ import ShareType from './ShareType'
|
||||
import IsStartupAutoPlay from './IsStartupAutoPlay'
|
||||
import IsAutoHidePlayBar from './IsAutoHidePlayBar'
|
||||
import IsShowBackBtn from './IsShowBackBtn'
|
||||
import IsShowExitBtn from './IsShowExitBtn'
|
||||
import DrawerLayoutPosition from './DrawerLayoutPosition'
|
||||
import { useI18n } from '@/lang/i18n'
|
||||
|
||||
@ -20,6 +21,7 @@ export default memo(() => {
|
||||
<Section title={t('setting_basic')}>
|
||||
<IsStartupAutoPlay />
|
||||
<IsShowBackBtn />
|
||||
<IsShowExitBtn />
|
||||
<IsAutoHidePlayBar />
|
||||
<Source />
|
||||
<SourceName />
|
||||
|
5
src/types/app_setting.d.ts
vendored
5
src/types/app_setting.d.ts
vendored
@ -51,6 +51,11 @@ declare global {
|
||||
*/
|
||||
'common.showBackBtn': boolean
|
||||
|
||||
/**
|
||||
* 是否显示退出按钮
|
||||
*/
|
||||
'common.showExitBtn': boolean
|
||||
|
||||
/**
|
||||
* 主题id
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user