mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-10 21:04:53 +00:00
fixes
This commit is contained in:
parent
e407a6d385
commit
56e026e422
3 changed files with 35 additions and 37 deletions
lib
src/screens/settings
view_model/settings
|
@ -106,23 +106,24 @@ class ConnectionSyncPage extends BasePage {
|
|||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
topLeft: Radius.circular(25), topRight: Radius.circular(25)),
|
||||
color: Theme.of(context).extension<SyncIndicatorTheme>()!.notSyncedBackgroundColor,
|
||||
color: Theme.of(context)
|
||||
.extension<SyncIndicatorTheme>()!
|
||||
.notSyncedBackgroundColor,
|
||||
),
|
||||
);
|
||||
}),
|
||||
Observer(builder: (context) {
|
||||
return TorStatus(
|
||||
torViewModel: dashboardViewModel.torViewModel,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(25), bottomRight: Radius.circular(25)),
|
||||
color: Theme.of(context).extension<SyncIndicatorTheme>()!.notSyncedBackgroundColor,
|
||||
),
|
||||
title: S.current.tor_status,
|
||||
isSelected: false,
|
||||
onTap: (context) {},
|
||||
);
|
||||
}),
|
||||
TorStatus(
|
||||
torViewModel: dashboardViewModel.torViewModel,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.only(
|
||||
bottomLeft: Radius.circular(25), bottomRight: Radius.circular(25)),
|
||||
color:
|
||||
Theme.of(context).extension<SyncIndicatorTheme>()!.notSyncedBackgroundColor,
|
||||
),
|
||||
title: S.current.tor_status,
|
||||
isSelected: false,
|
||||
onTap: (context) {},
|
||||
),
|
||||
]),
|
||||
),
|
||||
],
|
||||
|
|
|
@ -5,6 +5,7 @@ import 'package:cake_wallet/src/widgets/standard_list.dart';
|
|||
import 'package:cake_wallet/view_model/settings/tor_view_model.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:cake_wallet/themes/extensions/filter_theme.dart';
|
||||
import 'package:flutter_mobx/flutter_mobx.dart';
|
||||
|
||||
class TorStatus extends StandardListRow {
|
||||
TorStatus(
|
||||
|
@ -19,23 +20,25 @@ class TorStatus extends StandardListRow {
|
|||
|
||||
@override
|
||||
Widget buildTrailing(BuildContext context) {
|
||||
Color? color;
|
||||
String? text;
|
||||
switch (torViewModel.torConnectionStatus) {
|
||||
case TorConnectionStatus.connected:
|
||||
color = Palette.green;
|
||||
text = S.current.connected;
|
||||
break;
|
||||
case TorConnectionStatus.connecting:
|
||||
color = Colors.amber;
|
||||
text = S.current.connecting;
|
||||
break;
|
||||
case TorConnectionStatus.disconnected:
|
||||
color = Palette.red;
|
||||
text = S.current.disconnected;
|
||||
break;
|
||||
}
|
||||
return NodeIndicator(color: color, text: text);
|
||||
return Observer(builder: (context) {
|
||||
Color? color;
|
||||
String? text;
|
||||
switch (torViewModel.torConnectionStatus) {
|
||||
case TorConnectionStatus.connected:
|
||||
color = Palette.green;
|
||||
text = S.current.connected;
|
||||
break;
|
||||
case TorConnectionStatus.connecting:
|
||||
color = Colors.amber;
|
||||
text = S.current.connecting;
|
||||
break;
|
||||
case TorConnectionStatus.disconnected:
|
||||
color = Palette.red;
|
||||
text = S.current.disconnected;
|
||||
break;
|
||||
}
|
||||
return NodeIndicator(color: color, text: text);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,12 +25,6 @@ abstract class TorViewModelBase with Store {
|
|||
@action
|
||||
void setTorConnectionMode(TorConnectionMode mode) => _settingsStore.torConnectionMode = mode;
|
||||
|
||||
// @computed
|
||||
// bool get isTorConnected =>
|
||||
// (_settingsStore.torConnectionMode == TorConnectionMode.enabled ||
|
||||
// _settingsStore.torConnectionMode == TorConnectionMode.onionOnly) &&
|
||||
// (Tor.instance.port != -1);
|
||||
|
||||
@computed
|
||||
TorConnectionStatus get torConnectionStatus {
|
||||
|
||||
|
|
Loading…
Reference in a new issue