opt password sync, opt ab widgets (#7582)

* Opt sync conctrl with password source, add some comments
* For sync from recent, legacy ab remove forceRelay, rdpPort, rdpUsername,
  because it's not used, personal ab add sync hash
* Opt style of add Id dialog

Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
21pages 2024-04-02 22:08:47 +08:00 committed by GitHub
parent 74af7ef8b2
commit d7b47b49d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 369 additions and 243 deletions

View file

@ -61,7 +61,7 @@ class Peer {
};
}
Map<String, dynamic> toPersonalAbUploadJson(bool includingHash) {
Map<String, dynamic> toCustomJson({required bool includingHash}) {
var res = <String, dynamic>{
"id": id,
"username": username,
@ -76,32 +76,6 @@ class Peer {
return res;
}
Map<String, dynamic> toSharedAbUploadJson(bool includingPassword) {
var res = <String, dynamic>{
"id": id,
"username": username,
"hostname": hostname,
"platform": platform,
"alias": alias,
"tags": tags,
};
if (includingPassword) {
res['password'] = password;
}
return res;
}
Map<String, dynamic> toSharedAbCacheJson() {
return <String, dynamic>{
"id": id,
"username": username,
"hostname": hostname,
"platform": platform,
"alias": alias,
"tags": tags,
};
}
Map<String, dynamic> toGroupCacheJson() {
return <String, dynamic>{
"id": id,