diff --git a/lib/apps/domain/page.dart b/lib/apps/domain/page.dart index 9bca71c..ab6a2ff 100644 --- a/lib/apps/domain/page.dart +++ b/lib/apps/domain/page.dart @@ -204,7 +204,7 @@ class _ListNameScreenState extends State<_ListNameScreen> { item.name.isActived ? ListTile( leading: Icon(Icons.cancel, color: Colors.orange), - title: Text(lang.domainSetUnactived, style: TextStyle(color: Colors.orange)), + title: Text(lang.domainSetUnactived, style: TextStyle(color: Colors.orange, fontSize: 16.0)), onTap: () { rpc.send('domain-active', [item.name.name, item.provider.addr, false]); setState(() { @@ -214,7 +214,7 @@ class _ListNameScreenState extends State<_ListNameScreen> { }) : ListTile( leading: Icon(Icons.done, color: color.primary), - title: Text(lang.domainSetActived, style: TextStyle(color: color.primary)), + title: Text(lang.domainSetActived, style: TextStyle(color: color.primary, fontSize: 16.0)), onTap: () { rpc.send('domain-active', [item.name.name, item.provider.addr, true]); setState(() { @@ -224,14 +224,33 @@ class _ListNameScreenState extends State<_ListNameScreen> { }), ListTile( leading: const Icon(Icons.delete, color: Colors.red), - title: Text(lang.domainDelete, style: TextStyle(color: Colors.red)), - onTap: () { - rpc.send('domain-remove', [item.name.name, item.provider.addr]); - setState(() { - this._data.removeWhere((_NameItem currentItem) => item == currentItem); - this._deleteTime = true; - }); - }), + title: Text(lang.domainDelete, style: TextStyle(color: Colors.red, fontSize: 16.0)), + onTap: () => showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + title: Text(lang.delete + " ${item.name.name} ?"), + actions: [ + TextButton( + child: Text(lang.cancel), + onPressed: () => Navigator.pop(context), + ), + TextButton( + child: Text(lang.ok), + onPressed: () { + Navigator.pop(context); + rpc.send('domain-remove', [item.name.name, item.provider.addr]); + setState(() { + this._data.removeWhere((_NameItem currentItem) => item == currentItem); + this._deleteTime = true; + }); + }, + ), + ] + ); + }, + ) + ), ] ), isExpanded: item.isExpanded, diff --git a/lib/l10n/localizations_en.dart b/lib/l10n/localizations_en.dart index 08ea8bd..ae57492 100644 --- a/lib/l10n/localizations_en.dart +++ b/lib/l10n/localizations_en.dart @@ -342,9 +342,9 @@ class AppLocalizationsEn extends AppLocalizations { @override String get domainSetDefault => 'Set default ?'; @override - String get domainSetUnactived => 'Set to unactived ?'; + String get domainSetUnactived => 'Set to unactived (others cannot search you) ?'; @override - String get domainSetActived => 'Set to actived ?'; + String get domainSetActived => 'Set to actived (others can search you) ?'; @override String get domainDelete => 'Delete from provider ?'; @override diff --git a/lib/l10n/localizations_zh.dart b/lib/l10n/localizations_zh.dart index 57fd772..1863b36 100644 --- a/lib/l10n/localizations_zh.dart +++ b/lib/l10n/localizations_zh.dart @@ -342,9 +342,9 @@ class AppLocalizationsZh extends AppLocalizations { @override String get domainSetDefault => '设为默认?'; @override - String get domainSetUnactived => '设为暂停状态?'; + String get domainSetUnactived => '设为暂停状态 (别人无法搜索到你)?'; @override - String get domainSetActived => '设为正常状态?'; + String get domainSetActived => '设为正常状态 (别人可以搜索到你)?'; @override String get domainDelete => '从站点中删除?'; @override