mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-30 16:29:30 +01:00
chore: Follow up settings page
This commit is contained in:
parent
72767f0716
commit
50dc19b0de
@ -179,6 +179,15 @@ class SettingsController extends State<Settings> {
|
|||||||
bool? showChatBackupBanner;
|
bool? showChatBackupBanner;
|
||||||
|
|
||||||
void firstRunBootstrapAction([_]) async {
|
void firstRunBootstrapAction([_]) async {
|
||||||
|
if (showChatBackupBanner != true) {
|
||||||
|
showOkAlertDialog(
|
||||||
|
context: context,
|
||||||
|
title: L10n.of(context)!.chatBackup,
|
||||||
|
message: L10n.of(context)!.onlineKeyBackupEnabled,
|
||||||
|
okLabel: L10n.of(context)!.close,
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
await BootstrapDialog(
|
await BootstrapDialog(
|
||||||
client: Matrix.of(context).client,
|
client: Matrix.of(context).client,
|
||||||
).show(context);
|
).show(context);
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import 'package:fluffychat/utils/fluffy_share.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
@ -20,6 +21,9 @@ class SettingsView extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
|
leading: CloseButton(
|
||||||
|
onPressed: VRouter.of(context).pop,
|
||||||
|
),
|
||||||
title: Text(L10n.of(context)!.settings),
|
title: Text(L10n.of(context)!.settings),
|
||||||
actions: [
|
actions: [
|
||||||
TextButton.icon(
|
TextButton.icon(
|
||||||
@ -111,7 +115,7 @@ class SettingsView extends StatelessWidget {
|
|||||||
subtitle: Align(
|
subtitle: Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: TextButton.icon(
|
child: TextButton.icon(
|
||||||
onPressed: () {},
|
onPressed: () => FluffyShare.share(mxid, context),
|
||||||
icon: const Icon(
|
icon: const Icon(
|
||||||
Icons.copy_outlined,
|
Icons.copy_outlined,
|
||||||
size: 14,
|
size: 14,
|
||||||
@ -139,9 +143,7 @@ class SettingsView extends StatelessWidget {
|
|||||||
value: controller.showChatBackupBanner == false,
|
value: controller.showChatBackupBanner == false,
|
||||||
secondary: const Icon(Icons.backup_outlined),
|
secondary: const Icon(Icons.backup_outlined),
|
||||||
title: Text(L10n.of(context)!.chatBackup),
|
title: Text(L10n.of(context)!.chatBackup),
|
||||||
onChanged: controller.showChatBackupBanner != false
|
onChanged: controller.firstRunBootstrapAction,
|
||||||
? controller.firstRunBootstrapAction
|
|
||||||
: null,
|
|
||||||
),
|
),
|
||||||
const Divider(thickness: 1),
|
const Divider(thickness: 1),
|
||||||
ListTile(
|
ListTile(
|
||||||
|
Loading…
Reference in New Issue
Block a user