|
@@ -70,7 +70,7 @@ const TAG = 'NewIndex'; // 日志标签
|
|
|
@Entry
|
|
@Entry
|
|
|
@Component
|
|
@Component
|
|
|
struct NewIndex {
|
|
struct NewIndex {
|
|
|
-
|
|
|
|
|
|
|
+ @State isDetailView: boolean = false; // 是否在艺术家/专辑详情视图
|
|
|
@Provide isShowPlay: boolean = false;
|
|
@Provide isShowPlay: boolean = false;
|
|
|
@Provide CONTROL_PlayStatus: number = PlayStatus.INIT;
|
|
@Provide CONTROL_PlayStatus: number = PlayStatus.INIT;
|
|
|
@Provide progressValue: number = 0;
|
|
@Provide progressValue: number = 0;
|
|
@@ -207,12 +207,23 @@ struct NewIndex {
|
|
|
* - 如果是根目录,双击返回键退出应用,否则提示
|
|
* - 如果是根目录,双击返回键退出应用,否则提示
|
|
|
*/
|
|
*/
|
|
|
onBackPress(): boolean | void {
|
|
onBackPress(): boolean | void {
|
|
|
|
|
+ console.info('onecold onBackPress isDetailView = '+ this.isDetailView);
|
|
|
|
|
+ console.info('onecold onBackPress mType = '+ this.mType);
|
|
|
if (this.currentPath !== this.rootPath || this.isHistory || this.isFavMusic ||
|
|
if (this.currentPath !== this.rootPath || this.isHistory || this.isFavMusic ||
|
|
|
(this.modeType !== 0 && this.isCanBack)) {
|
|
(this.modeType !== 0 && this.isCanBack)) {
|
|
|
console.info('onecold 返回键处理逻辑:发送音频广播通知更新列表');
|
|
console.info('onecold 返回键处理逻辑:发送音频广播通知更新列表');
|
|
|
const eventData: emitter.EventData = {};
|
|
const eventData: emitter.EventData = {};
|
|
|
emitter.emit({ eventId: EventConstants.EVENT_SWIPE_BACK_UPDATE }, eventData); // 发送音频广播通知更新doSwipBack
|
|
emitter.emit({ eventId: EventConstants.EVENT_SWIPE_BACK_UPDATE }, eventData); // 发送音频广播通知更新doSwipBack
|
|
|
- }else if(this.mType > 0){
|
|
|
|
|
|
|
+ } else if(this.mType === 7&&this.isDetailView) {
|
|
|
|
|
+ // NavidromePage/Jellyfin/Emby 页面,发送手势返回事件
|
|
|
|
|
+ console.info('onecold NavidromePage 返回键处理:发送手势返回事件');
|
|
|
|
|
+ const eventData: emitter.EventData = {};
|
|
|
|
|
+ emitter.emit({ eventId: EventConstants.EVENT_SWIPE_BACK_NAVID}, eventData);
|
|
|
|
|
+ } else if(this.mType === 6) {
|
|
|
|
|
+ console.info('onecold 网盘 返回键处理:发送手势返回事件');
|
|
|
|
|
+ const eventData: emitter.EventData = {};
|
|
|
|
|
+ emitter.emit({ eventId: EventConstants.EVENT_SWIPE_BACK_DISK }, eventData);
|
|
|
|
|
+ } else if(this.mType > 0){
|
|
|
this.getUIContext()?.animateTo({ duration: 555 }, () => {
|
|
this.getUIContext()?.animateTo({ duration: 555 }, () => {
|
|
|
// 动画闭包内控制Image组件的出现和消失
|
|
// 动画闭包内控制Image组件的出现和消失
|
|
|
// this.isShowDrawer = !this.isShowDrawer
|
|
// this.isShowDrawer = !this.isShowDrawer
|
|
@@ -417,17 +428,20 @@ struct NewIndex {
|
|
|
.visibility(this.mType === 4 ? Visibility.Visible : Visibility.None)
|
|
.visibility(this.mType === 4 ? Visibility.Visible : Visibility.None)
|
|
|
AboutPage()
|
|
AboutPage()
|
|
|
.visibility(this.mType === 5 ? Visibility.Visible : Visibility.None)
|
|
.visibility(this.mType === 5 ? Visibility.Visible : Visibility.None)
|
|
|
|
|
+ if(this.mType === 6){
|
|
|
|
|
+ WebDavMainPage({
|
|
|
|
|
+ offsetX:this.offsetX,
|
|
|
|
|
+ isShowDrawer:this.isShowDrawer,
|
|
|
|
|
+ mType:this.mType,
|
|
|
|
|
+ selectedAccount:this.selectedAccount
|
|
|
|
|
+ })
|
|
|
|
|
+ .visibility(this.mType === 6 ? Visibility.Visible : Visibility.None)
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- WebDavMainPage({
|
|
|
|
|
- offsetX:this.offsetX,
|
|
|
|
|
- isShowDrawer:this.isShowDrawer,
|
|
|
|
|
- mType:this.mType,
|
|
|
|
|
- selectedAccount:this.selectedAccount
|
|
|
|
|
- })
|
|
|
|
|
- .visibility(this.mType === 6 ? Visibility.Visible : Visibility.None)
|
|
|
|
|
if(this.mType === 7){
|
|
if(this.mType === 7){
|
|
|
NavidromePage({
|
|
NavidromePage({
|
|
|
offsetX:this.offsetX,
|
|
offsetX:this.offsetX,
|
|
|
|
|
+ isDetailView:this.isDetailView,
|
|
|
isShowDrawer:this.isShowDrawer,
|
|
isShowDrawer:this.isShowDrawer,
|
|
|
mType:this.mType,
|
|
mType:this.mType,
|
|
|
selectedAccount:this.selectedAccount
|
|
selectedAccount:this.selectedAccount
|