|
@@ -348,6 +348,8 @@ export struct LocalMusic {
|
|
|
@State showSimple: boolean = true//开启沉浸模式
|
|
@State showSimple: boolean = true//开启沉浸模式
|
|
|
@State isPaging: boolean = true;//是否分页加载机制
|
|
@State isPaging: boolean = true;//是否分页加载机制
|
|
|
@State isCoverRectangle: boolean = true;
|
|
@State isCoverRectangle: boolean = true;
|
|
|
|
|
+ @State isShowSpectrum: boolean = false;
|
|
|
|
|
+ @State spectrumModeIndex: number = 0; // 频谱特效类型索引
|
|
|
@State showZMIndex: boolean = false //是否右侧显示字母索引
|
|
@State showZMIndex: boolean = false //是否右侧显示字母索引
|
|
|
private prevOffsetY: number = 0; // 记录上一次的Y轴偏移量
|
|
private prevOffsetY: number = 0; // 记录上一次的Y轴偏移量
|
|
|
@State autoHideTitle: boolean = true //滚动自动隐藏标题栏
|
|
@State autoHideTitle: boolean = true //滚动自动隐藏标题栏
|
|
@@ -1206,6 +1208,9 @@ export struct LocalMusic {
|
|
|
context.getApplicationContext().setColorMode(colorMode)
|
|
context.getApplicationContext().setColorMode(colorMode)
|
|
|
}
|
|
}
|
|
|
initSetting() {
|
|
initSetting() {
|
|
|
|
|
+ this.isShowSpectrum = PreferencesUtil.getBooleanSync('isShowSpectrum', false)
|
|
|
|
|
+ this.spectrumModeIndex = PreferencesUtil.getNumberSync('spectrumModeIndex', 0)
|
|
|
|
|
+ AppStorage.setOrCreate<number>('spectrumMode', this.spectrumModeIndex)
|
|
|
this.enablePointLight = PreferencesUtil.getBooleanSync('enablePointLight', true)
|
|
this.enablePointLight = PreferencesUtil.getBooleanSync('enablePointLight', true)
|
|
|
AppStorage.setOrCreate('EnablePointLight', this.enablePointLight);
|
|
AppStorage.setOrCreate('EnablePointLight', this.enablePointLight);
|
|
|
this.showSimple = PreferencesUtil.getBooleanSync('showSimple', true)
|
|
this.showSimple = PreferencesUtil.getBooleanSync('showSimple', true)
|
|
@@ -10771,6 +10776,9 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
if (this.isPhoneLan()) {
|
|
if (this.isPhoneLan()) {
|
|
|
Column() {
|
|
Column() {
|
|
|
|
|
+ if (this.isShowSpectrum) {
|
|
|
|
|
+ this.InlineSpectrumView()
|
|
|
|
|
+ }
|
|
|
this.playProgressView()
|
|
this.playProgressView()
|
|
|
}
|
|
}
|
|
|
.margin({ bottom: 32, right: this.currentLyricAlignMode == 0 ? 0 : 30 })
|
|
.margin({ bottom: 32, right: this.currentLyricAlignMode == 0 ? 0 : 30 })
|
|
@@ -10807,6 +10815,9 @@ export struct LocalMusic {
|
|
|
@Builder
|
|
@Builder
|
|
|
BottomControl() {
|
|
BottomControl() {
|
|
|
Column() {
|
|
Column() {
|
|
|
|
|
+ if (this.isShowSpectrum) {
|
|
|
|
|
+ this.InlineSpectrumView()
|
|
|
|
|
+ }
|
|
|
this.TopPlayProgressView()
|
|
this.TopPlayProgressView()
|
|
|
//播放 暂停,下一首,上一首
|
|
//播放 暂停,下一首,上一首
|
|
|
this.playCenterView()
|
|
this.playCenterView()
|
|
@@ -11401,16 +11412,9 @@ export struct LocalMusic {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
- if (this.isPhonePortrait() ) {
|
|
|
|
|
- Stack(){
|
|
|
|
|
- if (true) {
|
|
|
|
|
- this.InlineSpectrumView()
|
|
|
|
|
- }
|
|
|
|
|
- if (this.isShowSingleLineLyric) {
|
|
|
|
|
- this.SingleLyricView()
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
|
+ if (this.isPhonePortrait() &&this.isShowSingleLineLyric) {
|
|
|
|
|
+ this.SingleLyricView()
|
|
|
}
|
|
}
|
|
|
if (this.isPhoneLan()) {
|
|
if (this.isPhoneLan()) {
|
|
|
Column() {
|
|
Column() {
|
|
@@ -12819,15 +12823,27 @@ export struct LocalMusic {
|
|
|
})
|
|
})
|
|
|
.id('AVCastPicker')
|
|
.id('AVCastPicker')
|
|
|
|
|
|
|
|
- } else {
|
|
|
|
|
- Image(more.image)
|
|
|
|
|
- .width(24)
|
|
|
|
|
- .height(24)
|
|
|
|
|
- .fillColor(Color.White)
|
|
|
|
|
- .margin({ left: 10, right: 10 })
|
|
|
|
|
- .onClick(() => {
|
|
|
|
|
- this.doMore(more.id)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ }else {
|
|
|
|
|
+ if(more.id >= 22){
|
|
|
|
|
+ SymbolGlyph(more.image)
|
|
|
|
|
+ .fontSize(24)
|
|
|
|
|
+ .fontColor([Color.White])
|
|
|
|
|
+ .alignSelf(ItemAlign.Center)
|
|
|
|
|
+ .margin({ left: 10, right: 10 })
|
|
|
|
|
+ .onClick(() => {
|
|
|
|
|
+ this.doMore(more.id)
|
|
|
|
|
+ })
|
|
|
|
|
+ }else{
|
|
|
|
|
+ Image(more.image)
|
|
|
|
|
+ .width(24)
|
|
|
|
|
+ .height(24)
|
|
|
|
|
+ .fillColor(Color.White)
|
|
|
|
|
+ .margin({ left: 10, right: 10 })
|
|
|
|
|
+ .onClick(() => {
|
|
|
|
|
+ this.doMore(more.id)
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
Text(more.id == 17 ? (this.isLandscape ? '竖屏模式' : '横屏模式') : more.title)
|
|
Text(more.id == 17 ? (this.isLandscape ? '竖屏模式' : '横屏模式') : more.title)
|
|
|
.fontSize(16)
|
|
.fontSize(16)
|
|
|
|
|
|
|
@@ -12964,6 +12980,44 @@ export struct LocalMusic {
|
|
|
.width(48)
|
|
.width(48)
|
|
|
.height(24);
|
|
.height(24);
|
|
|
|
|
|
|
|
|
|
+ Toggle({ type: ToggleType.Switch, isOn: this.isShowSpectrum })
|
|
|
|
|
+ .selectedColor(this.themeColor)
|
|
|
|
|
+ .switchPointColor(Color.White)
|
|
|
|
|
+ .clickEffect({ level: ClickEffectLevel.LIGHT, scale: 0.5 })
|
|
|
|
|
+ .margin({ right: 15 })
|
|
|
|
|
+ .visibility(more.id == 25 ? Visibility.Visible : Visibility.None)
|
|
|
|
|
+ .onChange((checked: boolean) => { // 选择开关状态变化时触发事件
|
|
|
|
|
+ if (more.id == 25) {
|
|
|
|
|
+ this.isShowSpectrum = checked;
|
|
|
|
|
+ PreferencesUtil.put("isShowSpectrum", this.isShowSpectrum)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ })
|
|
|
|
|
+ .width(48)
|
|
|
|
|
+ .height(24);
|
|
|
|
|
+
|
|
|
|
|
+ // 频谱特效类型选择器
|
|
|
|
|
+ Select([
|
|
|
|
|
+ { value: '柱状' },
|
|
|
|
|
+ { value: '波形' },
|
|
|
|
|
+ { value: '圆形' },
|
|
|
|
|
+ { value: '粒子' }
|
|
|
|
|
+ ])
|
|
|
|
|
+ .font({ size: 14, weight: FontWeight.Medium })
|
|
|
|
|
+ .fontColor(Color.White)
|
|
|
|
|
+ .margin({ left: 25 })
|
|
|
|
|
+ .visibility(more.id === 26 ? Visibility.Visible : Visibility.None)
|
|
|
|
|
+ .selected(this.spectrumModeIndex)
|
|
|
|
|
+ .value(['柱状', '波形', '圆形', '粒子'][this.spectrumModeIndex])
|
|
|
|
|
+ .onSelect(async (index: number, _text?: string) => {
|
|
|
|
|
+ this.spectrumModeIndex = index;
|
|
|
|
|
+ PreferencesUtil.put('spectrumModeIndex', this.spectrumModeIndex);
|
|
|
|
|
+ AppStorage.setOrCreate<number>('spectrumMode', this.spectrumModeIndex);
|
|
|
|
|
+ const modeNames = ['柱状', '波形', '圆形', '粒子'];
|
|
|
|
|
+ ToastUtil.showToast(`已切换到${modeNames[index]}频谱`);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
Toggle({ type: ToggleType.Switch, isOn: this.showSimple })
|
|
Toggle({ type: ToggleType.Switch, isOn: this.showSimple })
|
|
|
.selectedColor(this.themeColor)
|
|
.selectedColor(this.themeColor)
|
|
|
.switchPointColor(Color.White)
|
|
.switchPointColor(Color.White)
|
|
@@ -13061,7 +13115,7 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
{ id: 2, image: $r('app.media.lyric'), title: '歌词' },
|
|
{ id: 2, image: $r('app.media.lyric'), title: '歌词' },
|
|
|
|
|
|
|
|
- { id: 24, image: $r('app.media.equalizer'), title: '均衡器' },
|
|
|
|
|
|
|
+ { id: 24, image: $r('sys.symbol.slider_vertical_3'), title: '均衡器' },
|
|
|
|
|
|
|
|
{ id: 17, image: $r('app.media.full_4'), title: '横屏模式' },
|
|
{ id: 17, image: $r('app.media.full_4'), title: '横屏模式' },
|
|
|
|
|
|
|
@@ -13087,15 +13141,16 @@ export struct LocalMusic {
|
|
|
|
|
|
|
|
{ id: 9, image: $r('app.media.volume_white'), title: '调整音量' },
|
|
{ id: 9, image: $r('app.media.volume_white'), title: '调整音量' },
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+ { id: 25, image: $r('sys.symbol.ranking'), title: '音乐频谱' },
|
|
|
|
|
+ { id: 26, image: $r('sys.symbol.eight_diagram'), title: '频谱类型' },
|
|
|
// { id: 6, image: $r('app.media.memory'), title: '记忆播放' },
|
|
// { id: 6, image: $r('app.media.memory'), title: '记忆播放' },
|
|
|
|
|
|
|
|
|
|
|
|
|
{ id: 13, image: $r('app.media.rectangle'), title: '封面方形' },
|
|
{ id: 13, image: $r('app.media.rectangle'), title: '封面方形' },
|
|
|
|
|
|
|
|
- { id : 22, image: $r('app.media.skip'), title: '沉浸式' },
|
|
|
|
|
|
|
+ { id : 22, image: $r('sys.symbol.satellite_map'), title: '沉浸式' },
|
|
|
|
|
|
|
|
- { id : 23, image: $r('app.media.more_do'), title: '点光源效果' },
|
|
|
|
|
|
|
+ { id : 23, image: $r('sys.symbol.lightbulb'), title: '点光源效果' },
|
|
|
|
|
|
|
|
{ id : 21, image: $r('app.media.kp_music'), title: '背景双边流光' },
|
|
{ id : 21, image: $r('app.media.kp_music'), title: '背景双边流光' },
|
|
|
|
|
|
|
@@ -15302,9 +15357,9 @@ export struct LocalMusic {
|
|
|
isVisible: this.currentSwiperIndex === 0,
|
|
isVisible: this.currentSwiperIndex === 0,
|
|
|
isPlaying: this.CONTROL_PlayStatus === PlayStatus.PLAY
|
|
isPlaying: this.CONTROL_PlayStatus === PlayStatus.PLAY
|
|
|
})
|
|
})
|
|
|
- .width(this.isLandscape ? '82%' : '90%')
|
|
|
|
|
- .height(this.isCoverOpacity() ? 120 : 150)
|
|
|
|
|
- .margin({ top: 3, bottom: 12 })
|
|
|
|
|
|
|
+ .width( '82%')
|
|
|
|
|
+ .height(this.isCoverOpacity() ? 80 : 100)
|
|
|
|
|
+ .margin({bottom: 3 })
|
|
|
.clip(true)
|
|
.clip(true)
|
|
|
}
|
|
}
|
|
|
|
|
|