feat: adiciona menu Desenvolvedor as configuracoes, nova modal Sobre e icones da marca TatuChat
- Submenu Desenvolvedor em Configuracoes (Sobre o servidor, Registros, Variaveis e ambiente) - Modal Sobre maior com logo, descricao com link e rodape (codigo-fonte, licenca, fechar) - Descricao legivel no tema dark - Drawer com a logo do projeto e links de support/formulario atualizados - flutter_launcher_icons: regenera icones Android (mipmap + adaptive), Web, iOS, macOS, Windows
This commit is contained in:
@@ -12,7 +12,6 @@ import 'package:tatchat/l10n/l10n.dart';
|
||||
import 'package:tatchat/utils/tatu_share.dart';
|
||||
import 'package:tatchat/widgets/avatar.dart';
|
||||
import 'package:tatchat/widgets/matrix.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
import 'chat_list.dart';
|
||||
|
||||
@@ -109,16 +108,6 @@ class ClientChooserButton extends StatelessWidget {
|
||||
],
|
||||
),
|
||||
),
|
||||
PopupMenuItem(
|
||||
value: SettingsAction.support,
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(Icons.favorite, color: Colors.red),
|
||||
const SizedBox(width: 18),
|
||||
Text(L10n.of(context).supportFluffyChat),
|
||||
],
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
..._bundleEntries(context, matrix, bundles),
|
||||
PopupMenuItem(
|
||||
@@ -249,11 +238,6 @@ class ClientChooserButton extends StatelessWidget {
|
||||
case SettingsAction.invite:
|
||||
TatuShare.shareInviteLink(context);
|
||||
break;
|
||||
case SettingsAction.support:
|
||||
launchUrlString(
|
||||
'https://ko-fi.com/post/How-can-I-support-FluffyChat-J2G325WE6I',
|
||||
);
|
||||
break;
|
||||
case SettingsAction.settings:
|
||||
context.go('/rooms/settings');
|
||||
break;
|
||||
@@ -271,13 +255,4 @@ class ClientChooserButton extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
enum SettingsAction {
|
||||
addAccount,
|
||||
newGroup,
|
||||
setStatus,
|
||||
invite,
|
||||
support,
|
||||
settings,
|
||||
archive,
|
||||
apps,
|
||||
}
|
||||
enum SettingsAction { addAccount, newGroup, setStatus, invite, settings, archive, apps }
|
||||
|
||||
@@ -11,7 +11,6 @@ import 'package:tatchat/l10n/l10n.dart';
|
||||
import 'package:tatchat/utils/tatu_share.dart';
|
||||
import 'package:tatchat/widgets/avatar.dart';
|
||||
import 'package:tatchat/widgets/matrix.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
import 'chat_list.dart';
|
||||
|
||||
@@ -41,10 +40,10 @@ class Sidebar extends StatelessWidget {
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.chat_bubble_outline,
|
||||
size: 22,
|
||||
color: theme.colorScheme.primary,
|
||||
Image.asset(
|
||||
'./assets/logo/mini/logo_mini.png',
|
||||
width: 28,
|
||||
height: 28,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(
|
||||
@@ -115,14 +114,6 @@ class _AccountSection extends StatelessWidget {
|
||||
label: L10n.of(context).settings,
|
||||
onTap: () => context.go('/rooms/settings'),
|
||||
),
|
||||
_ActionTile(
|
||||
icon: Icons.favorite,
|
||||
iconColor: Colors.red,
|
||||
label: L10n.of(context).supportFluffyChat,
|
||||
onTap: () => launchUrlString(
|
||||
'https://ko-fi.com/post/How-can-I-support-FluffyChat-J2G325WE6I',
|
||||
),
|
||||
),
|
||||
const Divider(),
|
||||
for (final bundle in bundles.keys) ...[
|
||||
if (bundles[bundle]!.length != 1 ||
|
||||
|
||||
@@ -4,15 +4,15 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import 'package:async/async.dart';
|
||||
import 'package:tatchat/config/setting_keys.dart';
|
||||
import 'package:tatchat/l10n/l10n.dart';
|
||||
import 'package:tatchat/utils/tatu_share.dart';
|
||||
import 'package:tatchat/utils/platform_infos.dart';
|
||||
import 'package:tatchat/widgets/avatar.dart';
|
||||
import 'package:tatchat/widgets/matrix.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:material_ui/material_ui.dart';
|
||||
import 'package:matrix/matrix.dart' hide Result;
|
||||
import 'package:tatchat/config/setting_keys.dart';
|
||||
import 'package:tatchat/l10n/l10n.dart';
|
||||
import 'package:tatchat/utils/platform_infos.dart';
|
||||
import 'package:tatchat/utils/tatu_share.dart';
|
||||
import 'package:tatchat/widgets/avatar.dart';
|
||||
import 'package:tatchat/widgets/matrix.dart';
|
||||
import 'package:url_launcher/url_launcher.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
@@ -183,18 +183,6 @@ class SettingsView extends StatelessWidget {
|
||||
: null,
|
||||
),
|
||||
Divider(color: theme.dividerColor),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.dns_outlined),
|
||||
title: Text(
|
||||
L10n.of(context).aboutHomeserver(
|
||||
Matrix.of(context).client.userID?.domain ?? 'homeserver',
|
||||
),
|
||||
),
|
||||
onTap: () => context.go('/rooms/settings/homeserver'),
|
||||
tileColor: activeRoute.startsWith('/rooms/settings/homeserver')
|
||||
? theme.colorScheme.surfaceContainerHigh
|
||||
: null,
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.privacy_tip_outlined),
|
||||
title: Text(L10n.of(context).privacy),
|
||||
@@ -205,6 +193,57 @@ class SettingsView extends StatelessWidget {
|
||||
title: Text(L10n.of(context).about),
|
||||
onTap: () => PlatformInfos.showDialog(context),
|
||||
),
|
||||
Theme(
|
||||
data: theme.copyWith(dividerColor: Colors.transparent),
|
||||
child: ExpansionTile(
|
||||
key: const Key('DeveloperMenu'),
|
||||
leading: const Icon(Icons.code_outlined),
|
||||
title: Text(L10n.of(context).developer),
|
||||
tilePadding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
childrenPadding: const EdgeInsets.symmetric(vertical: 4),
|
||||
controlAffinity: ListTileControlAffinity.trailing,
|
||||
children: [
|
||||
ListTile(
|
||||
leading: const Icon(Icons.dns_outlined),
|
||||
title: Text(
|
||||
L10n.of(context).aboutHomeserver(
|
||||
Matrix.of(
|
||||
context,
|
||||
).client.userID?.domain ?? 'homeserver',
|
||||
),
|
||||
),
|
||||
dense: true,
|
||||
contentPadding: const EdgeInsets.only(left: 40, right: 16),
|
||||
onTap: () => context.go('/rooms/settings/homeserver'),
|
||||
tileColor: activeRoute.startsWith(
|
||||
'/rooms/settings/homeserver',
|
||||
)
|
||||
? theme.colorScheme.surfaceContainerHigh
|
||||
: null,
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.list_alt_outlined),
|
||||
title: Text(L10n.of(context).logs),
|
||||
dense: true,
|
||||
contentPadding: const EdgeInsets.only(left: 40, right: 16),
|
||||
onTap: () => context.go('/logs'),
|
||||
tileColor: activeRoute.startsWith('/logs')
|
||||
? theme.colorScheme.surfaceContainerHigh
|
||||
: null,
|
||||
),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.settings_applications_outlined),
|
||||
title: Text(L10n.of(context).environmentVariables),
|
||||
dense: true,
|
||||
contentPadding: const EdgeInsets.only(left: 40, right: 16),
|
||||
onTap: () => context.go('/configs'),
|
||||
tileColor: activeRoute.startsWith('/configs')
|
||||
? theme.colorScheme.surfaceContainerHigh
|
||||
: null,
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Divider(color: theme.dividerColor),
|
||||
ListTile(
|
||||
leading: const Icon(Icons.logout_outlined),
|
||||
|
||||
Reference in New Issue
Block a user