|
|
@@ -374,7 +374,7 @@ export struct WebDavMainPage {
|
|
|
emitter.emit(eventPlaylistPlay, eventData);
|
|
|
|
|
|
// 跳转到首页播放器
|
|
|
- router.pushUrl({
|
|
|
+ this.getUIContext().getRouter().pushUrl({
|
|
|
url: 'pages/NewIndex',
|
|
|
params: {
|
|
|
fromWebDAV: true
|
|
|
@@ -587,7 +587,7 @@ export struct WebDavMainPage {
|
|
|
})
|
|
|
}
|
|
|
.layoutWeight(1)
|
|
|
- .divider({ strokeWidth: 1, color: '#EEEEEE' })
|
|
|
+ .divider({ strokeWidth: 1, color: this.isDarkMode ? '#333333' :'#EEEEEE' })
|
|
|
.margin({ top: 4 })
|
|
|
} else if (!this.isLoading) {
|
|
|
Column() {
|
|
|
@@ -611,32 +611,36 @@ export struct WebDavMainPage {
|
|
|
// 文件夹列表项
|
|
|
@Builder
|
|
|
buildFolderItem(folder: FileInfo) {
|
|
|
- Row({ space: 2 }) {
|
|
|
- SymbolGlyph($r('sys.symbol.folder'))
|
|
|
- .fontSize(48)
|
|
|
- .fontColor([this.themeColor])
|
|
|
- .alignSelf(ItemAlign.Center)
|
|
|
- .margin({ left: 8, right: 6 })
|
|
|
-
|
|
|
- // 文件夹信息
|
|
|
- Column({ space: 4 }) {
|
|
|
- Text(decodeUrlEncodedString(folder.fileName.replace('/', '')))
|
|
|
- .fontSize(15)
|
|
|
- .fontColor($r('app.color.index_tab_font_color'))
|
|
|
- .maxLines(1)
|
|
|
- .textOverflow({ overflow: TextOverflow.Ellipsis })
|
|
|
+ Button({ type: ButtonType.Normal, stateEffect: false }) {
|
|
|
+ Row({ space: 2 }) {
|
|
|
+ SymbolGlyph($r('sys.symbol.folder'))
|
|
|
+ .fontSize(48)
|
|
|
+ .fontColor([this.themeColor])
|
|
|
+ .alignSelf(ItemAlign.Center)
|
|
|
+ .margin({ left: 8, right: 6 })
|
|
|
+
|
|
|
+ // 文件夹信息
|
|
|
+ Column({ space: 4 }) {
|
|
|
+ Text(decodeUrlEncodedString(folder.fileName.replace('/', '')))
|
|
|
+ .fontSize(15)
|
|
|
+ .fontColor($r('app.color.index_tab_font_color'))
|
|
|
+ .maxLines(1)
|
|
|
+ .textOverflow({ overflow: TextOverflow.Ellipsis })
|
|
|
|
|
|
- Text('文件夹')
|
|
|
- .fontSize(13)
|
|
|
- .fontColor($r('app.color.index_tab_font_color'))
|
|
|
- .opacity(0.6)
|
|
|
+ Text('文件夹')
|
|
|
+ .fontSize(13)
|
|
|
+ .fontColor($r('app.color.index_tab_font_color'))
|
|
|
+ .opacity(0.6)
|
|
|
+ }
|
|
|
+ .alignItems(HorizontalAlign.Start)
|
|
|
+ .layoutWeight(1)
|
|
|
}
|
|
|
- .alignItems(HorizontalAlign.Start)
|
|
|
- .layoutWeight(1)
|
|
|
}
|
|
|
+ .reuseId('dir_item')
|
|
|
.width('100%')
|
|
|
.padding(12)
|
|
|
.backgroundColor($r('app.color.start_window_background'))
|
|
|
+ .clickEffect({ level: ClickEffectLevel.MIDDLE, scale: 0.8 })
|
|
|
.onClick(() => {
|
|
|
this.enterFolder(folder);
|
|
|
this.breadcrumbs = this.webdavManager.getBreadcrumbs();
|
|
|
@@ -646,42 +650,45 @@ export struct WebDavMainPage {
|
|
|
// 歌曲列表项
|
|
|
@Builder
|
|
|
buildSongItem(song: Song, index: number) {
|
|
|
- Row({ space: 12 }) {
|
|
|
- // 序号
|
|
|
- // 歌曲封面
|
|
|
- Image(song.img)
|
|
|
- .width(48)
|
|
|
- .height(48)
|
|
|
- .borderRadius(4)
|
|
|
- .objectFit(ImageFit.Cover)
|
|
|
+ Button({ type: ButtonType.Normal, stateEffect: false }) {
|
|
|
+ Row({ space: 12 }) {
|
|
|
+ // 序号
|
|
|
+ // 歌曲封面
|
|
|
+ Image(song.img)
|
|
|
+ .width(48)
|
|
|
+ .height(48)
|
|
|
+ .borderRadius(4)
|
|
|
+ .objectFit(ImageFit.Cover)
|
|
|
+
|
|
|
+ // 歌曲信息
|
|
|
+ Column({ space: 4 }) {
|
|
|
+ Text(decodeUrlEncodedString(song.title))
|
|
|
+ .fontSize(15)
|
|
|
+ .fontColor($r('app.color.index_tab_font_color'))
|
|
|
+ .maxLines(1)
|
|
|
+ .textOverflow({ overflow: TextOverflow.Ellipsis })
|
|
|
|
|
|
- // 歌曲信息
|
|
|
- Column({ space: 4 }) {
|
|
|
- Text(decodeUrlEncodedString(song.title))
|
|
|
- .fontSize(15)
|
|
|
- .fontColor($r('app.color.index_tab_font_color'))
|
|
|
- .maxLines(1)
|
|
|
- .textOverflow({ overflow: TextOverflow.Ellipsis })
|
|
|
+ Text(decodeUrlEncodedString(song.artist))
|
|
|
+ .fontSize(13)
|
|
|
+ .fontColor($r('app.color.index_tab_font_color'))
|
|
|
+ .opacity(0.6)
|
|
|
+ .maxLines(1)
|
|
|
+ .textOverflow({ overflow: TextOverflow.Ellipsis })
|
|
|
+ }
|
|
|
+ .alignItems(HorizontalAlign.Start)
|
|
|
+ .layoutWeight(1)
|
|
|
|
|
|
- Text(decodeUrlEncodedString(song.artist))
|
|
|
- .fontSize(13)
|
|
|
- .fontColor($r('app.color.index_tab_font_color'))
|
|
|
- .opacity(0.6)
|
|
|
- .maxLines(1)
|
|
|
- .textOverflow({ overflow: TextOverflow.Ellipsis })
|
|
|
+ // 播放图标
|
|
|
+ Image($r('app.media.ic_play'))
|
|
|
+ .width(20)
|
|
|
+ .height(20)
|
|
|
+ .fillColor($r('app.color.index_tab_font_color'))
|
|
|
+ .opacity(0.4)
|
|
|
}
|
|
|
- .alignItems(HorizontalAlign.Start)
|
|
|
- .layoutWeight(1)
|
|
|
-
|
|
|
- // 播放图标
|
|
|
- Image($r('app.media.ic_play'))
|
|
|
- .width(20)
|
|
|
- .height(20)
|
|
|
- .fillColor($r('app.color.index_tab_font_color'))
|
|
|
- .opacity(0.4)
|
|
|
}
|
|
|
.width('100%')
|
|
|
.padding(12)
|
|
|
+ .clickEffect({ level: ClickEffectLevel.MIDDLE, scale: 0.8 })
|
|
|
.backgroundColor($r('app.color.start_window_background'))
|
|
|
.onClick(() => {
|
|
|
this.playSong(song, index);
|