|
@@ -14,6 +14,9 @@ import { UploadTaskDataSource } from '../viewmodel/UploadTask';
|
|
|
import { promptAction } from '@kit.ArkUI';
|
|
import { promptAction } from '@kit.ArkUI';
|
|
|
import fs from '@ohos.file.fs';
|
|
import fs from '@ohos.file.fs';
|
|
|
import ReqPermissionUtil from '../common/util/ReqPermissionUtil';
|
|
import ReqPermissionUtil from '../common/util/ReqPermissionUtil';
|
|
|
|
|
+import { ButtonFancyModifier, ShadowModifier, SymbolGlyphFancyModifier } from '../common/util/AttributeModifierUtil';
|
|
|
|
|
+import { SegmentButton } from '@kit.ArkUI';
|
|
|
|
|
+import { SegmentButtonOptions, SegmentButtonItemTuple } from '@kit.ArkUI';
|
|
|
|
|
|
|
|
const TAG = 'heanup UploadMusicPage';
|
|
const TAG = 'heanup UploadMusicPage';
|
|
|
|
|
|
|
@@ -53,6 +56,17 @@ export struct UploadMusicPage {
|
|
|
@State uploadPath: string = '/';
|
|
@State uploadPath: string = '/';
|
|
|
@State availablePaths: string[] = [];
|
|
@State availablePaths: string[] = [];
|
|
|
@State duplicateAction: string = 'skip';
|
|
@State duplicateAction: string = 'skip';
|
|
|
|
|
+
|
|
|
|
|
+ // SegmentButton 重复文件处理选项
|
|
|
|
|
+ @State duplicateOptions: SegmentButtonOptions = SegmentButtonOptions.capsule({
|
|
|
|
|
+ buttons: [{ text: '跳过' }, { text: '覆盖' }, { text: '重命名' }] as SegmentButtonItemTuple,
|
|
|
|
|
+ backgroundColor: $r('app.color.index_background'),
|
|
|
|
|
+ selectedBackgroundColor: $r('app.color.start_window_background'),
|
|
|
|
|
+ selectedFontColor: $r('app.color.text_color'),
|
|
|
|
|
+ buttonPadding: { top: 10, bottom: 10 },
|
|
|
|
|
+ multiply: false
|
|
|
|
|
+ });
|
|
|
|
|
+ @State @Watch('onDuplicateActionChange') selectedDuplicateIndex: number[] = [0];
|
|
|
@State uploadProgress: number = 0;
|
|
@State uploadProgress: number = 0;
|
|
|
@State uploadSpeed: string = '0 KB/s';
|
|
@State uploadSpeed: string = '0 KB/s';
|
|
|
@State uploadedCount: number = 0;
|
|
@State uploadedCount: number = 0;
|
|
@@ -84,6 +98,29 @@ export struct UploadMusicPage {
|
|
|
private cachedDownloadRoot: string = '';
|
|
private cachedDownloadRoot: string = '';
|
|
|
private localBrowseRoot: string = '';
|
|
private localBrowseRoot: string = '';
|
|
|
|
|
|
|
|
|
|
+ // 重复文件处理方式变化监听
|
|
|
|
|
+ onDuplicateActionChange() {
|
|
|
|
|
+ if (this.selectedDuplicateIndex.length > 0) {
|
|
|
|
|
+ const actionMap = ['skip', 'overwrite', 'rename'];
|
|
|
|
|
+ this.duplicateAction = actionMap[this.selectedDuplicateIndex[0]];
|
|
|
|
|
+ Logger.info(TAG, `重复文件处理方式变更为: ${this.duplicateAction}`);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ // 获取当前重复文件处理方式的描述
|
|
|
|
|
+ private getActionDescription(): string {
|
|
|
|
|
+ switch (this.duplicateAction) {
|
|
|
|
|
+ case 'skip':
|
|
|
|
|
+ return '保留远程文件,不上传';
|
|
|
|
|
+ case 'overwrite':
|
|
|
|
|
+ return '替换远程文件';
|
|
|
|
|
+ case 'rename':
|
|
|
|
|
+ return '自动重命名后上传';
|
|
|
|
|
+ default:
|
|
|
|
|
+ return '保留远程文件,不上传';
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
aboutToAppear(): void {
|
|
aboutToAppear(): void {
|
|
|
Logger.info(TAG, '页面即将显示');
|
|
Logger.info(TAG, '页面即将显示');
|
|
|
|
|
|
|
@@ -111,6 +148,12 @@ export struct UploadMusicPage {
|
|
|
try {
|
|
try {
|
|
|
// 加载默认重复文件处理方式
|
|
// 加载默认重复文件处理方式
|
|
|
this.duplicateAction = PreferencesUtil.getStringSync('webdavUploadDuplicateAction', 'skip');
|
|
this.duplicateAction = PreferencesUtil.getStringSync('webdavUploadDuplicateAction', 'skip');
|
|
|
|
|
+
|
|
|
|
|
+ // 根据加载的设置初始化SegmentButton选择索引
|
|
|
|
|
+ const actionMap = ['skip', 'overwrite', 'rename'];
|
|
|
|
|
+ const index = actionMap.indexOf(this.duplicateAction);
|
|
|
|
|
+ this.selectedDuplicateIndex = [index >= 0 ? index : 0];
|
|
|
|
|
+
|
|
|
Logger.info(TAG, `加载用户设置 - 重复文件处理: ${this.duplicateAction}`);
|
|
Logger.info(TAG, `加载用户设置 - 重复文件处理: ${this.duplicateAction}`);
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
const err = error as Error;
|
|
const err = error as Error;
|
|
@@ -965,7 +1008,7 @@ export struct UploadMusicPage {
|
|
|
undefined,
|
|
undefined,
|
|
|
undefined,
|
|
undefined,
|
|
|
undefined,
|
|
undefined,
|
|
|
- audioFileName
|
|
|
|
|
|
|
+ undefined
|
|
|
);
|
|
);
|
|
|
videoItem.remote_rel_path = audioFile.relativePath;
|
|
videoItem.remote_rel_path = audioFile.relativePath;
|
|
|
songs.push(videoItem);
|
|
songs.push(videoItem);
|
|
@@ -985,7 +1028,7 @@ export struct UploadMusicPage {
|
|
|
undefined,
|
|
undefined,
|
|
|
undefined,
|
|
undefined,
|
|
|
undefined,
|
|
undefined,
|
|
|
- displayName
|
|
|
|
|
|
|
+ undefined
|
|
|
);
|
|
);
|
|
|
videoItem.remote_rel_path = displayName;
|
|
videoItem.remote_rel_path = displayName;
|
|
|
songs.push(videoItem);
|
|
songs.push(videoItem);
|
|
@@ -1409,7 +1452,21 @@ export struct UploadMusicPage {
|
|
|
.fontSize(13)
|
|
.fontSize(13)
|
|
|
.fontWeight(FontWeight.Medium)
|
|
.fontWeight(FontWeight.Medium)
|
|
|
.fontColor(this.isDarkMode ? '#99FFFFFF' : '#66000000')
|
|
.fontColor(this.isDarkMode ? '#99FFFFFF' : '#66000000')
|
|
|
-
|
|
|
|
|
|
|
+ Row({ space: 8 }) {
|
|
|
|
|
+ Text('📂')
|
|
|
|
|
+ .fontSize(18)
|
|
|
|
|
+
|
|
|
|
|
+ Text(this.uploadPath || '请选择远程目录')
|
|
|
|
|
+ .fontSize(15)
|
|
|
|
|
+ .fontColor(this.uploadPath ?
|
|
|
|
|
+ (this.isDarkMode ? '#E5FFFFFF' : '#1F1F1F') :
|
|
|
|
|
+ (this.isDarkMode ? '#66FFFFFF' : '#99000000'))
|
|
|
|
|
+ .fontWeight(this.uploadPath ? FontWeight.Medium : FontWeight.Regular)
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
|
|
+ .maxLines(1)
|
|
|
|
|
+ .textOverflow({ overflow: TextOverflow.Ellipsis })
|
|
|
|
|
+ }
|
|
|
|
|
+ .width('100%')
|
|
|
Blank()
|
|
Blank()
|
|
|
|
|
|
|
|
Button('浏览')
|
|
Button('浏览')
|
|
@@ -1433,22 +1490,6 @@ export struct UploadMusicPage {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
-
|
|
|
|
|
- Row({ space: 8 }) {
|
|
|
|
|
- Text('📂')
|
|
|
|
|
- .fontSize(18)
|
|
|
|
|
-
|
|
|
|
|
- Text(this.uploadPath || '请选择远程目录')
|
|
|
|
|
- .fontSize(15)
|
|
|
|
|
- .fontColor(this.uploadPath ?
|
|
|
|
|
- (this.isDarkMode ? '#E5FFFFFF' : '#1F1F1F') :
|
|
|
|
|
- (this.isDarkMode ? '#66FFFFFF' : '#99000000'))
|
|
|
|
|
- .fontWeight(this.uploadPath ? FontWeight.Medium : FontWeight.Regular)
|
|
|
|
|
- .layoutWeight(1)
|
|
|
|
|
- .maxLines(1)
|
|
|
|
|
- .textOverflow({ overflow: TextOverflow.Ellipsis })
|
|
|
|
|
- }
|
|
|
|
|
- .width('100%')
|
|
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
.padding(14)
|
|
.padding(14)
|
|
@@ -1469,134 +1510,14 @@ export struct UploadMusicPage {
|
|
|
.fontColor(this.isDarkMode ? '#99FFFFFF' : '#66000000')
|
|
.fontColor(this.isDarkMode ? '#99FFFFFF' : '#66000000')
|
|
|
.alignSelf(ItemAlign.Start)
|
|
.alignSelf(ItemAlign.Start)
|
|
|
|
|
|
|
|
- Column({ space: 10 }) {
|
|
|
|
|
- // 跳过选项
|
|
|
|
|
- Row({ space: 10 }) {
|
|
|
|
|
- Radio({ value: 'skip', group: 'duplicateAction' })
|
|
|
|
|
- .checked(this.duplicateAction === 'skip')
|
|
|
|
|
- .radioStyle({
|
|
|
|
|
- checkedBackgroundColor: this.themeColor,
|
|
|
|
|
- uncheckedBorderColor: this.isDarkMode ? '#4D4D4D' : '#C7C7CC'
|
|
|
|
|
- })
|
|
|
|
|
- .onChange((checked: boolean) => {
|
|
|
|
|
- if (checked) {
|
|
|
|
|
- this.duplicateAction = 'skip';
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- Column({ space: 2 }) {
|
|
|
|
|
- Text('跳过')
|
|
|
|
|
- .fontSize(14)
|
|
|
|
|
- .fontWeight(FontWeight.Medium)
|
|
|
|
|
- .fontColor(this.isDarkMode ? '#E5FFFFFF' : '#1F1F1F')
|
|
|
|
|
- Text('保留远程文件,不上传')
|
|
|
|
|
- .fontSize(12)
|
|
|
|
|
- .fontColor(this.isDarkMode ? '#66FFFFFF' : '#8E8E93')
|
|
|
|
|
- }
|
|
|
|
|
- .alignItems(HorizontalAlign.Start)
|
|
|
|
|
- .layoutWeight(1)
|
|
|
|
|
- }
|
|
|
|
|
- .width('100%')
|
|
|
|
|
- .padding(12)
|
|
|
|
|
- .backgroundColor(this.duplicateAction === 'skip' ?
|
|
|
|
|
- (this.isDarkMode ? '#2E3238' : '#FFFFFF') :
|
|
|
|
|
- 'transparent')
|
|
|
|
|
- .borderRadius(8)
|
|
|
|
|
- .border({
|
|
|
|
|
- width: this.duplicateAction === 'skip' ? 2 : 1,
|
|
|
|
|
- color: this.duplicateAction === 'skip' ?
|
|
|
|
|
- this.themeColor :
|
|
|
|
|
- (this.isDarkMode ? '#19FFFFFF' : '#E5E5EA')
|
|
|
|
|
- })
|
|
|
|
|
- .onClick(() => {
|
|
|
|
|
- this.duplicateAction = 'skip';
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- // 覆盖选项
|
|
|
|
|
- Row({ space: 10 }) {
|
|
|
|
|
- Radio({ value: 'overwrite', group: 'duplicateAction' })
|
|
|
|
|
- .checked(this.duplicateAction === 'overwrite')
|
|
|
|
|
- .radioStyle({
|
|
|
|
|
- checkedBackgroundColor: this.themeColor,
|
|
|
|
|
- uncheckedBorderColor: this.isDarkMode ? '#4D4D4D' : '#C7C7CC'
|
|
|
|
|
- })
|
|
|
|
|
- .onChange((checked: boolean) => {
|
|
|
|
|
- if (checked) {
|
|
|
|
|
- this.duplicateAction = 'overwrite';
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- Column({ space: 2 }) {
|
|
|
|
|
- Text('覆盖')
|
|
|
|
|
- .fontSize(14)
|
|
|
|
|
- .fontWeight(FontWeight.Medium)
|
|
|
|
|
- .fontColor(this.isDarkMode ? '#E5FFFFFF' : '#1F1F1F')
|
|
|
|
|
- Text('替换远程文件')
|
|
|
|
|
- .fontSize(12)
|
|
|
|
|
- .fontColor(this.isDarkMode ? '#66FFFFFF' : '#8E8E93')
|
|
|
|
|
- }
|
|
|
|
|
- .alignItems(HorizontalAlign.Start)
|
|
|
|
|
- .layoutWeight(1)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // SegmentButton 选项
|
|
|
|
|
+ SegmentButton({
|
|
|
|
|
+ options: this.duplicateOptions,
|
|
|
|
|
+ selectedIndexes: $selectedDuplicateIndex
|
|
|
|
|
+ })
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
- .padding(12)
|
|
|
|
|
- .backgroundColor(this.duplicateAction === 'overwrite' ?
|
|
|
|
|
- (this.isDarkMode ? '#2E3238' : '#FFFFFF') :
|
|
|
|
|
- 'transparent')
|
|
|
|
|
- .borderRadius(8)
|
|
|
|
|
- .border({
|
|
|
|
|
- width: this.duplicateAction === 'overwrite' ? 2 : 1,
|
|
|
|
|
- color: this.duplicateAction === 'overwrite' ?
|
|
|
|
|
- this.themeColor :
|
|
|
|
|
- (this.isDarkMode ? '#19FFFFFF' : '#E5E5EA')
|
|
|
|
|
- })
|
|
|
|
|
- .onClick(() => {
|
|
|
|
|
- this.duplicateAction = 'overwrite';
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ .margin({ top: 8 })
|
|
|
|
|
|
|
|
- // 重命名选项
|
|
|
|
|
- Row({ space: 10 }) {
|
|
|
|
|
- Radio({ value: 'rename', group: 'duplicateAction' })
|
|
|
|
|
- .checked(this.duplicateAction === 'rename')
|
|
|
|
|
- .radioStyle({
|
|
|
|
|
- checkedBackgroundColor: this.themeColor,
|
|
|
|
|
- uncheckedBorderColor: this.isDarkMode ? '#4D4D4D' : '#C7C7CC'
|
|
|
|
|
- })
|
|
|
|
|
- .onChange((checked: boolean) => {
|
|
|
|
|
- if (checked) {
|
|
|
|
|
- this.duplicateAction = 'rename';
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- Column({ space: 2 }) {
|
|
|
|
|
- Text('重命名')
|
|
|
|
|
- .fontSize(14)
|
|
|
|
|
- .fontWeight(FontWeight.Medium)
|
|
|
|
|
- .fontColor(this.isDarkMode ? '#E5FFFFFF' : '#1F1F1F')
|
|
|
|
|
- Text('自动重命名后上传')
|
|
|
|
|
- .fontSize(12)
|
|
|
|
|
- .fontColor(this.isDarkMode ? '#66FFFFFF' : '#8E8E93')
|
|
|
|
|
- }
|
|
|
|
|
- .alignItems(HorizontalAlign.Start)
|
|
|
|
|
- .layoutWeight(1)
|
|
|
|
|
- }
|
|
|
|
|
- .width('100%')
|
|
|
|
|
- .padding(12)
|
|
|
|
|
- .backgroundColor(this.duplicateAction === 'rename' ?
|
|
|
|
|
- (this.isDarkMode ? '#2E3238' : '#FFFFFF') :
|
|
|
|
|
- 'transparent')
|
|
|
|
|
- .borderRadius(8)
|
|
|
|
|
- .border({
|
|
|
|
|
- width: this.duplicateAction === 'rename' ? 2 : 1,
|
|
|
|
|
- color: this.duplicateAction === 'rename' ?
|
|
|
|
|
- this.themeColor :
|
|
|
|
|
- (this.isDarkMode ? '#19FFFFFF' : '#E5E5EA')
|
|
|
|
|
- })
|
|
|
|
|
- .onClick(() => {
|
|
|
|
|
- this.duplicateAction = 'rename';
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
- .width('100%')
|
|
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
.padding(14)
|
|
.padding(14)
|
|
@@ -1809,7 +1730,7 @@ export struct UploadMusicPage {
|
|
|
Text('📦')
|
|
Text('📦')
|
|
|
.fontSize(48)
|
|
.fontSize(48)
|
|
|
|
|
|
|
|
- Text('暂无WebDAV账户')
|
|
|
|
|
|
|
+ Text('暂无账户')
|
|
|
.fontSize(16)
|
|
.fontSize(16)
|
|
|
.fontColor(this.isDarkMode ? '#99FFFFFF' : '#99000000')
|
|
.fontColor(this.isDarkMode ? '#99FFFFFF' : '#99000000')
|
|
|
|
|
|
|
@@ -1829,14 +1750,14 @@ export struct UploadMusicPage {
|
|
|
Text('☁️')
|
|
Text('☁️')
|
|
|
.fontSize(24)
|
|
.fontSize(24)
|
|
|
|
|
|
|
|
- Column({ space: 4 }) {
|
|
|
|
|
|
|
+ Column({ space: 3 }) {
|
|
|
Text(account.name)
|
|
Text(account.name)
|
|
|
- .fontSize(16)
|
|
|
|
|
|
|
+ .fontSize(14)
|
|
|
.fontWeight(FontWeight.Medium)
|
|
.fontWeight(FontWeight.Medium)
|
|
|
.fontColor(this.isDarkMode ? '#E5FFFFFF' : '#1F1F1F')
|
|
.fontColor(this.isDarkMode ? '#E5FFFFFF' : '#1F1F1F')
|
|
|
|
|
|
|
|
Text(`${account.host}:${account.port}`)
|
|
Text(`${account.host}:${account.port}`)
|
|
|
- .fontSize(12)
|
|
|
|
|
|
|
+ .fontSize(11)
|
|
|
.fontColor(this.isDarkMode ? '#66FFFFFF' : '#8E8E93')
|
|
.fontColor(this.isDarkMode ? '#66FFFFFF' : '#8E8E93')
|
|
|
}
|
|
}
|
|
|
.alignItems(HorizontalAlign.Start)
|
|
.alignItems(HorizontalAlign.Start)
|
|
@@ -1844,12 +1765,12 @@ export struct UploadMusicPage {
|
|
|
|
|
|
|
|
if (this.selectedAccount && this.selectedAccount.id === account.id) {
|
|
if (this.selectedAccount && this.selectedAccount.id === account.id) {
|
|
|
Text('✓')
|
|
Text('✓')
|
|
|
- .fontSize(24)
|
|
|
|
|
|
|
+ .fontSize(20)
|
|
|
.fontColor(this.themeColor)
|
|
.fontColor(this.themeColor)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
- .padding(14)
|
|
|
|
|
|
|
+ .padding(8)
|
|
|
.backgroundColor(this.selectedAccount && this.selectedAccount.id === account.id
|
|
.backgroundColor(this.selectedAccount && this.selectedAccount.id === account.id
|
|
|
? (this.isDarkMode ? '#2E3238' : '#FFFFFF')
|
|
? (this.isDarkMode ? '#2E3238' : '#FFFFFF')
|
|
|
: (this.isDarkMode ? '#2E3238' : '#F5F7FA'))
|
|
: (this.isDarkMode ? '#2E3238' : '#F5F7FA'))
|
|
@@ -1867,14 +1788,10 @@ export struct UploadMusicPage {
|
|
|
}, (account: WebDavAccount) => `account-${account.id}`)
|
|
}, (account: WebDavAccount) => `account-${account.id}`)
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
- .divider({
|
|
|
|
|
- strokeWidth: 1,
|
|
|
|
|
- color: this.isDarkMode ? '#19FFFFFF' : '#0C000000'
|
|
|
|
|
- })
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
.width('100%')
|
|
.width('100%')
|
|
|
- .padding(16)
|
|
|
|
|
|
|
+ .padding(10)
|
|
|
.backgroundColor(this.isDarkMode ? '#23272E' : '#FFFFFF')
|
|
.backgroundColor(this.isDarkMode ? '#23272E' : '#FFFFFF')
|
|
|
.borderRadius(12)
|
|
.borderRadius(12)
|
|
|
.shadow({
|
|
.shadow({
|
|
@@ -2103,36 +2020,7 @@ export struct UploadMusicPage {
|
|
|
build() {
|
|
build() {
|
|
|
Column() {
|
|
Column() {
|
|
|
// 标题栏
|
|
// 标题栏
|
|
|
- Row({ space: 12 }) {
|
|
|
|
|
- Button({ type: ButtonType.Circle }) {
|
|
|
|
|
- Text('←')
|
|
|
|
|
- .fontSize(24)
|
|
|
|
|
- .fontColor('#FFFFFF')
|
|
|
|
|
- }
|
|
|
|
|
- .width(44)
|
|
|
|
|
- .height(44)
|
|
|
|
|
- .backgroundColor(this.themeColor)
|
|
|
|
|
- .shadow({
|
|
|
|
|
- radius: 8,
|
|
|
|
|
- color: this.themeColor + '40',
|
|
|
|
|
- offsetX: 0,
|
|
|
|
|
- offsetY: 2
|
|
|
|
|
- })
|
|
|
|
|
- .onClick(() => {
|
|
|
|
|
- router.back();
|
|
|
|
|
- })
|
|
|
|
|
-
|
|
|
|
|
- Text('上传音乐到WebDAV')
|
|
|
|
|
- .fontSize(20)
|
|
|
|
|
- .fontWeight(FontWeight.Bold)
|
|
|
|
|
- .fontColor(this.isDarkMode ? '#E5FFFFFF' : '#E5000000')
|
|
|
|
|
- .layoutWeight(1)
|
|
|
|
|
- }
|
|
|
|
|
- .width('100%')
|
|
|
|
|
- .height(56)
|
|
|
|
|
- .padding({ left: 16, right: 16 })
|
|
|
|
|
- .margin({ top: this.topSafeHeight })
|
|
|
|
|
- .backgroundColor(this.isDarkMode ? '#23272E' : '#FFFFFF')
|
|
|
|
|
|
|
+ this.topTitleBar()
|
|
|
|
|
|
|
|
// 页面内容区域
|
|
// 页面内容区域
|
|
|
Scroll() {
|
|
Scroll() {
|
|
@@ -2189,6 +2077,42 @@ export struct UploadMusicPage {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Builder
|
|
|
|
|
+ topTitleBar(){
|
|
|
|
|
+ Column() {
|
|
|
|
|
+ Row({ space: 15 }) {
|
|
|
|
|
+
|
|
|
|
|
+ //左侧滑动按钮
|
|
|
|
|
+ Button({ type: ButtonType.Circle, stateEffect: true }) {
|
|
|
|
|
+ SymbolGlyph($r('sys.symbol.chevron_left'))
|
|
|
|
|
+ .attributeModifier(new SymbolGlyphFancyModifier(25, '', ''))
|
|
|
|
|
+ }
|
|
|
|
|
+ .attributeModifier(new ButtonFancyModifier(40, 40))
|
|
|
|
|
+ .clickEffect({ level: ClickEffectLevel.MIDDLE,scale:0.6 })
|
|
|
|
|
+ .animation({ duration: 300, curve: Curve.Ease })
|
|
|
|
|
+ .onClick(() => {
|
|
|
|
|
+ this.getUIContext().getRouter().back();
|
|
|
|
|
+ })
|
|
|
|
|
+ .attributeModifier(new ShadowModifier())
|
|
|
|
|
+ .zIndex(0)
|
|
|
|
|
+
|
|
|
|
|
+ Text('上传音乐')
|
|
|
|
|
+ .margin({left:3,right:10})
|
|
|
|
|
+ .fontColor($r('app.color.text_color'))
|
|
|
|
|
+ .fontSize(19)
|
|
|
|
|
+ .maxLines(1)
|
|
|
|
|
+ .textOverflow({ overflow: TextOverflow.MARQUEE })//超长滚动
|
|
|
|
|
+ .layoutWeight(1)
|
|
|
|
|
+ .clickEffect({ level: ClickEffectLevel.MIDDLE,scale:0.6 })
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .padding({ top: this.topSafeHeight+10, left: 10, right: 10,bottom:12 })
|
|
|
|
|
+ .width('100%')
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
@Builder
|
|
@Builder
|
|
|
PathBrowserDialogBuilder() {
|
|
PathBrowserDialogBuilder() {
|
|
|
Stack() {
|
|
Stack() {
|