mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-24 04:59:26 +01:00
design: Remove cupertino icons
This commit is contained in:
parent
dbc56c2cf2
commit
66a66cefa3
@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.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';
|
||||||
@ -42,6 +41,7 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
(room.summary?.mJoinedMemberCount ?? 0);
|
(room.summary?.mJoinedMemberCount ?? 0);
|
||||||
final canRequestMoreMembers =
|
final canRequestMoreMembers =
|
||||||
controller.members.length < actualMembersCount;
|
controller.members.length < actualMembersCount;
|
||||||
|
final iconColor = Theme.of(context).textTheme.bodyText1.color;
|
||||||
return StreamBuilder(
|
return StreamBuilder(
|
||||||
stream: room.onUpdate.stream,
|
stream: room.onUpdate.stream,
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
@ -105,9 +105,9 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
? CircleAvatar(
|
? CircleAvatar(
|
||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.scaffoldBackgroundColor,
|
.scaffoldBackgroundColor,
|
||||||
foregroundColor: Colors.grey,
|
foregroundColor: iconColor,
|
||||||
radius: Avatar.defaultSize / 2,
|
radius: Avatar.defaultSize / 2,
|
||||||
child: const Icon(CupertinoIcons.pen),
|
child: const Icon(Icons.edit_outlined),
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
title: Text(
|
title: Text(
|
||||||
@ -149,8 +149,8 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
trailing: Icon(controller.displaySettings
|
trailing: Icon(controller.displaySettings
|
||||||
? CupertinoIcons.chevron_down
|
? Icons.keyboard_arrow_down_outlined
|
||||||
: CupertinoIcons.right_chevron),
|
: Icons.keyboard_arrow_right_outlined),
|
||||||
onTap: controller.toggleDisplaySettings,
|
onTap: controller.toggleDisplaySettings,
|
||||||
),
|
),
|
||||||
if (controller.displaySettings) ...[
|
if (controller.displaySettings) ...[
|
||||||
@ -159,8 +159,9 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.scaffoldBackgroundColor,
|
.scaffoldBackgroundColor,
|
||||||
foregroundColor: Colors.grey,
|
foregroundColor: iconColor,
|
||||||
child: const Icon(CupertinoIcons.group),
|
child: const Icon(
|
||||||
|
Icons.people_outline_outlined),
|
||||||
),
|
),
|
||||||
title: Text(
|
title: Text(
|
||||||
L10n.of(context).changeTheNameOfTheGroup),
|
L10n.of(context).changeTheNameOfTheGroup),
|
||||||
@ -173,8 +174,8 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.scaffoldBackgroundColor,
|
.scaffoldBackgroundColor,
|
||||||
foregroundColor: Colors.grey,
|
foregroundColor: iconColor,
|
||||||
child: const Icon(CupertinoIcons.link),
|
child: const Icon(Icons.link_outlined),
|
||||||
),
|
),
|
||||||
onTap: controller.editAliases,
|
onTap: controller.editAliases,
|
||||||
title: Text(L10n.of(context).editRoomAliases),
|
title: Text(L10n.of(context).editRoomAliases),
|
||||||
@ -187,7 +188,7 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
Theme.of(context).scaffoldBackgroundColor,
|
Theme.of(context).scaffoldBackgroundColor,
|
||||||
foregroundColor: Colors.grey,
|
foregroundColor: iconColor,
|
||||||
child: const Icon(
|
child: const Icon(
|
||||||
Icons.insert_emoticon_outlined),
|
Icons.insert_emoticon_outlined),
|
||||||
),
|
),
|
||||||
@ -219,9 +220,8 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.scaffoldBackgroundColor,
|
.scaffoldBackgroundColor,
|
||||||
foregroundColor: Colors.grey,
|
foregroundColor: iconColor,
|
||||||
child: const Icon(
|
child: const Icon(Icons.shield_outlined)),
|
||||||
CupertinoIcons.checkmark_shield)),
|
|
||||||
title: Text(L10n.of(context)
|
title: Text(L10n.of(context)
|
||||||
.whoIsAllowedToJoinThisGroup),
|
.whoIsAllowedToJoinThisGroup),
|
||||||
subtitle: Text(
|
subtitle: Text(
|
||||||
@ -269,8 +269,9 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.scaffoldBackgroundColor,
|
.scaffoldBackgroundColor,
|
||||||
foregroundColor: Colors.grey,
|
foregroundColor: iconColor,
|
||||||
child: const Icon(CupertinoIcons.eye),
|
child:
|
||||||
|
const Icon(Icons.visibility_outlined),
|
||||||
),
|
),
|
||||||
title: Text(L10n.of(context)
|
title: Text(L10n.of(context)
|
||||||
.visibilityOfTheChatHistory),
|
.visibilityOfTheChatHistory),
|
||||||
@ -309,9 +310,9 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
backgroundColor: Theme.of(context)
|
backgroundColor: Theme.of(context)
|
||||||
.scaffoldBackgroundColor,
|
.scaffoldBackgroundColor,
|
||||||
foregroundColor: Colors.grey,
|
foregroundColor: iconColor,
|
||||||
child:
|
child: const Icon(
|
||||||
const Icon(CupertinoIcons.person_alt),
|
Icons.person_add_alt_1_outlined),
|
||||||
),
|
),
|
||||||
title: Text(L10n.of(context)
|
title: Text(L10n.of(context)
|
||||||
.areGuestsAllowedToJoin),
|
.areGuestsAllowedToJoin),
|
||||||
@ -329,9 +330,9 @@ class ChatDetailsView extends StatelessWidget {
|
|||||||
leading: CircleAvatar(
|
leading: CircleAvatar(
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
Theme.of(context).scaffoldBackgroundColor,
|
Theme.of(context).scaffoldBackgroundColor,
|
||||||
foregroundColor: Colors.grey,
|
foregroundColor: iconColor,
|
||||||
child: const Icon(
|
child: const Icon(
|
||||||
CupertinoIcons.slider_horizontal_3),
|
Icons.edit_attributes_outlined),
|
||||||
),
|
),
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
VRouter.of(context).to('permissions'),
|
VRouter.of(context).to('permissions'),
|
||||||
|
@ -264,14 +264,12 @@ class ChatListView extends StatelessWidget {
|
|||||||
floatingActionButton: selectMode == SelectMode.normal
|
floatingActionButton: selectMode == SelectMode.normal
|
||||||
? controller.scrolledToTop
|
? controller.scrolledToTop
|
||||||
? FloatingActionButton.extended(
|
? FloatingActionButton.extended(
|
||||||
heroTag: 'main_fab',
|
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
VRouter.of(context).to('/newprivatechat'),
|
VRouter.of(context).to('/newprivatechat'),
|
||||||
icon: const Icon(CupertinoIcons.chat_bubble),
|
icon: const Icon(CupertinoIcons.chat_bubble),
|
||||||
label: Text(L10n.of(context).newChat),
|
label: Text(L10n.of(context).newChat),
|
||||||
)
|
)
|
||||||
: FloatingActionButton(
|
: FloatingActionButton(
|
||||||
heroTag: 'main_fab',
|
|
||||||
onPressed: () =>
|
onPressed: () =>
|
||||||
VRouter.of(context).to('/newprivatechat'),
|
VRouter.of(context).to('/newprivatechat'),
|
||||||
child: const Icon(CupertinoIcons.chat_bubble),
|
child: const Icon(CupertinoIcons.chat_bubble),
|
||||||
|
@ -45,19 +45,19 @@ class SettingsController extends State<Settings> {
|
|||||||
key: AvatarAction.camera,
|
key: AvatarAction.camera,
|
||||||
label: L10n.of(context).openCamera,
|
label: L10n.of(context).openCamera,
|
||||||
isDefaultAction: true,
|
isDefaultAction: true,
|
||||||
icon: CupertinoIcons.camera,
|
icon: Icons.camera_alt_outlined,
|
||||||
),
|
),
|
||||||
SheetAction(
|
SheetAction(
|
||||||
key: AvatarAction.file,
|
key: AvatarAction.file,
|
||||||
label: L10n.of(context).openGallery,
|
label: L10n.of(context).openGallery,
|
||||||
icon: CupertinoIcons.photo,
|
icon: Icons.photo_outlined,
|
||||||
),
|
),
|
||||||
if (profile?.avatarUrl != null)
|
if (profile?.avatarUrl != null)
|
||||||
SheetAction(
|
SheetAction(
|
||||||
key: AvatarAction.remove,
|
key: AvatarAction.remove,
|
||||||
label: L10n.of(context).removeYourAvatar,
|
label: L10n.of(context).removeYourAvatar,
|
||||||
isDestructiveAction: true,
|
isDestructiveAction: true,
|
||||||
icon: CupertinoIcons.delete,
|
icon: Icons.delete_outlined,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.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';
|
||||||
@ -32,60 +31,64 @@ class SettingsView extends StatelessWidget {
|
|||||||
background: ContentBanner(
|
background: ContentBanner(
|
||||||
controller.profile?.avatarUrl,
|
controller.profile?.avatarUrl,
|
||||||
onEdit: controller.setAvatarAction,
|
onEdit: controller.setAvatarAction,
|
||||||
defaultIcon: CupertinoIcons.person_circle,
|
defaultIcon: Icons.person_outline_outlined,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
body: ListView(
|
body: ListTileTheme(
|
||||||
children: <Widget>[
|
iconColor: Theme.of(context).textTheme.bodyText1.color,
|
||||||
ListTile(
|
child: ListView(
|
||||||
title: Text(L10n.of(context).changeTheme),
|
children: <Widget>[
|
||||||
onTap: () => VRouter.of(context).to('/settings/style'),
|
ListTile(
|
||||||
leading: const Icon(CupertinoIcons.paintbrush),
|
leading: const Icon(Icons.format_paint_outlined),
|
||||||
),
|
title: Text(L10n.of(context).changeTheme),
|
||||||
ListTile(
|
onTap: () => VRouter.of(context).to('/settings/style'),
|
||||||
leading: const Icon(CupertinoIcons.bell),
|
),
|
||||||
title: Text(L10n.of(context).notifications),
|
const Divider(thickness: 1),
|
||||||
onTap: () => VRouter.of(context).to('/settings/notifications'),
|
ListTile(
|
||||||
),
|
leading: const Icon(Icons.notifications_outlined),
|
||||||
ListTile(
|
title: Text(L10n.of(context).notifications),
|
||||||
leading: const Icon(CupertinoIcons.device_phone_portrait),
|
onTap: () => VRouter.of(context).to('/settings/notifications'),
|
||||||
title: Text(L10n.of(context).devices),
|
),
|
||||||
onTap: () => VRouter.of(context).to('/settings/devices'),
|
ListTile(
|
||||||
),
|
leading: const Icon(Icons.devices_outlined),
|
||||||
ListTile(
|
title: Text(L10n.of(context).devices),
|
||||||
leading: const Icon(CupertinoIcons.chat_bubble_2),
|
onTap: () => VRouter.of(context).to('/settings/devices'),
|
||||||
title: Text(L10n.of(context).chat),
|
),
|
||||||
onTap: () => VRouter.of(context).to('/settings/chat'),
|
ListTile(
|
||||||
),
|
leading: const Icon(Icons.chat_bubble_outline_outlined),
|
||||||
ListTile(
|
title: Text(L10n.of(context).chat),
|
||||||
leading: const Icon(CupertinoIcons.person),
|
onTap: () => VRouter.of(context).to('/settings/chat'),
|
||||||
title: Text(L10n.of(context).account),
|
),
|
||||||
onTap: () => VRouter.of(context).to('/settings/account'),
|
ListTile(
|
||||||
),
|
leading: const Icon(Icons.account_circle_outlined),
|
||||||
ListTile(
|
title: Text(L10n.of(context).account),
|
||||||
leading: const Icon(CupertinoIcons.shield),
|
onTap: () => VRouter.of(context).to('/settings/account'),
|
||||||
title: Text(L10n.of(context).security),
|
),
|
||||||
onTap: () => VRouter.of(context).to('/settings/security'),
|
ListTile(
|
||||||
),
|
leading: const Icon(Icons.shield_outlined),
|
||||||
const Divider(thickness: 1),
|
title: Text(L10n.of(context).security),
|
||||||
ListTile(
|
onTap: () => VRouter.of(context).to('/settings/security'),
|
||||||
leading: const Icon(CupertinoIcons.question_circle),
|
),
|
||||||
title: Text(L10n.of(context).help),
|
const Divider(thickness: 1),
|
||||||
onTap: () => launch(AppConfig.supportUrl),
|
ListTile(
|
||||||
),
|
leading: const Icon(Icons.help_outline_outlined),
|
||||||
ListTile(
|
title: Text(L10n.of(context).help),
|
||||||
leading: const Icon(CupertinoIcons.checkmark_shield),
|
onTap: () => launch(AppConfig.supportUrl),
|
||||||
title: Text(L10n.of(context).privacy),
|
),
|
||||||
onTap: () => launch(AppConfig.privacyUrl),
|
ListTile(
|
||||||
),
|
leading: const Icon(Icons.shield_sharp),
|
||||||
ListTile(
|
title: Text(L10n.of(context).privacy),
|
||||||
leading: const Icon(CupertinoIcons.info_circle),
|
onTap: () => launch(AppConfig.privacyUrl),
|
||||||
title: Text(L10n.of(context).about),
|
),
|
||||||
onTap: () => PlatformInfos.showDialog(context),
|
ListTile(
|
||||||
),
|
leading: const Icon(Icons.info_outline_rounded),
|
||||||
],
|
title: Text(L10n.of(context).about),
|
||||||
|
onTap: () => PlatformInfos.showDialog(context),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -17,48 +17,51 @@ class SettingsAccountView extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(title: Text(L10n.of(context).account)),
|
appBar: AppBar(title: Text(L10n.of(context).account)),
|
||||||
body: MaxWidthBody(
|
body: ListTileTheme(
|
||||||
withScrolling: true,
|
iconColor: Theme.of(context).textTheme.bodyText1.color,
|
||||||
child: Column(
|
child: MaxWidthBody(
|
||||||
children: [
|
withScrolling: true,
|
||||||
ListTile(
|
child: Column(
|
||||||
title: Text(L10n.of(context).yourUserId),
|
children: [
|
||||||
subtitle: Text(Matrix.of(context).client.userID),
|
ListTile(
|
||||||
trailing: const Icon(Icons.copy_outlined),
|
title: Text(L10n.of(context).yourUserId),
|
||||||
onTap: () => FluffyShare.share(
|
subtitle: Text(Matrix.of(context).client.userID),
|
||||||
Matrix.of(context).client.userID,
|
trailing: const Icon(Icons.copy_outlined),
|
||||||
context,
|
onTap: () => FluffyShare.share(
|
||||||
|
Matrix.of(context).client.userID,
|
||||||
|
context,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
ListTile(
|
||||||
ListTile(
|
trailing: const Icon(Icons.edit_outlined),
|
||||||
trailing: const Icon(CupertinoIcons.pen),
|
title: Text(L10n.of(context).editDisplayname),
|
||||||
title: Text(L10n.of(context).editDisplayname),
|
subtitle: Text(controller.profile?.displayName ??
|
||||||
subtitle: Text(controller.profile?.displayName ??
|
Matrix.of(context).client.userID.localpart),
|
||||||
Matrix.of(context).client.userID.localpart),
|
onTap: controller.setDisplaynameAction,
|
||||||
onTap: controller.setDisplaynameAction,
|
|
||||||
),
|
|
||||||
const Divider(height: 1),
|
|
||||||
ListTile(
|
|
||||||
trailing: const Icon(CupertinoIcons.add_circled),
|
|
||||||
title: Text(L10n.of(context).addAccount),
|
|
||||||
subtitle: Text(L10n.of(context).enableMultiAccounts),
|
|
||||||
onTap: controller.addAccountAction,
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
trailing: const Icon(CupertinoIcons.arrow_right_square),
|
|
||||||
title: Text(L10n.of(context).logout),
|
|
||||||
onTap: controller.logoutAction,
|
|
||||||
),
|
|
||||||
const Divider(height: 1),
|
|
||||||
ListTile(
|
|
||||||
trailing: const Icon(CupertinoIcons.delete_solid),
|
|
||||||
title: Text(
|
|
||||||
L10n.of(context).deleteAccount,
|
|
||||||
style: const TextStyle(color: Colors.red),
|
|
||||||
),
|
),
|
||||||
onTap: controller.deleteAccountAction,
|
const Divider(height: 1),
|
||||||
),
|
ListTile(
|
||||||
],
|
trailing: const Icon(Icons.person_add_outlined),
|
||||||
|
title: Text(L10n.of(context).addAccount),
|
||||||
|
subtitle: Text(L10n.of(context).enableMultiAccounts),
|
||||||
|
onTap: controller.addAccountAction,
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
trailing: const Icon(Icons.exit_to_app_outlined),
|
||||||
|
title: Text(L10n.of(context).logout),
|
||||||
|
onTap: controller.logoutAction,
|
||||||
|
),
|
||||||
|
const Divider(height: 1),
|
||||||
|
ListTile(
|
||||||
|
trailing: const Icon(Icons.delete_outlined),
|
||||||
|
title: Text(
|
||||||
|
L10n.of(context).deleteAccount,
|
||||||
|
style: const TextStyle(color: Colors.red),
|
||||||
|
),
|
||||||
|
onTap: controller.deleteAccountAction,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.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';
|
||||||
@ -19,60 +18,63 @@ class SettingsChatView extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(title: Text(L10n.of(context).chat)),
|
appBar: AppBar(title: Text(L10n.of(context).chat)),
|
||||||
body: MaxWidthBody(
|
body: ListTileTheme(
|
||||||
withScrolling: true,
|
iconColor: Theme.of(context).textTheme.bodyText1.color,
|
||||||
child: Column(
|
child: MaxWidthBody(
|
||||||
children: [
|
withScrolling: true,
|
||||||
SettingsSwitchListTile(
|
child: Column(
|
||||||
title: L10n.of(context).renderRichContent,
|
children: [
|
||||||
onChanged: (b) => AppConfig.renderHtml = b,
|
|
||||||
storeKey: SettingKeys.renderHtml,
|
|
||||||
defaultValue: AppConfig.renderHtml,
|
|
||||||
),
|
|
||||||
SettingsSwitchListTile(
|
|
||||||
title: L10n.of(context).hideRedactedEvents,
|
|
||||||
onChanged: (b) => AppConfig.hideRedactedEvents = b,
|
|
||||||
storeKey: SettingKeys.hideRedactedEvents,
|
|
||||||
defaultValue: AppConfig.hideRedactedEvents,
|
|
||||||
),
|
|
||||||
SettingsSwitchListTile(
|
|
||||||
title: L10n.of(context).hideUnknownEvents,
|
|
||||||
onChanged: (b) => AppConfig.hideUnknownEvents = b,
|
|
||||||
storeKey: SettingKeys.hideUnknownEvents,
|
|
||||||
defaultValue: AppConfig.hideUnknownEvents,
|
|
||||||
),
|
|
||||||
SettingsSwitchListTile(
|
|
||||||
title: L10n.of(context).autoplayImages,
|
|
||||||
onChanged: (b) => AppConfig.autoplayImages = b,
|
|
||||||
storeKey: SettingKeys.autoplayImages,
|
|
||||||
defaultValue: AppConfig.autoplayImages,
|
|
||||||
),
|
|
||||||
if (PlatformInfos.isMobile)
|
|
||||||
SettingsSwitchListTile(
|
SettingsSwitchListTile(
|
||||||
title: L10n.of(context).sendOnEnter,
|
title: L10n.of(context).renderRichContent,
|
||||||
onChanged: (b) => AppConfig.sendOnEnter = b,
|
onChanged: (b) => AppConfig.renderHtml = b,
|
||||||
storeKey: SettingKeys.sendOnEnter,
|
storeKey: SettingKeys.renderHtml,
|
||||||
defaultValue: AppConfig.sendOnEnter,
|
defaultValue: AppConfig.renderHtml,
|
||||||
),
|
),
|
||||||
const Divider(height: 1),
|
SettingsSwitchListTile(
|
||||||
ListTile(
|
title: L10n.of(context).hideRedactedEvents,
|
||||||
title: Text(L10n.of(context).emoteSettings),
|
onChanged: (b) => AppConfig.hideRedactedEvents = b,
|
||||||
onTap: () => VRouter.of(context).to('emotes'),
|
storeKey: SettingKeys.hideRedactedEvents,
|
||||||
trailing: const Padding(
|
defaultValue: AppConfig.hideRedactedEvents,
|
||||||
padding: EdgeInsets.all(16.0),
|
|
||||||
child: Icon(Icons.insert_emoticon_outlined),
|
|
||||||
),
|
),
|
||||||
),
|
SettingsSwitchListTile(
|
||||||
ListTile(
|
title: L10n.of(context).hideUnknownEvents,
|
||||||
trailing: const Padding(
|
onChanged: (b) => AppConfig.hideUnknownEvents = b,
|
||||||
padding: EdgeInsets.all(16.0),
|
storeKey: SettingKeys.hideUnknownEvents,
|
||||||
child: Icon(CupertinoIcons.phone),
|
defaultValue: AppConfig.hideUnknownEvents,
|
||||||
),
|
),
|
||||||
title: Text(L10n.of(context).editJitsiInstance),
|
SettingsSwitchListTile(
|
||||||
subtitle: Text(AppConfig.jitsiInstance),
|
title: L10n.of(context).autoplayImages,
|
||||||
onTap: controller.setJitsiInstanceAction,
|
onChanged: (b) => AppConfig.autoplayImages = b,
|
||||||
),
|
storeKey: SettingKeys.autoplayImages,
|
||||||
],
|
defaultValue: AppConfig.autoplayImages,
|
||||||
|
),
|
||||||
|
if (PlatformInfos.isMobile)
|
||||||
|
SettingsSwitchListTile(
|
||||||
|
title: L10n.of(context).sendOnEnter,
|
||||||
|
onChanged: (b) => AppConfig.sendOnEnter = b,
|
||||||
|
storeKey: SettingKeys.sendOnEnter,
|
||||||
|
defaultValue: AppConfig.sendOnEnter,
|
||||||
|
),
|
||||||
|
const Divider(height: 1),
|
||||||
|
ListTile(
|
||||||
|
title: Text(L10n.of(context).emoteSettings),
|
||||||
|
onTap: () => VRouter.of(context).to('emotes'),
|
||||||
|
trailing: const Padding(
|
||||||
|
padding: EdgeInsets.all(16.0),
|
||||||
|
child: Icon(Icons.insert_emoticon_outlined),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
trailing: const Padding(
|
||||||
|
padding: EdgeInsets.all(16.0),
|
||||||
|
child: Icon(Icons.phone_outlined),
|
||||||
|
),
|
||||||
|
title: Text(L10n.of(context).editJitsiInstance),
|
||||||
|
subtitle: Text(AppConfig.jitsiInstance),
|
||||||
|
onTap: controller.setJitsiInstanceAction,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
@ -29,8 +28,7 @@ class EmotesSettingsView extends StatelessWidget {
|
|||||||
floatingActionButton: controller.showSave
|
floatingActionButton: controller.showSave
|
||||||
? FloatingActionButton(
|
? FloatingActionButton(
|
||||||
onPressed: controller.saveAction,
|
onPressed: controller.saveAction,
|
||||||
child:
|
child: const Icon(Icons.save_outlined, color: Colors.white),
|
||||||
const Icon(CupertinoIcons.floppy_disk, color: Colors.white),
|
|
||||||
)
|
)
|
||||||
: null,
|
: null,
|
||||||
body: MaxWidthBody(
|
body: MaxWidthBody(
|
||||||
@ -78,7 +76,7 @@ class EmotesSettingsView extends StatelessWidget {
|
|||||||
trailing: InkWell(
|
trailing: InkWell(
|
||||||
onTap: controller.addImageAction,
|
onTap: controller.addImageAction,
|
||||||
child: const Icon(
|
child: const Icon(
|
||||||
CupertinoIcons.add,
|
Icons.add_outlined,
|
||||||
color: Colors.green,
|
color: Colors.green,
|
||||||
size: 32.0,
|
size: 32.0,
|
||||||
),
|
),
|
||||||
@ -198,7 +196,7 @@ class EmotesSettingsView extends StatelessWidget {
|
|||||||
onTap: () =>
|
onTap: () =>
|
||||||
controller.removeImageAction(imageCode),
|
controller.removeImageAction(imageCode),
|
||||||
child: const Icon(
|
child: const Icon(
|
||||||
CupertinoIcons.delete,
|
Icons.delete_outlined,
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
size: 32.0,
|
size: 32.0,
|
||||||
),
|
),
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
import 'package:adaptive_dialog/adaptive_dialog.dart';
|
||||||
@ -19,78 +18,85 @@ class SettingsSecurityView extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(title: Text(L10n.of(context).security)),
|
appBar: AppBar(title: Text(L10n.of(context).security)),
|
||||||
body: MaxWidthBody(
|
body: ListTileTheme(
|
||||||
withScrolling: true,
|
iconColor: Theme.of(context).textTheme.bodyText1.color,
|
||||||
child: Column(
|
child: MaxWidthBody(
|
||||||
children: [
|
withScrolling: true,
|
||||||
ListTile(
|
child: Column(
|
||||||
trailing: const Icon(CupertinoIcons.xmark_shield),
|
children: [
|
||||||
title: Text(L10n.of(context).ignoredUsers),
|
ListTile(
|
||||||
onTap: () => VRouter.of(context).to('ignorelist'),
|
trailing: const Icon(Icons.close),
|
||||||
),
|
title: Text(L10n.of(context).ignoredUsers),
|
||||||
ListTile(
|
onTap: () => VRouter.of(context).to('ignorelist'),
|
||||||
trailing: const Icon(CupertinoIcons.padlock),
|
),
|
||||||
title: Text(
|
|
||||||
L10n.of(context).changePassword,
|
|
||||||
),
|
|
||||||
onTap: controller.changePasswordAccountAction,
|
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
trailing: const Icon(CupertinoIcons.mail),
|
|
||||||
title: Text(L10n.of(context).passwordRecovery),
|
|
||||||
onTap: () => VRouter.of(context).to('3pid'),
|
|
||||||
),
|
|
||||||
if (Matrix.of(context).client.encryption != null) ...{
|
|
||||||
const Divider(thickness: 1),
|
|
||||||
if (PlatformInfos.isMobile)
|
|
||||||
ListTile(
|
|
||||||
trailing: const Icon(Icons.lock_outlined),
|
|
||||||
title: Text(L10n.of(context).appLock),
|
|
||||||
onTap: controller.setAppLockAction,
|
|
||||||
),
|
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(L10n.of(context).yourPublicKey),
|
|
||||||
onTap: () => showOkAlertDialog(
|
|
||||||
useRootNavigator: false,
|
|
||||||
context: context,
|
|
||||||
title: L10n.of(context).yourPublicKey,
|
|
||||||
message: Matrix.of(context).client.fingerprintKey.beautified,
|
|
||||||
okLabel: L10n.of(context).ok,
|
|
||||||
),
|
|
||||||
trailing: const Icon(Icons.vpn_key_outlined),
|
trailing: const Icon(Icons.vpn_key_outlined),
|
||||||
|
title: Text(
|
||||||
|
L10n.of(context).changePassword,
|
||||||
|
),
|
||||||
|
onTap: controller.changePasswordAccountAction,
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(L10n.of(context).crossSigningEnabled),
|
trailing: const Icon(Icons.mail_outlined),
|
||||||
trailing:
|
title: Text(L10n.of(context).passwordRecovery),
|
||||||
Matrix.of(context).client.encryption.crossSigning.enabled
|
onTap: () => VRouter.of(context).to('3pid'),
|
||||||
? const Icon(Icons.check, color: Colors.green)
|
|
||||||
: const Icon(Icons.error, color: Colors.red),
|
|
||||||
),
|
),
|
||||||
ListTile(
|
if (Matrix.of(context).client.encryption != null) ...{
|
||||||
title: Text(L10n.of(context).onlineKeyBackupEnabled),
|
const Divider(thickness: 1),
|
||||||
trailing:
|
if (PlatformInfos.isMobile)
|
||||||
Matrix.of(context).client.encryption.keyManager.enabled
|
ListTile(
|
||||||
? const Icon(Icons.check, color: Colors.green)
|
trailing: const Icon(Icons.lock_outlined),
|
||||||
: const Icon(Icons.error, color: Colors.red),
|
title: Text(L10n.of(context).appLock),
|
||||||
),
|
onTap: controller.setAppLockAction,
|
||||||
ListTile(
|
),
|
||||||
title: const Text('Session verified'),
|
ListTile(
|
||||||
trailing: !Matrix.of(context).client.isUnknownSession
|
title: Text(L10n.of(context).yourPublicKey),
|
||||||
? const Icon(Icons.check, color: Colors.green)
|
onTap: () => showOkAlertDialog(
|
||||||
: const Icon(Icons.error, color: Colors.red),
|
useRootNavigator: false,
|
||||||
),
|
context: context,
|
||||||
FutureBuilder(
|
title: L10n.of(context).yourPublicKey,
|
||||||
future:
|
message:
|
||||||
Matrix.of(context).client.encryption.keyManager.isCached(),
|
Matrix.of(context).client.fingerprintKey.beautified,
|
||||||
builder: (context, snapshot) => ListTile(
|
okLabel: L10n.of(context).ok,
|
||||||
title: Text(L10n.of(context).keysCached),
|
),
|
||||||
trailing: snapshot.data == true
|
trailing: const Icon(Icons.vpn_key_outlined),
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
title: Text(L10n.of(context).crossSigningEnabled),
|
||||||
|
trailing:
|
||||||
|
Matrix.of(context).client.encryption.crossSigning.enabled
|
||||||
|
? const Icon(Icons.check, color: Colors.green)
|
||||||
|
: const Icon(Icons.error, color: Colors.red),
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
title: Text(L10n.of(context).onlineKeyBackupEnabled),
|
||||||
|
trailing:
|
||||||
|
Matrix.of(context).client.encryption.keyManager.enabled
|
||||||
|
? const Icon(Icons.check, color: Colors.green)
|
||||||
|
: const Icon(Icons.error, color: Colors.red),
|
||||||
|
),
|
||||||
|
ListTile(
|
||||||
|
title: const Text('Session verified'),
|
||||||
|
trailing: !Matrix.of(context).client.isUnknownSession
|
||||||
? const Icon(Icons.check, color: Colors.green)
|
? const Icon(Icons.check, color: Colors.green)
|
||||||
: const Icon(Icons.error, color: Colors.red),
|
: const Icon(Icons.error, color: Colors.red),
|
||||||
),
|
),
|
||||||
),
|
FutureBuilder(
|
||||||
},
|
future: Matrix.of(context)
|
||||||
],
|
.client
|
||||||
|
.encryption
|
||||||
|
.keyManager
|
||||||
|
.isCached(),
|
||||||
|
builder: (context, snapshot) => ListTile(
|
||||||
|
title: Text(L10n.of(context).keysCached),
|
||||||
|
trailing: snapshot.data == true
|
||||||
|
? const Icon(Icons.check, color: Colors.green)
|
||||||
|
: const Icon(Icons.error, color: Colors.red),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
import 'package:adaptive_theme/adaptive_theme.dart';
|
import 'package:adaptive_theme/adaptive_theme.dart';
|
||||||
@ -93,7 +92,7 @@ class SettingsStyleView extends StatelessWidget {
|
|||||||
fit: BoxFit.cover,
|
fit: BoxFit.cover,
|
||||||
),
|
),
|
||||||
trailing: const Icon(
|
trailing: const Icon(
|
||||||
CupertinoIcons.delete,
|
Icons.delete_outlined,
|
||||||
color: Colors.red,
|
color: Colors.red,
|
||||||
),
|
),
|
||||||
onTap: controller.deleteWallpaperAction,
|
onTap: controller.deleteWallpaperAction,
|
||||||
@ -101,7 +100,10 @@ class SettingsStyleView extends StatelessWidget {
|
|||||||
Builder(builder: (context) {
|
Builder(builder: (context) {
|
||||||
return ListTile(
|
return ListTile(
|
||||||
title: Text(L10n.of(context).changeWallpaper),
|
title: Text(L10n.of(context).changeWallpaper),
|
||||||
trailing: const Icon(CupertinoIcons.photo),
|
trailing: Icon(
|
||||||
|
Icons.photo_outlined,
|
||||||
|
color: Theme.of(context).textTheme.bodyText1.color,
|
||||||
|
),
|
||||||
onTap: controller.setWallpaperAction,
|
onTap: controller.setWallpaperAction,
|
||||||
);
|
);
|
||||||
}),
|
}),
|
||||||
|
@ -18,7 +18,7 @@ class ContentBanner extends StatelessWidget {
|
|||||||
|
|
||||||
const ContentBanner(this.mxContent,
|
const ContentBanner(this.mxContent,
|
||||||
{this.height = 400,
|
{this.height = 400,
|
||||||
this.defaultIcon = CupertinoIcons.group,
|
this.defaultIcon = Icons.people_outlined,
|
||||||
this.loading = false,
|
this.loading = false,
|
||||||
this.onEdit,
|
this.onEdit,
|
||||||
this.client,
|
this.client,
|
||||||
@ -72,7 +72,7 @@ class ContentBanner extends StatelessWidget {
|
|||||||
onPressed: onEdit,
|
onPressed: onEdit,
|
||||||
backgroundColor: Theme.of(context).backgroundColor,
|
backgroundColor: Theme.of(context).backgroundColor,
|
||||||
foregroundColor: Theme.of(context).textTheme.bodyText1.color,
|
foregroundColor: Theme.of(context).textTheme.bodyText1.color,
|
||||||
child: const Icon(CupertinoIcons.camera),
|
child: const Icon(Icons.camera_alt_outlined),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user