From e56c40dab9f3209084dc75956ffb20c27a91b9b7 Mon Sep 17 00:00:00 2001 From: lyswhut Date: Fri, 8 Sep 2023 15:58:41 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B2=BE=E7=AE=80=E8=AE=BE=E7=BD=AE=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=EF=BC=8C=E5=B0=86=E8=AF=A6=E7=BB=86=E8=AF=B4=E6=98=8E?= =?UTF-8?q?=E6=94=BE=E5=88=B0=E9=80=89=E9=A1=B9=E5=90=8E=E9=9D=A2=E5=B8=AE?= =?UTF-8?q?=E5=8A=A9=E6=8C=89=E9=92=AE=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/app/src/main/assets/fonts/icomoon.ttf | Bin 11200 -> 11544 bytes publish/changeLog.md | 2 +- src/components/common/CheckBox/index.tsx | 36 ++++++++++++++++-- src/lang/en_us.json | 6 ++- src/lang/zh_cn.json | 6 ++- src/resources/fonts/icomoon.ttf | Bin 11200 -> 11544 bytes src/resources/fonts/selection.json | 2 +- .../settings/Player/IsAutoCleanPlayedList.tsx | 7 +++- .../settings/Player/IsEnableAudioOffload.tsx | 7 +++- 9 files changed, 55 insertions(+), 11 deletions(-) diff --git a/android/app/src/main/assets/fonts/icomoon.ttf b/android/app/src/main/assets/fonts/icomoon.ttf index 325f43e876cfc10ca1ab24a714e75692dffdbb66..d67bed97dca8f33bdedaa12423cefe5d782342dd 100644 GIT binary patch delta 591 zcmX>QJ|n80fsuiMft#U$ftkU;KUm+0Ux>{aD6$8L6OwZi3&g`NZDn9!lmYTX(i4jd zfV2RR5288Jb1KvJtiL}U$gf~v(D2AeO-xaJ{bvOOgXRICyjccNfWwca5y<}mTUL6R8$vaVF+aqWnRsk%^<^I$xy=3GYAxR|I2J0BxEo3fI+9;3RNsfoEAqq&)}s1lnjqXna(h?udFnW+V%C8Mc{ znXwU2H5*7dAEPLWq=^|wn;lS*nzEo0n zyaT3@5aSzsOt|@kg!s6n)YQDB)Wmt&1$lW@#CU~;dHMKQS$Wv`t&L55{$)uDf-De} z1O+E35dd*Pw)*;bew(ih+$@`BLKruc`g6| delta 283 zcmbOcbs)T+fsuiMft#U$ftkU;KUm+0Ux>{KD6$8L6OwZi3&g`NZDC+wlmYTX(i4jd zfV2RR5288Jb1KtH#Pcr$`4tQdYF{!^6H`>XcHCoN(8vMGn`Hn6IQ&=|fczyuzDh=J zNyQ!^z8WC^1dx9sCqLOT@%N8U^B5R3CjbS~auX{G7%Ukc0r@|Ge1*Kk+|-#~oWB_u zv?PF*v=!tRmjE3K1lkKG?r>++oy6$PsJq#RQBhqP { +export default ({ check, label, children, onChange, helpTitle, helpDesc, disabled = false, need = false, marginRight = 0, marginBottom = 0 }: CheckBoxProps) => { const theme = useTheme() const [isDisabled, setDisabled] = useState(false) const tintColors = { @@ -47,6 +51,25 @@ export default ({ check, label, children, onChange, disabled = false, need = fal onChange?.(!check) }, [isDisabled, onChange, check]) + const helpComponent = useMemo(() => { + const handleShowHelp = () => { + Alert.alert(helpTitle ?? '', helpDesc, + // [{ + // text: '我知道了 (Close)', + // // onPress: () => { + // // void saveData(storageDataPrefix.cheatTip, true) + // // resolve() + // // }, + // }], + ) + } + return (helpTitle ?? helpDesc) ? ( + + + + ) : null + }, [helpTitle, helpDesc]) + const contentStyle = { ...styles.content, marginBottom: scaleSizeH(marginBottom) } const labelStyle = { ...styles.label, marginRight: scaleSizeW(marginRight) } @@ -57,6 +80,7 @@ export default ({ check, label, children, onChange, disabled = false, need = fal {label ? {label} : children} + {helpComponent} ) : ( @@ -65,6 +89,7 @@ export default ({ check, label, children, onChange, disabled = false, need = fal {label ? {label} : children} + {helpComponent} ) ) @@ -94,5 +119,10 @@ const styles = createStyle({ name: { marginTop: 2, }, + helpBtn: { + // backgroundColor: 'rgba(0, 0, 0, 0.2)', + paddingHorizontal: 8, + paddingVertical: 3, + }, }) diff --git a/src/lang/en_us.json b/src/lang/en_us.json index 4fc5def..e2a37d1 100644 --- a/src/lang/en_us.json +++ b/src/lang/en_us.json @@ -254,8 +254,10 @@ "setting_other_log_sync_log": "Record synchronization log", "setting_other_log_tip_clean_success": "Log cleaning completed", "setting_other_log_tip_null": "The log is empty~", - "setting_play_audio_offload": "Enable audio offloading (to save power, if available)", - "setting_play_auto_clean_played_list": "Whether to clear the existing playlist when clicking the same list as the playlist to switch songs (all songs in the list in random mode will participate in the random again)", + "setting_play_audio_offload": "Enable audio offload", + "setting_play_audio_offload_tip": "Enabling audio offloading can save power consumption, but on some devices, all songs may prompt \"Audio loading error\" or \"The whole song cannot be played completely\". This is caused by a bug in the current system.\nFor People who encounter this problem can turn off this option and restart the application completely to try again.", + "setting_play_auto_clean_played_list": "Automatically clear the played list", + "setting_play_auto_clean_played_list_tip": "In random play mode, when switching songs by clicking the same list as the playlist, if automatic clearing of the already played list is enabled, the played songs will re-participate in random play.", "setting_play_cache_size": "Maximum cache size (MB)", "setting_play_cache_size_no_cache": "Disabled cache", "setting_play_cache_size_save_tip": "The cache setting is completed, it will take effect after restarting the application", diff --git a/src/lang/zh_cn.json b/src/lang/zh_cn.json index 518851c..d7e2e10 100644 --- a/src/lang/zh_cn.json +++ b/src/lang/zh_cn.json @@ -254,8 +254,10 @@ "setting_other_log_sync_log": "记录同步日志", "setting_other_log_tip_clean_success": "日志清理完成", "setting_other_log_tip_null": "日志是空的哦~", - "setting_play_audio_offload": "启用音频卸载(可节省耗电量,如果可用)", - "setting_play_auto_clean_played_list": "点击与播放列表相同的列表切歌时是否清空已播放列表(随机模式下列表内所有歌曲会重新参与随机)", + "setting_play_audio_offload": "启用音频卸载", + "setting_play_audio_offload_tip": "启用音频卸载可以节省耗电量,但在某些设备上可能会出现所有歌曲都提示 「音频加载出错」 或者 「无法完整播放整首歌」 的问题,这是由于当前系统的bug导致的。\n对于遇到这个问题的人可以关闭此选项后完全重启应用再试。", + "setting_play_auto_clean_played_list": "自动清空已播放列表", + "setting_play_auto_clean_played_list_tip": "随机播放模式下,通过 「点击」 与 「播放列表相同的列表内的歌曲」 切歌时,若启用 「自动清空已播放列表」,则已播放的歌曲将重新参与随机播放。", "setting_play_cache_size": "最大缓存大小(MB)", "setting_play_cache_size_no_cache": "禁用缓存", "setting_play_cache_size_save_tip": "缓存设置完毕,重启应用后生效", diff --git a/src/resources/fonts/icomoon.ttf b/src/resources/fonts/icomoon.ttf index 325f43e876cfc10ca1ab24a714e75692dffdbb66..d67bed97dca8f33bdedaa12423cefe5d782342dd 100644 GIT binary patch delta 591 zcmX>QJ|n80fsuiMft#U$ftkU;KUm+0Ux>{aD6$8L6OwZi3&g`NZDn9!lmYTX(i4jd zfV2RR5288Jb1KvJtiL}U$gf~v(D2AeO-xaJ{bvOOgXRICyjccNfWwca5y<}mTUL6R8$vaVF+aqWnRsk%^<^I$xy=3GYAxR|I2J0BxEo3fI+9;3RNsfoEAqq&)}s1lnjqXna(h?udFnW+V%C8Mc{ znXwU2H5*7dAEPLWq=^|wn;lS*nzEo0n zyaT3@5aSzsOt|@kg!s6n)YQDB)Wmt&1$lW@#CU~;dHMKQS$Wv`t&L55{$)uDf-De} z1O+E35dd*Pw)*;bew(ih+$@`BLKruc`g6| delta 283 zcmbOcbs)T+fsuiMft#U$ftkU;KUm+0Ux>{KD6$8L6OwZi3&g`NZDC+wlmYTX(i4jd zfV2RR5288Jb1KtH#Pcr$`4tQdYF{!^6H`>XcHCoN(8vMGn`Hn6IQ&=|fczyuzDh=J zNyQ!^z8WC^1dx9sCqLOT@%N8U^B5R3CjbS~auX{G7%Ukc0r@|Ge1*Kk+|-#~oWB_u zv?PF*v=!tRmjE3K1lkKG?r>++oy6$PsJq#RQBhqP { return ( - + ) }) diff --git a/src/screens/Home/Views/Setting/settings/Player/IsEnableAudioOffload.tsx b/src/screens/Home/Views/Setting/settings/Player/IsEnableAudioOffload.tsx index 3478789..f87340f 100644 --- a/src/screens/Home/Views/Setting/settings/Player/IsEnableAudioOffload.tsx +++ b/src/screens/Home/Views/Setting/settings/Player/IsEnableAudioOffload.tsx @@ -18,7 +18,12 @@ export default memo(() => { return ( - + ) })