|
|
@@ -9188,47 +9188,40 @@ export struct LocalMusic {
|
|
|
@Builder
|
|
|
playCenterView(){
|
|
|
Row() {
|
|
|
- Row({ space: 20 }) {
|
|
|
-
|
|
|
-
|
|
|
- Button({type:ButtonType.Circle,stateEffect:true}){
|
|
|
- //更多功能
|
|
|
- Image($r('app.media.menu'))
|
|
|
- .width(24)
|
|
|
- .clickEffect({level:ClickEffectLevel.MIDDLE})
|
|
|
- .bindSheet($$this.isShowMoreView, this.PlayMoreSheet(), {
|
|
|
- height: '95%',
|
|
|
- preferType: this.currentBreakpoint!==BreakpointTypeEnum.SM?SheetType.CENTER:SheetType.BOTTOM,
|
|
|
- dragBar: true,
|
|
|
- showClose: true,
|
|
|
- blurStyle: BlurStyle.Thin,
|
|
|
- backgroundColor: Color.Transparent,
|
|
|
- })
|
|
|
- }
|
|
|
- .margin({ left: 5 })
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
- .backgroundColor(Color.Transparent)
|
|
|
- .onClick(() => {
|
|
|
- this.isShowMoreView = !this.isShowMoreView;
|
|
|
- })
|
|
|
-
|
|
|
- Button({type:ButtonType.Circle,stateEffect:true}){
|
|
|
- Image($r('app.media.ic_previous'))
|
|
|
- .width(33)
|
|
|
- .clickEffect({level:ClickEffectLevel.HEAVY})
|
|
|
- .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
- }
|
|
|
- .height(50)
|
|
|
- .width(50)
|
|
|
- .onClick(async () => {
|
|
|
- await this.playPrevious()
|
|
|
- })
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
- .backgroundColor(Color.Transparent)
|
|
|
- .margin({ left: 5 })
|
|
|
-
|
|
|
+ Button({type:ButtonType.Circle,stateEffect:true}){
|
|
|
+ //更多功能
|
|
|
+ Image($r('app.media.menu'))
|
|
|
+ .width(24)
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
+ .bindSheet($$this.isShowMoreView, this.PlayMoreSheet(), {
|
|
|
+ height: '95%',
|
|
|
+ preferType: this.currentBreakpoint!==BreakpointTypeEnum.SM?SheetType.CENTER:SheetType.BOTTOM,
|
|
|
+ dragBar: true,
|
|
|
+ showClose: true,
|
|
|
+ blurStyle: BlurStyle.Thin,
|
|
|
+ backgroundColor: Color.Transparent,
|
|
|
+ })
|
|
|
}
|
|
|
+ .height(45)
|
|
|
+ .width(45)
|
|
|
+ .margin({ left: 5 })
|
|
|
+ .backgroundColor(Color.Transparent)
|
|
|
+ .onClick(() => {
|
|
|
+ this.isShowMoreView = !this.isShowMoreView;
|
|
|
+ })
|
|
|
|
|
|
+ Button({type:ButtonType.Circle,stateEffect:true}){
|
|
|
+ Image($r('app.media.ic_previous'))
|
|
|
+ .width(33)
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
+ .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
+ }
|
|
|
+ .height(45)
|
|
|
+ .width(45)
|
|
|
+ .onClick(async () => {
|
|
|
+ await this.playPrevious()
|
|
|
+ })
|
|
|
+ .backgroundColor(Color.Transparent)
|
|
|
|
|
|
Button({type:ButtonType.Circle,stateEffect:true}){
|
|
|
Column() {
|
|
|
@@ -9242,71 +9235,49 @@ export struct LocalMusic {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- // .visualEffect(new hdsEffect.HdsEffectBuilder()
|
|
|
- // .pressShadow(this.button_gradient_state)
|
|
|
- // .pointLight({
|
|
|
- // options: {
|
|
|
- // color: Color.White,
|
|
|
- // intensity: this.lightIntensity,
|
|
|
- // height: 150
|
|
|
- // }
|
|
|
- // })
|
|
|
- // .pressShadow(this.button_gradient_state)
|
|
|
- // .buildEffect())
|
|
|
.onClick(async () => {
|
|
|
this.playOrPause()
|
|
|
- // this.illuminatedType = hdsEffect.PointLightIlluminatedType.BORDER;
|
|
|
- // this.button_gradient_state = hdsEffect.PressShadowType.BLEND_GRADIENT;
|
|
|
})
|
|
|
.backgroundColor(Color.Transparent)
|
|
|
.layoutWeight(1)
|
|
|
- // .margin({ left: 38, right: 38 })
|
|
|
|
|
|
|
|
|
- Row({ space: 20 }) {
|
|
|
- Button({ type: ButtonType.Circle, stateEffect: true }) {
|
|
|
- Image($r('app.media.ic_next'))
|
|
|
- .width(33)
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
- .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
- }
|
|
|
- .height(50)
|
|
|
- .width(50)
|
|
|
- .backgroundColor(Color.Transparent)
|
|
|
- .margin({ right: 5 })
|
|
|
- .onClick(async () => {
|
|
|
- await this.playNext();
|
|
|
- })
|
|
|
- .width(33)
|
|
|
+ Button({ type: ButtonType.Circle, stateEffect: true }) {
|
|
|
+ Image($r('app.media.ic_next'))
|
|
|
+ .width(33)
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
+ .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
+ }
|
|
|
+ .height(45)
|
|
|
+ .width(45)
|
|
|
+ .backgroundColor(Color.Transparent)
|
|
|
+ .onClick(async () => {
|
|
|
+ await this.playNext();
|
|
|
+ })
|
|
|
|
|
|
|
|
|
- if(this.isPhoneLan()){
|
|
|
- this.fullButton()
|
|
|
- }else{
|
|
|
- Button({type:ButtonType.Circle,stateEffect:true}){
|
|
|
- //添加或取消收藏
|
|
|
- SymbolGlyph(Utility.getIsFav(this.favList,this.currentSong)?
|
|
|
+ if(this.isPhoneLan()){
|
|
|
+ this.fullButton()
|
|
|
+ }else{
|
|
|
+ Button({type:ButtonType.Circle,stateEffect:true}){
|
|
|
+ //添加或取消收藏
|
|
|
+ SymbolGlyph(Utility.getIsFav(this.favList,this.currentSong)?
|
|
|
$r('sys.symbol.heart_fill'):$r('sys.symbol.heart'))
|
|
|
- .fontSize(23)
|
|
|
- .fontColor([Color.White])
|
|
|
- .alignSelf(ItemAlign.Center)
|
|
|
- // .width(24)
|
|
|
- .clickEffect({level:ClickEffectLevel.MIDDLE})
|
|
|
- .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
- .onClick(async () => {
|
|
|
- if(this.currentSong){
|
|
|
- this.doFav(this.currentSong)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- .backgroundColor(Color.Transparent)
|
|
|
- .width(24)
|
|
|
+ .fontSize(23)
|
|
|
+ .fontColor([Color.White])
|
|
|
+ .alignSelf(ItemAlign.Center)
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
+ .aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
+ .onClick(async () => {
|
|
|
+ if(this.currentSong){
|
|
|
+ this.doFav(this.currentSong)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+ .backgroundColor(Color.Transparent)
|
|
|
+ .height(45)
|
|
|
+ .width(45)
|
|
|
}
|
|
|
- // .margin({ left: 5 })
|
|
|
|
|
|
}
|
|
|
.width('95%')
|
|
|
@@ -9421,30 +9392,33 @@ export struct LocalMusic {
|
|
|
if (this.playType === 0) {
|
|
|
Image($r('app.media.loop'))
|
|
|
.width(27)
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
} else if (this.playType === 1) {
|
|
|
Image($r('app.media.single'))
|
|
|
.width(27)
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
} else if (this.playType === 2) {
|
|
|
Image($r('app.media.normal_play'))
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
.width(27)
|
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
} else if (this.playType === 3) {
|
|
|
Image($r('app.media.random'))
|
|
|
.width(27)
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
.layoutWeight(1)
|
|
|
.margin({ left: 5 })
|
|
|
+ .height(45)
|
|
|
+ .width(45)
|
|
|
.backgroundColor(Color.Transparent)
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
.onClick(async () => {
|
|
|
this.setLoopMode()
|
|
|
-
|
|
|
-
|
|
|
})
|
|
|
|
|
|
|
|
|
@@ -9455,13 +9429,14 @@ export struct LocalMusic {
|
|
|
Column() {
|
|
|
Image($r('app.media.lyric'))
|
|
|
.width(26)
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
}
|
|
|
}
|
|
|
+ .height(45)
|
|
|
+ .width(45)
|
|
|
.layoutWeight(1)
|
|
|
.backgroundColor(Color.Transparent)
|
|
|
-
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
.onClick(async () => {
|
|
|
this.isLyricSetting = !this.isLyricSetting;
|
|
|
|
|
|
@@ -9473,6 +9448,7 @@ export struct LocalMusic {
|
|
|
Image($r('app.media.hm_playlist'))
|
|
|
.width(24)
|
|
|
.fillColor(Color.White)
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
.bindSheet($$this.isShowSheetView, this.PlayListSheet(), {
|
|
|
height: '95%',
|
|
|
@@ -9488,8 +9464,9 @@ export struct LocalMusic {
|
|
|
})
|
|
|
}
|
|
|
.layoutWeight(1)
|
|
|
+ .height(45)
|
|
|
+ .width(45)
|
|
|
.backgroundColor(Color.Transparent)
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
.onClick(() => {
|
|
|
this.isShowSheetView = !this.isShowSheetView;
|
|
|
if(this.isPlayListBgGrass){
|
|
|
@@ -9517,13 +9494,14 @@ export struct LocalMusic {
|
|
|
Column() {
|
|
|
Image($r('app.media.full_4'))
|
|
|
.width(25)
|
|
|
+ .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
.aspectRatio(CommonConstants.ASPECT_RATIO)
|
|
|
}
|
|
|
}
|
|
|
.layoutWeight(1)
|
|
|
.backgroundColor(Color.Transparent)
|
|
|
-
|
|
|
- .clickEffect({level:ClickEffectLevel.LIGHT, scale: 0.5})
|
|
|
+ .height(45)
|
|
|
+ .width(45)
|
|
|
.onClick(async () => {
|
|
|
if (this.isLandscape) {
|
|
|
this.setOrientation(window.Orientation.USER_ROTATION_PORTRAIT);
|