|
|
@@ -248,36 +248,38 @@ export struct RemoteDriveAccountDialog {
|
|
|
.alignItems(VerticalAlign.Center);
|
|
|
// this.buildHelperText('若留空将自动使用协议默认端口')
|
|
|
|
|
|
- if (this.driveType === RemoteDriveType.Smb) {
|
|
|
- // SMB 共享名称
|
|
|
- Row({ space: 8 }) {
|
|
|
- Text('共享名称')
|
|
|
- .fontSize(14)
|
|
|
- .fontColor($r('app.color.index_tab_font_color'));
|
|
|
- TextInput({ placeholder: '共享名称', text: this.shareName })
|
|
|
- .layoutWeight(1)
|
|
|
- .maxLines(1)
|
|
|
- .onChange((value: string) => {
|
|
|
- this.shareName = value;
|
|
|
- });
|
|
|
- }
|
|
|
- .alignItems(VerticalAlign.Center);
|
|
|
- this.buildHelperText('NAS 上共享根目录的名称,例如 music、share')
|
|
|
-
|
|
|
- Row({ space: 8 }) {
|
|
|
- Text('域/工作组')
|
|
|
- .fontSize(14)
|
|
|
- .fontColor($r('app.color.index_tab_font_color'));
|
|
|
- TextInput({ placeholder: '可选项', text: this.domain })
|
|
|
- .layoutWeight(1)
|
|
|
- .maxLines(1)
|
|
|
- .onChange((value: string) => {
|
|
|
- this.domain = value;
|
|
|
- });
|
|
|
- }
|
|
|
- .alignItems(VerticalAlign.Center);
|
|
|
- this.buildHelperText('可选,用于需要域/工作组认证的 SMB 服务器')
|
|
|
- }
|
|
|
+ // if (this.driveType === RemoteDriveType.Smb) {
|
|
|
+ // // SMB 共享名称
|
|
|
+ // Row({ space: 8 }) {
|
|
|
+ // Text('共享名称')
|
|
|
+ // .fontSize(14)
|
|
|
+ // .fontColor($r('app.color.index_tab_font_color'));
|
|
|
+ // TextInput({ placeholder: '共享名称', text: this.shareName })
|
|
|
+ // .layoutWeight(1)
|
|
|
+ // .maxLines(1)
|
|
|
+ // .onChange((value: string) => {
|
|
|
+ // this.shareName = value;
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // .alignItems(VerticalAlign.Center)
|
|
|
+ // .visibility(Visibility.None)
|
|
|
+ // // this.buildHelperText('NAS 上共享根目录的名称,例如 music、share')
|
|
|
+ //
|
|
|
+ // Row({ space: 8 }) {
|
|
|
+ // Text('域/工作组')
|
|
|
+ // .fontSize(14)
|
|
|
+ // .fontColor($r('app.color.index_tab_font_color'));
|
|
|
+ // TextInput({ placeholder: '可选项', text: this.domain })
|
|
|
+ // .layoutWeight(1)
|
|
|
+ // .maxLines(1)
|
|
|
+ // .onChange((value: string) => {
|
|
|
+ // this.domain = value;
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // .alignItems(VerticalAlign.Center)
|
|
|
+ // .visibility(Visibility.None)
|
|
|
+ // // this.buildHelperText('可选,用于需要域/工作组认证的 SMB 服务器')
|
|
|
+ // }
|
|
|
|
|
|
if (this.driveType === RemoteDriveType.Ftp) {
|
|
|
Row({ space: 8 }) {
|
|
|
@@ -295,22 +297,22 @@ export struct RemoteDriveAccountDialog {
|
|
|
this.buildHelperText('若目录或文件名为中文,可根据服务器设置调整编码');
|
|
|
}
|
|
|
|
|
|
- if (this.driveType === RemoteDriveType.Navidrome) {
|
|
|
- Row({ space: 8 }) {
|
|
|
- Text('API路径')
|
|
|
- .fontSize(14)
|
|
|
- .fontColor($r('app.color.index_tab_font_color'));
|
|
|
- TextInput({ placeholder: '/rest', text: this.navidromeBasePath })
|
|
|
- .layoutWeight(1)
|
|
|
- .maxLines(1)
|
|
|
- .onChange((value: string) => {
|
|
|
- this.navidromeBasePath = this.normalizeNavidromeBasePath(value);
|
|
|
- this.navBasePathCustomized = true;
|
|
|
- });
|
|
|
- }
|
|
|
- .alignItems(VerticalAlign.Center);
|
|
|
- this.buildHelperText('Navidrome/Subsonic REST 前缀,默认 /rest,可填 /navidrome/rest 等路径')
|
|
|
- }
|
|
|
+ // if (this.driveType === RemoteDriveType.Navidrome) {
|
|
|
+ // Row({ space: 8 }) {
|
|
|
+ // Text('API路径')
|
|
|
+ // .fontSize(14)
|
|
|
+ // .fontColor($r('app.color.index_tab_font_color'));
|
|
|
+ // TextInput({ placeholder: '/rest', text: this.navidromeBasePath })
|
|
|
+ // .layoutWeight(1)
|
|
|
+ // .maxLines(1)
|
|
|
+ // .onChange((value: string) => {
|
|
|
+ // this.navidromeBasePath = this.normalizeNavidromeBasePath(value);
|
|
|
+ // this.navBasePathCustomized = true;
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // .alignItems(VerticalAlign.Center);
|
|
|
+ // this.buildHelperText('Navidrome/Subsonic REST 前缀,默认 /rest,可填 /navidrome/rest 等路径')
|
|
|
+ // }
|
|
|
|
|
|
// 文件目录
|
|
|
Row({ space: 8 }) {
|
|
|
@@ -324,7 +326,8 @@ export struct RemoteDriveAccountDialog {
|
|
|
this.filepath = value;
|
|
|
});
|
|
|
}
|
|
|
- .alignItems(VerticalAlign.Center);
|
|
|
+ .alignItems(VerticalAlign.Center)
|
|
|
+ .visibility(this.driveType === RemoteDriveType.Navidrome? Visibility.None:Visibility.Visible)
|
|
|
// this.buildHelperText('从共享根开始的路径,例如 /music 或 /音乐/歌单1')
|
|
|
|
|
|
// 用户名
|