mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-11 05:04:35 +00:00
add fusion server default button
This commit is contained in:
parent
0374907ecd
commit
157484a4c9
2 changed files with 51 additions and 11 deletions
|
@ -27,6 +27,7 @@ import 'package:stackwallet/utilities/constants.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
import 'package:stackwallet/widgets/background.dart';
|
import 'package:stackwallet/widgets/background.dart';
|
||||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||||
|
import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
||||||
import 'package:stackwallet/widgets/rounded_container.dart';
|
import 'package:stackwallet/widgets/rounded_container.dart';
|
||||||
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
import 'package:stackwallet/widgets/rounded_white_container.dart';
|
||||||
|
@ -157,13 +158,32 @@ class _CashFusionViewState extends ConsumerState<CashFusionView> {
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 16,
|
height: 16,
|
||||||
),
|
),
|
||||||
Text(
|
Row(
|
||||||
"Server settings",
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
style: STextStyles.w500_14(context).copyWith(
|
children: [
|
||||||
color: Theme.of(context)
|
Text(
|
||||||
.extension<StackColors>()!
|
"Server settings",
|
||||||
.textDark3,
|
style: STextStyles.w500_14(context).copyWith(
|
||||||
),
|
color: Theme.of(context)
|
||||||
|
.extension<StackColors>()!
|
||||||
|
.textDark3,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
CustomTextButton(
|
||||||
|
text: "Default",
|
||||||
|
onTap: () {
|
||||||
|
const def = FusionInfo.DEFAULTS;
|
||||||
|
serverController.text = def.host;
|
||||||
|
portController.text = def.port.toString();
|
||||||
|
fusionRoundController.text =
|
||||||
|
def.rounds.toString();
|
||||||
|
_option = FusionOption.continuous;
|
||||||
|
setState(() {
|
||||||
|
_enableSSLCheckbox = def.ssl;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 12,
|
height: 12,
|
||||||
|
|
|
@ -28,6 +28,7 @@ import 'package:stackwallet/utilities/assets.dart';
|
||||||
import 'package:stackwallet/utilities/constants.dart';
|
import 'package:stackwallet/utilities/constants.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
|
||||||
|
import 'package:stackwallet/widgets/custom_buttons/blue_text_button.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
import 'package:stackwallet/widgets/desktop/desktop_app_bar.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
|
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/desktop_dialog_close_button.dart';
|
import 'package:stackwallet/widgets/desktop/desktop_dialog_close_button.dart';
|
||||||
|
@ -277,10 +278,29 @@ class _DesktopCashFusion extends ConsumerState<DesktopCashFusionView> {
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Row(
|
||||||
"Server settings",
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
style:
|
children: [
|
||||||
STextStyles.desktopTextExtraExtraSmall(context),
|
Text(
|
||||||
|
"Server settings",
|
||||||
|
style: STextStyles.desktopTextExtraExtraSmall(
|
||||||
|
context),
|
||||||
|
),
|
||||||
|
CustomTextButton(
|
||||||
|
text: "Default",
|
||||||
|
onTap: () {
|
||||||
|
const def = FusionInfo.DEFAULTS;
|
||||||
|
serverController.text = def.host;
|
||||||
|
portController.text = def.port.toString();
|
||||||
|
fusionRoundController.text =
|
||||||
|
def.rounds.toString();
|
||||||
|
_roundType = FusionOption.continuous;
|
||||||
|
setState(() {
|
||||||
|
_enableSSLCheckbox = def.ssl;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 12,
|
height: 12,
|
||||||
|
|
Loading…
Reference in a new issue