diff --git a/flutter/lib/common/hbbs/hbbs.dart b/flutter/lib/common/hbbs/hbbs.dart index 1c28cd992..e189cc7b2 100644 --- a/flutter/lib/common/hbbs/hbbs.dart +++ b/flutter/lib/common/hbbs/hbbs.dart @@ -265,42 +265,3 @@ class AbTag { : name = json['name'] ?? '', color = json['color'] ?? ''; } - -class AbRulePayload { - String guid; - String? user; - String? group; - int rule; - - AbRulePayload( - this.guid, - this.user, - this.group, - this.rule, - ); - - AbRulePayload.fromJson(Map json) - : guid = json['guid'] ?? '', - user = json['user'], - group = json['group'], - rule = json['rule'] ?? 0; - - static String buildName(String? user, String? group) { - if (user != null && group != null) { - return '-'; - } - if (user != null) { - return user; - } - if (group != null) { - return group; - } - return teamName; - } - - String getName() { - return buildName(user, group); - } - - static String teamName = translate('Everyone'); -} diff --git a/flutter/lib/common/widgets/address_book.dart b/flutter/lib/common/widgets/address_book.dart index df3cab2f1..b887b672d 100644 --- a/flutter/lib/common/widgets/address_book.dart +++ b/flutter/lib/common/widgets/address_book.dart @@ -1,6 +1,5 @@ import 'dart:math'; -import 'package:bot_toast/bot_toast.dart'; import 'package:dropdown_button2/dropdown_button2.dart'; import 'package:dynamic_layouts/dynamic_layouts.dart'; import 'package:flutter/material.dart'; @@ -11,7 +10,7 @@ import 'package:flutter_hbb/common/widgets/peers_view.dart'; import 'package:flutter_hbb/desktop/widgets/popup_menu.dart'; import 'package:flutter_hbb/models/ab_model.dart'; import 'package:flutter_hbb/models/platform_model.dart'; -import 'package:flutter_simple_treeview/flutter_simple_treeview.dart'; +import 'package:url_launcher/url_launcher_string.dart'; import '../../desktop/widgets/material_mod_popup_menu.dart' as mod_menu; import 'package:get/get.dart'; import 'package:flex_color_picker/flex_color_picker.dart'; @@ -369,31 +368,21 @@ class _AddressBookState extends State { } void _showMenu(RelativeRect pos) { - final currentProfile = gFFI.abModel.current.sharedProfile(); - final shardFullControl = !gFFI.abModel.current.isPersonal() && - gFFI.abModel.current.fullControl(); - final shared = [ - getEntry(translate('Add shared address book'), - () => createOrUpdateSharedAb(null)), - if (gFFI.abModel.current.fullControl() && - !gFFI.abModel.current.isPersonal()) - getEntry(translate('Update this address book'), - () => createOrUpdateSharedAb(currentProfile)), - if (shardFullControl) - getEntry(translate('Delete this address book'), deleteSharedAb), - if (shardFullControl) - getEntry(translate('Share this address book'), shareAb), - MenuEntryDivider(), - ]; final canWrite = gFFI.abModel.current.canWrite(); final items = [ - if (!gFFI.abModel.legacyMode.value) ...shared, if (canWrite) getEntry(translate("Add ID"), addIdToCurrentAb), if (canWrite) getEntry(translate("Add Tag"), abAddTag), getEntry(translate("Unselect all tags"), gFFI.abModel.unsetSelectedTags), sortMenuItem(), syncMenuItem(), filterMenuItem(), + MenuEntryDivider(), + getEntry(translate("Web Console"), () async { + final url = await bind.mainGetApiServer(); + if (await canLaunchUrlString(url)) { + launchUrlString(url); + } + }), ]; mod_menu.showMenu( @@ -627,201 +616,6 @@ class _AddressBookState extends State { ); }); } - - void createOrUpdateSharedAb(AbProfile? profile) async { - final isAdd = profile == null; - var msg = ""; - var isInProgress = false; - final style = TextStyle(fontSize: 14.0); - double marginBottom = 4; - TextEditingController nameController = - TextEditingController(text: profile?.name ?? ''); - TextEditingController noteController = - TextEditingController(text: profile?.note ?? ''); - - gFFI.dialogManager.show((setState, close, context) { - submit() async { - final name = nameController.text.trim(); - if (isAdd && name.isEmpty) { - // pass - } else { - final note = noteController.text.trim(); - setState(() { - msg = ""; - isInProgress = true; - }); - final oldName = profile?.name; - final errMsg = (profile == null - ? await gFFI.abModel.addSharedAb(name, note) - : await gFFI.abModel.updateSharedAb(profile.guid, name, note)); - if (errMsg.isNotEmpty) { - setState(() { - msg = errMsg; - isInProgress = false; - }); - return; - } - await gFFI.abModel.pullAb(); - if (gFFI.abModel.addressBookNames().contains(name)) { - gFFI.abModel.setCurrentName(name); - } - // workaround for showing empty peers - if (oldName != null && oldName != name) { - Future.delayed(Duration.zero, () async { - await gFFI.abModel.pullAb(); - }); - } - } - close(); - } - - return CustomAlertDialog( - title: Text(translate(isAdd ? 'Add shared address book' : 'Update')), - content: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Align( - alignment: Alignment.centerLeft, - child: Row( - children: [ - Text( - '*', - style: TextStyle(color: Colors.red, fontSize: 14), - ), - Text( - translate('Name'), - style: style, - ), - ], - ), - ).marginOnly(bottom: marginBottom), - Row( - children: [ - Expanded( - child: TextField( - maxLines: null, - decoration: InputDecoration( - errorText: msg.isEmpty ? null : translate(msg), - errorMaxLines: 3, - ), - controller: nameController, - autofocus: true, - ), - ), - ], - ), - const SizedBox( - height: 4.0, - ), - Align( - alignment: Alignment.centerLeft, - child: Text( - translate('Note'), - style: style, - ), - ).marginOnly(top: 8, bottom: marginBottom), - TextField( - controller: noteController, - maxLength: 100, - ), - const SizedBox( - height: 4.0, - ), - // NOT use Offstage to wrap LinearProgressIndicator - if (isInProgress) const LinearProgressIndicator(), - ], - ), - actions: [ - dialogButton("Cancel", onPressed: close, isOutline: true), - dialogButton("OK", onPressed: submit), - ], - onSubmit: submit, - onCancel: close, - ); - }); - } - - void deleteSharedAb() async { - RxBool isInProgress = false.obs; - - String currentName = gFFI.abModel.currentName.value; - gFFI.dialogManager.show((setState, close, context) { - submit() async { - isInProgress.value = true; - String errMsg = await gFFI.abModel.deleteSharedAb(currentName); - close(); - isInProgress.value = false; - if (errMsg.isEmpty) { - showToast(translate('Successful')); - } else { - BotToast.showText(contentColor: Colors.red, text: translate(errMsg)); - } - gFFI.abModel.pullAb(); - } - - cancel() { - close(); - } - - return CustomAlertDialog( - content: Obx(() => Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - Text(translate( - 'Are you sure you want to delete address book {$currentName}?')), - // NOT use Offstage to wrap LinearProgressIndicator - isInProgress.value - ? const LinearProgressIndicator() - : Offstage() - ], - )), - actions: [ - dialogButton( - "Cancel", - icon: Icon(Icons.close_rounded), - onPressed: cancel, - isOutline: true, - ), - dialogButton( - "OK", - icon: Icon(Icons.done_rounded), - onPressed: submit, - ), - ], - onSubmit: submit, - onCancel: cancel, - ); - }); - } - - void shareAb() async { - gFFI.dialogManager.show((setState, close, context) { - return CustomAlertDialog( - content: _RuleTree(), - actions: [ - Row(children: [ - Icon(Icons.info, color: MyTheme.accent, size: 20) - .marginSymmetric(horizontal: isDesktop ? 10 : 5), - Expanded( - child: Text( - translate('permission_priority_tip'), - style: TextStyle(fontSize: 12), - textAlign: TextAlign.left, - ), - ) - ]), - dialogButton( - "Close", - icon: Icon(Icons.close_rounded), - onPressed: close, - isOutline: true, - ), - ], - onCancel: close, - onSubmit: close, - ); - }); - } } class AddressBookTag extends StatelessWidget { @@ -969,405 +763,3 @@ MenuEntryButton getEntry(String title, VoidCallback proc) { dismissOnClicked: true, ); } - -class _RuleTree extends StatefulWidget { - const _RuleTree(); - - @override - State<_RuleTree> createState() => __RuleTreeState(); -} - -class __RuleTreeState extends State<_RuleTree> { - final TreeController _controller = TreeController(allNodesExpanded: true); - bool mapFetched = false; - Map> map = Map.fromEntries([]); - List rules = []; - bool isInProgress = false; - double totalWidth = isDesktop ? 400.0 : 180.0; - double col1Width = isDesktop ? 300.0 : 100.0; - double col2Width = 30.0; - double indent = isDesktop ? 40.0 : 12.0; - double iconSize = isDesktop ? 24.0 : 12.0; - double iconButtonSize = 24.0; - bool onlyShowExisting = false; - String searchText = ''; - TextStyle? textStyle = isDesktop ? null : TextStyle(fontSize: 12); - - @override - void initState() { - super.initState(); - onlyShowExisting = - bind.getLocalFlutterOption(k: 'only-show-existing-rules') == 'Y'; - refresh(); - } - - void refresh() async { - setState(() { - isInProgress = true; - }); - if (!mapFetched) { - map = await gFFI.abModel.getNamesTree(); - mapFetched = true; - } - final allRules = await gFFI.abModel.getAllRules(); - setState(() { - isInProgress = false; - rules = allRules; - }); - } - - bool match(String name) { - return searchText.isEmpty || - name.toLowerCase().contains(searchText.toLowerCase()); - } - - List getNodes() { - int keyIndex = 0; - List buildUserNodes(List users) { - List userNodes = []; - for (var user in users) { - if (!match(user)) { - continue; - } - final userRuleIndex = rules.indexWhere((e) => e.user == user); - if (userRuleIndex < 0) { - if (!onlyShowExisting) { - userNodes.add(TreeNode( - content: - _buildEmptyNodeContent(user, null, totalWidth, indent * 2), - key: ValueKey(keyIndex++), - children: [])); - } - } else { - final userRule = rules[userRuleIndex]; - userNodes.add(TreeNode( - content: _buildRuleNodeContent(userRule, totalWidth, indent * 2), - key: ValueKey(keyIndex++), - children: [])); - } - } - return userNodes; - } - - List groupNodes = []; - map.forEach((group, users) { - final groupRuleIndex = rules.indexWhere((e) => e.group == group); - final children = buildUserNodes(users); - if (!match(group) && children.isEmpty) { - return; - } - if (groupRuleIndex < 0) { - if (!onlyShowExisting || children.isNotEmpty) { - groupNodes.add(TreeNode( - content: _buildEmptyNodeContent(null, group, totalWidth, indent), - key: ValueKey(keyIndex++), - children: children)); - } - } else { - final groupRule = rules[groupRuleIndex]; - groupNodes.add(TreeNode( - content: _buildRuleNodeContent(groupRule, totalWidth, indent), - key: ValueKey(keyIndex++), - children: buildUserNodes(users))); - } - }); - - List totalNodes = []; - final teamRuleIndex = - rules.indexWhere((e) => e.user == null && e.group == null); - if (!match(AbRulePayload.teamName) && groupNodes.isEmpty) { - return []; - } - if (teamRuleIndex < 0) { - if (!onlyShowExisting || groupNodes.isNotEmpty) { - totalNodes.add(TreeNode( - content: _buildEmptyNodeContent(null, null, totalWidth, 0), - key: ValueKey(keyIndex++), - children: groupNodes)); - } - } else { - final rule = rules[teamRuleIndex]; - totalNodes.add(TreeNode( - content: _buildRuleNodeContent( - AbRulePayload(rule.guid, null, null, rule.rule), totalWidth, 0), - key: ValueKey(keyIndex++), - children: groupNodes)); - } - return totalNodes; - } - - @override - Widget build(BuildContext context) { - Widget switchWidget = Switch( - value: onlyShowExisting, - onChanged: (v) { - setState(() { - onlyShowExisting = v; - bind.setLocalFlutterOption( - k: 'only-show-existing-rules', v: v ? 'Y' : ''); - }); - }); - Widget switchLabel = - _text(translate('Only show existing')).marginOnly(right: 20); - Widget searchTextField = TextField( - decoration: InputDecoration( - hintText: translate('Search'), - contentPadding: const EdgeInsets.symmetric(horizontal: 6), - border: OutlineInputBorder( - borderRadius: BorderRadius.circular(10.0), - ), - prefixIcon: Icon(Icons.search), - filled: true, - ), - onChanged: (v) { - setState(() { - searchText = v; - }); - }, - ).marginSymmetric(horizontal: 10); - return Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - if (isDesktop) - Row( - children: [ - switchWidget, - Expanded(child: switchLabel), - Expanded(child: searchTextField), - ], - ), - if (!isDesktop) - Row( - children: [ - switchWidget, - Expanded(child: switchLabel), - ], - ), - if (!isDesktop) searchTextField, - // NOT use Offstage to wrap LinearProgressIndicator - isInProgress ? const LinearProgressIndicator() : Offstage(), - SingleChildScrollView( - scrollDirection: Axis.vertical, - child: SingleChildScrollView( - scrollDirection: Axis.horizontal, - child: TreeView( - treeController: _controller, - indent: indent, - iconSize: iconSize, - nodes: getNodes(), - ), - ), - ), - ], - ); - } - - Widget _buildEmptyNodeContent( - String? user, String? group, double totalWidth, double indent) { - String name = AbRulePayload.buildName(user, group); - return SizedBox( - width: totalWidth - indent, - child: Row( - children: [ - SizedBox(width: col1Width - indent, child: _text(name)), - SizedBox(width: col2Width), - const Spacer(), - if (!onlyShowExisting) - _iconButton( - icon: const Icon(Icons.add, color: MyTheme.accent), - onPressed: () { - onSubmit(int rule) async { - if (ShareRule.fromValue(rule) == null) { - BotToast.showText( - contentColor: Colors.red, text: "Invalid rule: $rule"); - return; - } - setState(() { - isInProgress = true; - }); - final errMsg = await gFFI.abModel.addRule(user, group, rule); - setState(() { - isInProgress = false; - }); - if (errMsg != null) { - BotToast.showText(contentColor: Colors.red, text: errMsg); - } else { - refresh(); - } - } - - _addOrUpdateRuleDialog(onSubmit, ShareRule.read.value, null); - }, - ) - ], - ), - ); - } - - Widget _buildRuleNodeContent( - AbRulePayload rule, double totalWidth, double indent) { - return SizedBox( - width: totalWidth - indent, - child: Row( - children: [ - SizedBox(width: col1Width - indent, child: _text(rule.getName())), - SizedBox( - width: col2Width, child: _text(ShareRule.shortDesc(rule.rule))), - const Spacer(), - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - _iconButton( - icon: const Icon(Icons.edit, color: MyTheme.accent), - onPressed: () { - onSubmit(int v) async { - setState(() { - isInProgress = true; - }); - final errMsg = await gFFI.abModel.updateRule(rule.guid, v); - setState(() { - isInProgress = false; - }); - if (errMsg != null) { - BotToast.showText(contentColor: Colors.red, text: errMsg); - } else { - refresh(); - } - } - - if (ShareRule.fromValue(rule.rule) == null) { - BotToast.showText( - contentColor: Colors.red, - text: "Invalid rule: ${rule.rule}"); - return; - } - _addOrUpdateRuleDialog(onSubmit, rule.rule, rule.getName()); - }, - ), - _iconButton( - icon: const Icon(Icons.delete, color: Colors.red), - onPressed: () async { - onSubmit() async { - setState(() { - isInProgress = true; - }); - final errMsg = await gFFI.abModel.deleteRules([rule.guid]); - setState(() { - isInProgress = false; - }); - if (errMsg != null) { - BotToast.showText(contentColor: Colors.red, text: errMsg); - } else { - refresh(); - } - } - - deleteConfirmDialog(onSubmit, translate('Confirm Delete')); - }, - ), - ], - ) - ], - ), - ); - } - - Widget _iconButton({required Widget icon, required VoidCallback? onPressed}) { - return GestureDetector( - child: - SizedBox(width: iconButtonSize, height: iconButtonSize, child: icon), - onTap: onPressed, - ); - } - - Text _text(String text) { - return Text(text, style: textStyle); - } -} - -void _addOrUpdateRuleDialog( - Future Function(int) onSubmit, int initialRule, String? name) async { - bool isAdd = name == null; - var currentRule = initialRule; - gFFI.dialogManager.show( - (setState, close, context) { - submit() async { - if (ShareRule.fromValue(currentRule) != null) { - onSubmit(currentRule); - } - close(); - } - - final keys = [ - ShareRule.read.value, - ShareRule.readWrite.value, - ShareRule.fullControl.value, - ]; - TextEditingController controller = TextEditingController(); - return CustomAlertDialog( - contentBoxConstraints: BoxConstraints(maxWidth: 300), - title: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Expanded( - child: Text( - '${translate(isAdd ? "Add" : "Update")}${name != null ? " $name" : ""}', - overflow: TextOverflow.ellipsis) - .paddingOnly( - left: 10, - ), - ), - ], - ), - content: Column( - crossAxisAlignment: CrossAxisAlignment.center, - children: [ - DropdownMenu( - initialSelection: initialRule, - onSelected: (value) { - if (value != null) { - setState(() { - currentRule = value; - }); - } - }, - dropdownMenuEntries: keys - .map((e) => - DropdownMenuEntry(value: e, label: ShareRule.desc(e))) - .toList(), - inputDecorationTheme: InputDecorationTheme( - isDense: true, border: UnderlineInputBorder()), - enableFilter: false, - controller: controller, - ), - if (currentRule == ShareRule.fullControl.value) - Row( - children: [ - Icon(Icons.warning_amber, color: Colors.amber) - .marginOnly(right: 10), - Flexible( - child: Text(translate('full_control_tip'), - style: TextStyle(fontSize: 12))), - ], - ).marginSymmetric(vertical: 10), - ], - ), - actions: [ - dialogButton( - "Cancel", - icon: Icon(Icons.close_rounded), - onPressed: close, - isOutline: true, - ), - dialogButton( - "OK", - icon: Icon(Icons.done_rounded), - onPressed: submit, - ), - ], - onSubmit: submit, - onCancel: close, - ); - }, - ); -} diff --git a/flutter/lib/models/ab_model.dart b/flutter/lib/models/ab_model.dart index ffb825067..4acabcc8e 100644 --- a/flutter/lib/models/ab_model.dart +++ b/flutter/lib/models/ab_model.dart @@ -263,71 +263,6 @@ class AbModel { return false; } - Future addSharedAb(String name, String note) async { - try { - if (addressbooks.containsKey(name)) { - return '$name already exists'; - } - final api = "${await bind.mainGetApiServer()}/api/ab/shared/add"; - var headers = getHttpHeaders(); - headers['Content-Type'] = "application/json"; - var v = { - 'name': name, - }; - if (note.isNotEmpty) { - v['note'] = note; - } - final body = jsonEncode(v); - final resp = - await http.post(Uri.parse(api), headers: headers, body: body); - final errMsg = _jsonDecodeActionResp(resp); - return errMsg; - } catch (e) { - return e.toString(); - } - } - - Future updateSharedAb(String guid, String name, String note) async { - try { - final api = - "${await bind.mainGetApiServer()}/api/ab/shared/update/profile"; - var headers = getHttpHeaders(); - headers['Content-Type'] = "application/json"; - var v = { - 'guid': guid, - 'name': name, - }; - if (note.isNotEmpty) { - v['note'] = note; - } - final body = jsonEncode(v); - final resp = await http.put(Uri.parse(api), headers: headers, body: body); - final errMsg = _jsonDecodeActionResp(resp); - return errMsg; - } catch (e) { - return e.toString(); - } - } - - Future deleteSharedAb(String name) async { - try { - final guid = abProfiles.firstWhereOrNull((e) => e.name == name)?.guid; - if (guid == null) { - return '$name not found'; - } - final api = "${await bind.mainGetApiServer()}/api/ab/shared"; - var headers = getHttpHeaders(); - headers['Content-Type'] = "application/json"; - final body = jsonEncode([guid]); - final resp = - await http.delete(Uri.parse(api), headers: headers, body: body); - final errMsg = _jsonDecodeActionResp(resp); - return errMsg; - } catch (e) { - return e.toString(); - } - } - // #endregion // #region rule @@ -341,173 +276,6 @@ class AbModel { return list; } - Future> getAllRules() async { - try { - List res = []; - final abGuid = current.sharedProfile()?.guid; - if (abGuid == null) { - return res; - } - final api = "${await bind.mainGetApiServer()}/api/ab/rules"; - var uri0 = Uri.parse(api); - var headers = getHttpHeaders(); - headers['Content-Type'] = "application/json"; - final pageSize = 100; - var total = 0; - int currentPage = 0; - do { - currentPage += 1; - var uri = Uri( - scheme: uri0.scheme, - host: uri0.host, - path: uri0.path, - port: uri0.port, - queryParameters: { - 'current': currentPage.toString(), - 'pageSize': pageSize.toString(), - 'ab': abGuid, - }); - final resp = await http.post(uri, headers: headers); - Map json = - _jsonDecodeRespMap(utf8.decode(resp.bodyBytes), resp.statusCode); - if (resp.statusCode == 404) { - debugPrint( - "HTTP 404, api server doesn't support shared address book"); - return res; - } - if (json.containsKey('error')) { - throw json['error']; - } - - if (resp.statusCode != 200) { - throw 'HTTP ${resp.statusCode}'; - } - if (json.containsKey('total')) { - if (total == 0) total = json['total']; - if (json.containsKey('data')) { - final data = json['data']; - if (data is List) { - for (final d in data) { - final t = AbRulePayload.fromJson(d); - res.add(t); - } - } - } - } - } while (currentPage * pageSize < total); - return res; - } catch (err) { - debugPrint('get all rules err: ${err.toString()}'); - } - return []; - } - - Future addRule(String? user, String? group, int rule) async { - try { - final abGuid = current.sharedProfile()?.guid; - if (abGuid == null) { - return "shared profile not found"; - } - final api = "${await bind.mainGetApiServer()}/api/ab/rule"; - var headers = getHttpHeaders(); - headers['Content-Type'] = "application/json"; - final body = jsonEncode({ - 'guid': abGuid, - 'user': user, - 'group': group, - 'rule': rule, - }); - final resp = - await http.post(Uri.parse(api), headers: headers, body: body); - final errMsg = _jsonDecodeActionResp(resp); - if (errMsg.isNotEmpty) { - return errMsg; - } - return null; - } catch (err) { - return err.toString(); - } - } - - Future updateRule(String ruleGuid, int rule) async { - try { - final abGuid = current.sharedProfile()?.guid; - if (abGuid == null) { - return "shared profile not found"; - } - final api = "${await bind.mainGetApiServer()}/api/ab/rule"; - var headers = getHttpHeaders(); - headers['Content-Type'] = "application/json"; - final body = jsonEncode({ - 'guid': ruleGuid, - 'rule': rule, - }); - final resp = - await http.patch(Uri.parse(api), headers: headers, body: body); - final errMsg = _jsonDecodeActionResp(resp); - if (errMsg.isNotEmpty) { - return errMsg; - } - return null; - } catch (err) { - return err.toString(); - } - } - - Future deleteRules(List ruleGuids) async { - try { - final abGuid = current.sharedProfile()?.guid; - if (abGuid == null) { - return "shared profile not found"; - } - final api = "${await bind.mainGetApiServer()}/api/ab/rules"; - var headers = getHttpHeaders(); - headers['Content-Type'] = "application/json"; - final body = jsonEncode(ruleGuids); - final resp = - await http.delete(Uri.parse(api), headers: headers, body: body); - final errMsg = _jsonDecodeActionResp(resp); - if (errMsg.isNotEmpty) { - return errMsg; - } - return null; - } catch (err) { - return err.toString(); - } - } - - Future>> getNamesTree() async { - Map> res = Map.fromEntries([]); - try { - final abGuid = current.sharedProfile()?.guid; - if (abGuid == null) { - return res; - } - final api = "${await bind.mainGetApiServer()}/api/ab/rule/tree/$abGuid"; - var headers = getHttpHeaders(); - headers['Content-Type'] = "application/json"; - final resp = await http.post(Uri.parse(api), headers: headers); - if (resp.statusCode == 404) { - debugPrint("HTTP 404, api server doesn't support shared address book"); - return res; - } - Map json = - _jsonDecodeRespMap(utf8.decode(resp.bodyBytes), resp.statusCode); - if (resp.statusCode != 200) { - throw 'HTTP ${resp.statusCode}'; - } - json.forEach((key, value) { - if (value is List) { - res[key] = value.map((e) => e.toString()).toList(); - } - }); - return res; - } catch (err) { - debugPrint('get name tree err: ${err.toString()}'); - } - return res; - } - // #endregion // #region peer diff --git a/flutter/pubspec.lock b/flutter/pubspec.lock index e602e11e8..68210ed79 100644 --- a/flutter/pubspec.lock +++ b/flutter/pubspec.lock @@ -616,14 +616,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.80.1" - flutter_simple_treeview: - dependency: "direct main" - description: - name: flutter_simple_treeview - sha256: ad4978d2668dd078d3a09966832da111bef9102dd636e572c50c80133b7ff4d9 - url: "https://pub.dev" - source: hosted - version: "3.0.2" flutter_svg: dependency: "direct main" description: diff --git a/flutter/pubspec.yaml b/flutter/pubspec.yaml index 487f3a232..0ec497700 100644 --- a/flutter/pubspec.yaml +++ b/flutter/pubspec.yaml @@ -104,7 +104,6 @@ dependencies: pull_down_button: ^0.9.3 device_info_plus: ^9.1.0 qr_flutter: ^4.1.0 - flutter_simple_treeview: ^3.0.2 dev_dependencies: icons_launcher: ^2.0.4 diff --git a/src/lang/ar.rs b/src/lang/ar.rs index a73a9c8cf..aadab0f9b 100644 --- a/src/lang/ar.rs +++ b/src/lang/ar.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/bg.rs b/src/lang/bg.rs index 07c9fcf62..2e986f1b1 100644 --- a/src/lang/bg.rs +++ b/src/lang/bg.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ca.rs b/src/lang/ca.rs index 86603eb5b..0247a1b81 100644 --- a/src/lang/ca.rs +++ b/src/lang/ca.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/cn.rs b/src/lang/cn.rs index 1c4af2ed8..d59858eac 100644 --- a/src/lang/cn.rs +++ b/src/lang/cn.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", "当前版本的软件是定制版本。\n您可以连接至其他设备,但是其他设备无法连接至您的设备。"), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", "添加共享地址簿"), - ("Update this address book", "更新此地址簿"), - ("Delete this address book", "删除此地址簿"), - ("Share this address book", "共享此地址簿"), - ("Are you sure you want to delete address book {}?", "确定要删除地址簿{}吗?"), ("My address book", "我的地址簿"), ("Personal", "个人的"), ("Owner", "所有者"), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", "只读"), ("Read/Write", "读写"), ("Full Control", "完全控制"), - ("full_control_tip", "完全控制赋予其他人与地址簿所有者相同的权限。"), ("share_warning_tip", "上述字段是共享的并且对其他人可见。"), - ("Only show existing", "只显示存在的"), ("Everyone", "所有人"), - ("permission_priority_tip", "优先级:用户>组>所有人"), + ("Web Console", "Web控制台"), ].iter().cloned().collect(); } diff --git a/src/lang/cs.rs b/src/lang/cs.rs index 21088a509..e8bb6dcd8 100644 --- a/src/lang/cs.rs +++ b/src/lang/cs.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", "Toto je přizpůsobená edice.\nMůžete se připojit k jiným zařízením, ale jiná zařízení se k vašemu zařízení připojit nemohou."), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/da.rs b/src/lang/da.rs index e36ddd774..b6149d2e0 100644 --- a/src/lang/da.rs +++ b/src/lang/da.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/de.rs b/src/lang/de.rs index 39164042a..46be9724e 100644 --- a/src/lang/de.rs +++ b/src/lang/de.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", "Dies ist eine benutzerdefinierte Ausgabe von RustDesk.\nSie können eine Verbindung zu anderen Geräten herstellen, aber andere Geräte können keine Verbindung zu Ihrem Gerät herstellen."), ("preset_password_warning", "Dies ist eine benutzerdefinierte Ausgabe von RustDesk mit einem voreingestellten Passwort. Jeder, der dieses Passwort kennt, kann vollen Zugriff auf dieses Gerät erlangen. Wenn Sie dies nicht beabsichtigen, installieren Sie diese Software bitte umgehend."), ("Security Alert", "Sicherheits-Warnung"), - ("Add shared address book", "Neues geteiltes Adressbuch hinzufügen"), - ("Update this address book", "Dieses Adressbuch ändern"), - ("Delete this address book", "Dieses Adressbuch löschen"), - ("Share this address book", "Dieses Adressbuch teilen"), - ("Are you sure you want to delete address book {}?", "Sind Sie sicher, dass Sie das Adressbuch {} löschen möchten?"), ("My address book", "Mein Adressbuch"), ("Personal", "Persönlich"), ("Owner", "Eigentümer"), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", "Nur lesen"), ("Read/Write", "Lesen/Schreiben"), ("Full Control", "Voller Zugriff"), - ("full_control_tip", "Voller Zugriff gibt anderen Benutzern die gleichen Berechtigungen wie der Adressbuch-Besitzer."), ("share_warning_tip", "Die obigen Felder sind geteilt und sichtbar für andere."), - ("Only show existing", "Nur existierende anzeigen"), ("Everyone", "Jeder"), - ("permission_priority_tip", "Priorität: Benutzer > Gruppe > Jeder"), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/el.rs b/src/lang/el.rs index ccb369092..aba3efc30 100644 --- a/src/lang/el.rs +++ b/src/lang/el.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/en.rs b/src/lang/en.rs index 5f7997ca2..f1e971039 100644 --- a/src/lang/en.rs +++ b/src/lang/en.rs @@ -216,8 +216,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("powered_by_me", "Powered by RustDesk"), ("outgoing_only_desk_tip", "This is a customized edition.\nYou can connect to other devices, but other devices cannot connect to your device."), ("preset_password_warning", "This customized edition comes with a preset password. Anyone knowing this password could gain full control of your device. If you did not expect this, uninstall the software immediately."), - ("full_control_tip", "Full Control gives others the same permissions as the address book owner."), ("share_warning_tip", "The fields above are shared and visible to others."), - ("permission_priority_tip", "Priority: User > Group > Everyone") ].iter().cloned().collect(); } diff --git a/src/lang/eo.rs b/src/lang/eo.rs index 35501eeea..b83cf03ef 100644 --- a/src/lang/eo.rs +++ b/src/lang/eo.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/es.rs b/src/lang/es.rs index c2206b264..55bb0fc4e 100644 --- a/src/lang/es.rs +++ b/src/lang/es.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/et.rs b/src/lang/et.rs index df9359594..cd5aeea0a 100644 --- a/src/lang/et.rs +++ b/src/lang/et.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/fa.rs b/src/lang/fa.rs index 08984a39a..227275659 100644 --- a/src/lang/fa.rs +++ b/src/lang/fa.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/fr.rs b/src/lang/fr.rs index 55f755168..cfc56f397 100644 --- a/src/lang/fr.rs +++ b/src/lang/fr.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/he.rs b/src/lang/he.rs index e5780f434..1dd3cb4e2 100644 --- a/src/lang/he.rs +++ b/src/lang/he.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", "זוהי מהדורה מותאמת אישית.\nניתן להתחבר למכשירים אחרים, אך מכשירים אחרים לא יכולים להתחבר אליך."), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/hu.rs b/src/lang/hu.rs index 8b97f2b0f..c53a39330 100644 --- a/src/lang/hu.rs +++ b/src/lang/hu.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/id.rs b/src/lang/id.rs index fd4a48e71..6658decc0 100644 --- a/src/lang/id.rs +++ b/src/lang/id.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/it.rs b/src/lang/it.rs index 856a83a96..95bb3af5d 100644 --- a/src/lang/it.rs +++ b/src/lang/it.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", "Questa è un'edizione personalizzata.\nPuoi connetterti ad altri dispositivi, ma gli altri dispositivi non possono connettersi a questo dispositivo."), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ja.rs b/src/lang/ja.rs index 60603f651..1c64e5a56 100644 --- a/src/lang/ja.rs +++ b/src/lang/ja.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ko.rs b/src/lang/ko.rs index d98bb7f3a..59c3f4f54 100644 --- a/src/lang/ko.rs +++ b/src/lang/ko.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", "이것은 맞춤형 버전입니다.\n다른 장치에 연결할 수 있지만 다른 장치는 귀하의 장치에 연결할 수 없습니다."), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/kz.rs b/src/lang/kz.rs index dfcc505f7..887dff41c 100644 --- a/src/lang/kz.rs +++ b/src/lang/kz.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/lt.rs b/src/lang/lt.rs index 3b97ef22d..70ae7d86d 100644 --- a/src/lang/lt.rs +++ b/src/lang/lt.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/lv.rs b/src/lang/lv.rs index 10b583892..426491329 100644 --- a/src/lang/lv.rs +++ b/src/lang/lv.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", "Šis ir pielāgots izdevums.\nVarat izveidot savienojumu ar citām ierīcēm, taču citas ierīces nevar izveidot savienojumu ar jūsu ierīci."), ("preset_password_warning", "Šim pielāgotajam izdevumam ir iepriekš iestatīta parole. Ikviens, kurš zina šo paroli, var pilnībā kontrolēt jūsu ierīci. Ja jūs to negaidījāt, nekavējoties atinstalējiet programmatūru."), ("Security Alert", "Drošības brīdinājums"), - ("Add shared address book", "Pievienot koplietotu adrešu grāmatu"), - ("Update this address book", "Atjaunināt šo adrešu grāmatu"), - ("Delete this address book", "Dzēst šo adrešu grāmatu"), - ("Share this address book", "Kopīgot šo adrešu grāmatu"), - ("Are you sure you want to delete address book {}?", "Vai tiešām vēlaties dzēst adrešu grāmatu {}?"), ("My address book", "Mana adrešu grāmata"), ("Personal", "Personīga"), ("Owner", "Īpašnieks"), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", "Tikai lasīt"), ("Read/Write", "Lasīt/Rakstīt"), ("Full Control", "Pilnīga kontrole"), - ("full_control_tip", "Pilnīga kontrole citiem piešķir tādas pašas atļaujas kā adrešu grāmatas īpašniekam."), ("share_warning_tip", "Iepriekš minētie lauki ir koplietoti un redzami citiem."), - ("Only show existing", "Rādīt tikai esošos"), ("Everyone", "Visi"), - ("permission_priority_tip", "Prioritāte: Lietotājs > Grupa > Visi"), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/nb.rs b/src/lang/nb.rs index 8dd09e3ff..aa669668f 100644 --- a/src/lang/nb.rs +++ b/src/lang/nb.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/nl.rs b/src/lang/nl.rs index 4a6f3c39c..b85dfb47f 100644 --- a/src/lang/nl.rs +++ b/src/lang/nl.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", "Je kan verbinding maken met andere apparaten, maar andere apparaten kunnen geen verbinding maken met dit apparaat."), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/pl.rs b/src/lang/pl.rs index 008a0e72c..2e4014386 100644 --- a/src/lang/pl.rs +++ b/src/lang/pl.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/pt_PT.rs b/src/lang/pt_PT.rs index 4d9051b96..f22162d2a 100644 --- a/src/lang/pt_PT.rs +++ b/src/lang/pt_PT.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ptbr.rs b/src/lang/ptbr.rs index a402e93e8..a920bc09b 100644 --- a/src/lang/ptbr.rs +++ b/src/lang/ptbr.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ro.rs b/src/lang/ro.rs index 9eff2f144..3312b226b 100644 --- a/src/lang/ro.rs +++ b/src/lang/ro.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ru.rs b/src/lang/ru.rs index a31a11920..918e4a094 100644 --- a/src/lang/ru.rs +++ b/src/lang/ru.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", "Это специализированная версия.\nВы можете подключаться к другим устройствам, но другие устройства не могут подключиться к вашему."), ("preset_password_warning", "Это специализированная версия с предустановленным паролем. Любой, кто знает этот пароль, может получить полный контроль над вашим устройством. Если это для вас неожиданно, немедленно удалите данное программное обеспечение."), ("Security Alert", "Предупреждение о безопасности"), - ("Add shared address book", "Добавить общую адресную книгу"), - ("Update this address book", "Обновить эту адресную книгу"), - ("Delete this address book", "Удалить эту адресную книгу"), - ("Share this address book", "Сделать эту адресную книгу общей"), - ("Are you sure you want to delete address book {}?", "Удалить адресную книгу {}?"), ("My address book", "Моя адресная книга"), ("Personal", "Личная"), ("Owner", "Владелец"), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", "Только чтение"), ("Read/Write", "Чтение и запись"), ("Full Control", "Полный доступ"), - ("full_control_tip", "Полный доступ предоставляет другим пользователям те же права, что и владельцу адресной книги."), ("share_warning_tip", "Поля выше являются общими и видны другим."), - ("Only show existing", "Показывать только существующие"), ("Everyone", "Все"), - ("permission_priority_tip", "Приоритет: пользователь > группа > все"), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sk.rs b/src/lang/sk.rs index 856dc6ac6..67c33051c 100644 --- a/src/lang/sk.rs +++ b/src/lang/sk.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", "Toto je prispôsobené vydanie.\nMôžete sa pripojiť k iným zariadeniam, ale iné zariadenia sa k vášmu zariadeniu pripojiť nemôžu."), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sl.rs b/src/lang/sl.rs index 779f6d97d..0b2c24536 100755 --- a/src/lang/sl.rs +++ b/src/lang/sl.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sq.rs b/src/lang/sq.rs index e79811a51..b85918fe6 100644 --- a/src/lang/sq.rs +++ b/src/lang/sq.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sr.rs b/src/lang/sr.rs index cb747ceb0..d6db0d69b 100644 --- a/src/lang/sr.rs +++ b/src/lang/sr.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/sv.rs b/src/lang/sv.rs index 5929c088a..2de36258e 100644 --- a/src/lang/sv.rs +++ b/src/lang/sv.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/template.rs b/src/lang/template.rs index 4a3e59817..157681c2c 100644 --- a/src/lang/template.rs +++ b/src/lang/template.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/th.rs b/src/lang/th.rs index 287aa66d9..dd9c69444 100644 --- a/src/lang/th.rs +++ b/src/lang/th.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/tr.rs b/src/lang/tr.rs index 42a609750..c03da8d67 100644 --- a/src/lang/tr.rs +++ b/src/lang/tr.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/tw.rs b/src/lang/tw.rs index 49fdc774e..79a47d362 100644 --- a/src/lang/tw.rs +++ b/src/lang/tw.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", "目前版本的軟體是自定義版本。\n您可以連接至其他設備,但是其他設備無法連接至您的設備。"), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/ua.rs b/src/lang/ua.rs index 37c20867f..a938cd03a 100644 --- a/src/lang/ua.rs +++ b/src/lang/ua.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); } diff --git a/src/lang/vn.rs b/src/lang/vn.rs index 528aeecbf..276348978 100644 --- a/src/lang/vn.rs +++ b/src/lang/vn.rs @@ -590,11 +590,6 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("outgoing_only_desk_tip", ""), ("preset_password_warning", ""), ("Security Alert", ""), - ("Add shared address book", ""), - ("Update this address book", ""), - ("Delete this address book", ""), - ("Share this address book", ""), - ("Are you sure you want to delete address book {}?", ""), ("My address book", ""), ("Personal", ""), ("Owner", ""), @@ -603,10 +598,8 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> = ("Read-only", ""), ("Read/Write", ""), ("Full Control", ""), - ("full_control_tip", ""), ("share_warning_tip", ""), - ("Only show existing", ""), ("Everyone", ""), - ("permission_priority_tip", ""), + ("Web Console", ""), ].iter().cloned().collect(); }