Compare commits

..

2 Commits

Author SHA1 Message Date
db808650e3 💄 Optimized settings 2024-09-13 23:19:33 +08:00
c1cbcbe734 ⬆️ Upgrade flutter + deps 2024-09-13 22:51:17 +08:00
11 changed files with 101 additions and 107 deletions

View File

@@ -76,8 +76,8 @@
"firstName": "First Name",
"lastName": "Last Name",
"account": "Account",
"accountPersonalize": "Personalize",
"accountPersonalizeApplied": "Account personalize settings has been saved.",
"accountProfile": "Your profile",
"accountProfileApplied": "Account profile has been saved.",
"accountStickers": "Stickers",
"accountFriend": "Friend",
"accountFriendNew": "New friend",

View File

@@ -81,8 +81,8 @@
"firstName": "名称",
"lastName": "姓氏",
"account": "账号",
"accountPersonalize": "个性化",
"accountPersonalizeApplied": "账户的个性化设置已保存。",
"accountProfile": "个人资料",
"accountProfileApplied": "账户的资料已保存。",
"accountStickers": "贴图",
"accountFriend": "好友",
"accountFriendNew": "添加好友",

View File

@@ -58,7 +58,7 @@ PODS:
- Firebase/Analytics (= 11.0.0)
- firebase_core
- Flutter
- firebase_core (3.4.0):
- firebase_core (3.4.1):
- Firebase/CoreOnly (= 11.0.0)
- Flutter
- firebase_crashlytics (4.1.0):
@@ -221,7 +221,7 @@ PODS:
- TOCropViewController (~> 2.7.4)
- image_picker_ios (0.0.1):
- Flutter
- livekit_client (2.2.4):
- livekit_client (2.2.5):
- Flutter
- WebRTC-SDK (= 125.6422.04)
- media_kit_libs_ios_video (1.0.4):
@@ -414,7 +414,7 @@ SPEC CHECKSUMS:
file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655
Firebase: 9f574c08c2396885b5e7e100ed4293d956218af9
firebase_analytics: 1a66fe8d4375eccff44671ea37897683a78b2675
firebase_core: ceec591a66629daaee82d3321551692c4a871493
firebase_core: ba84e940cf5cbbc601095f86556560937419195c
firebase_crashlytics: e4f04180f443d5a8b56fbc0685bdbd7d90dd26f0
firebase_messaging: 15d8b557010f3bb7b98d0302e1c7c8fbcd244425
firebase_performance: d373c742649e2d85d92cc223b4511c3d132887ef
@@ -442,7 +442,7 @@ SPEC CHECKSUMS:
GoogleUtilities: 26a3abef001b6533cf678d3eb38fd3f614b7872d
image_cropper: 37d40f62177c101ff4c164906d259ea2c3aa70cf
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
livekit_client: d079c5f040d4bf2b80440ff0ae997725a183e4bc
livekit_client: 9c8080879256a0fb16da13c9be4845248209d896
media_kit_libs_ios_video: a5fe24bc7875ccd6378a0978c13185e1344651c1
media_kit_native_event_loop: e6b2ab20cf0746eb1c33be961fcf79667304fa2a
media_kit_video: 5da63f157170e5bf303bf85453b7ef6971218a2e

View File

@@ -246,7 +246,7 @@ abstract class AppRouter {
),
GoRoute(
path: '/account/personalize',
name: 'accountPersonalize',
name: 'accountProfile',
builder: (context, state) => TitleShell(
state: state,
child: const PersonalizeScreen(),

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:gap/gap.dart';
import 'package:get/get.dart';
import 'package:solian/models/account.dart';
import 'package:solian/providers/auth.dart';
@@ -23,9 +24,9 @@ class _AccountScreenState extends State<AccountScreen> {
Widget build(BuildContext context) {
final actionItems = [
(
const Icon(Icons.color_lens),
'accountPersonalize'.tr,
'accountPersonalize',
const Icon(Icons.face),
'accountProfile'.tr,
'accountProfile',
),
(
Obx(() {
@@ -47,9 +48,9 @@ class _AccountScreenState extends State<AccountScreen> {
'accountFriend',
),
(
const Icon(Icons.emoji_symbols),
'accountStickers'.tr,
'accountStickers',
const Icon(Icons.emoji_symbols),
'accountStickers'.tr,
'accountStickers',
),
];
@@ -64,7 +65,7 @@ class _AccountScreenState extends State<AccountScreen> {
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
ActionCard(
_ActionCard(
icon: Icon(
Icons.login,
color: Theme.of(context).colorScheme.onPrimary,
@@ -85,7 +86,7 @@ class _AccountScreenState extends State<AccountScreen> {
});
},
),
ActionCard(
_ActionCard(
icon: Icon(
Icons.add,
color: Theme.of(context).colorScheme.onPrimary,
@@ -104,6 +105,19 @@ class _AccountScreenState extends State<AccountScreen> {
});
},
),
const Gap(4),
TextButton(
style: const ButtonStyle(
visualDensity: VisualDensity(
horizontal: -4,
vertical: -2,
),
),
onPressed: () {
AppRouter.instance.pushNamed('settings');
},
child: Text('settings'.tr),
),
],
),
);
@@ -126,6 +140,18 @@ class _AccountScreenState extends State<AccountScreen> {
},
),
)),
const Divider(thickness: 0.3, height: 1)
.paddingSymmetric(vertical: 4),
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 34),
leading: const Icon(Icons.settings),
title: Text('settings'.tr),
onTap: () {
AppRouter.instance.pushNamed('settings');
},
),
const Divider(thickness: 0.3, height: 1)
.paddingSymmetric(vertical: 4),
ListTile(
contentPadding: const EdgeInsets.symmetric(horizontal: 34),
leading: const Icon(Icons.logout),
@@ -186,13 +212,13 @@ class _AccountHeadingState extends State<AccountHeading> {
}
}
class ActionCard extends StatelessWidget {
class _ActionCard extends StatelessWidget {
final Widget icon;
final String title;
final String caption;
final Function onTap;
const ActionCard({
const _ActionCard({
super.key,
required this.onTap,
required this.title,

View File

@@ -134,7 +134,7 @@ class _PersonalizeScreenState extends State<PersonalizeScreen> {
);
if (resp.statusCode == 200) {
_syncWidget();
context.showSnackbar('accountPersonalizeApplied'.tr);
context.showSnackbar('accountProfileApplied'.tr);
} else {
context.showErrorDialog(resp.bodyString);
}
@@ -163,7 +163,7 @@ class _PersonalizeScreenState extends State<PersonalizeScreen> {
);
if (resp.statusCode == 200) {
_syncWidget();
context.showSnackbar('accountPersonalizeApplied'.tr);
context.showSnackbar('accountProfileApplied'.tr);
} else {
context.showErrorDialog(resp.bodyString);
}

View File

@@ -82,32 +82,27 @@ class _SettingScreenState extends State<SettingScreen> {
).paddingSymmetric(horizontal: 12, vertical: 8),
),
_buildCaptionHeader('more'.tr),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
TextButton(
style: const ButtonStyle(
visualDensity: VisualDensity(horizontal: -4, vertical: -4),
),
child: Text('about'.tr),
onPressed: () {
AppRouter.instance.pushNamed('about');
},
),
TextButton(
style: const ButtonStyle(
visualDensity: VisualDensity(horizontal: -4, vertical: -4),
),
child: Text('messageHistoryWipe'.tr),
onPressed: () {
final chatHistory = ChatEventController();
chatHistory.initialize().then((_) async {
await chatHistory.database.localEvents.wipeLocalEvents();
});
},
),
],
).paddingSymmetric(horizontal: 12, vertical: 8),
ListTile(
leading: const Icon(Icons.info_outline),
trailing: const Icon(Icons.chevron_right),
contentPadding: const EdgeInsets.symmetric(horizontal: 22),
title: Text('about'.tr),
onTap: () {
AppRouter.instance.pushNamed('about');
},
),
ListTile(
leading: const Icon(Icons.delete_sweep),
trailing: const Icon(Icons.chevron_right),
contentPadding: const EdgeInsets.symmetric(horizontal: 22),
title: Text('messageHistoryWipe'.tr),
onTap: () {
final chatHistory = ChatEventController();
chatHistory.initialize().then((_) async {
await chatHistory.database.localEvents.wipeLocalEvents();
});
},
),
],
),
);

View File

@@ -20,7 +20,7 @@ abstract class AppNavigation {
),
AppNavigationDestination(
icon: Icons.forum,
label: 'channelTypeDirect'.tr,
label: 'chat'.tr,
page: 'chat',
),
];

View File

@@ -269,43 +269,16 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer>
),
const Divider(thickness: 0.3, height: 1),
Expanded(
child: AppNavigationRegion(
isCollapsed: _isCollapsed,
child: Material(
color: Theme.of(context).colorScheme.surface,
child: AppNavigationRegion(
isCollapsed: _isCollapsed,
),
),
),
const Divider(thickness: 0.3, height: 1),
Column(
children: [
if (_isCollapsed)
Tooltip(
message: 'settings'.tr,
child: InkWell(
child: const Icon(
Icons.settings,
size: 20,
).paddingSymmetric(
horizontal: 28,
vertical: 10,
),
onTap: () {
AppRouter.instance.pushNamed('settings');
_closeDrawer();
},
),
)
else
ListTile(
minTileHeight: 0,
contentPadding: const EdgeInsets.symmetric(
horizontal: 20,
),
leading: const Icon(Icons.settings, size: 20).paddingAll(2),
title: Text('settings'.tr),
onTap: () {
AppRouter.instance.pushNamed('settings');
_closeDrawer();
},
),
if (_isCollapsed)
Tooltip(
message: 'expand'.tr,

View File

@@ -13,10 +13,10 @@ packages:
dependency: transitive
description:
name: _flutterfire_internals
sha256: "9371d13b8ee442e3bfc08a24e3a1b3742c839abbfaf5eef11b79c4b862c89bf7"
sha256: ddc6f775260b89176d329dee26f88b9469ef46aa3228ff6a0b91caf2b2989692
url: "https://pub.dev"
source: hosted
version: "1.3.41"
version: "1.3.42"
_macros:
dependency: transitive
description: dart
@@ -306,10 +306,10 @@ packages:
dependency: transitive
description:
name: dart_webrtc
sha256: ac7ef077084b3e54004716f1d736fcd839e1b60bc3f21f4122a35a9bb5ca2e47
sha256: c664ad88d5646735753add421ee2118486c100febef5e92b7f59cdbabf6a51f6
url: "https://pub.dev"
source: hosted
version: "1.4.8"
version: "1.4.9"
dbus:
dependency: transitive
description:
@@ -426,10 +426,10 @@ packages:
dependency: "direct main"
description:
name: file_picker
sha256: "825aec673606875c33cd8d3c4083f1a3c3999015a84178b317b7ef396b7384f3"
sha256: "167bb619cdddaa10ef2907609feb8a79c16dfa479d3afaf960f8e223f754bf12"
url: "https://pub.dev"
source: hosted
version: "8.0.7"
version: "8.1.2"
file_selector_linux:
dependency: transitive
description:
@@ -490,10 +490,10 @@ packages:
dependency: "direct main"
description:
name: firebase_core
sha256: "06537da27db981947fa535bb91ca120b4e9cb59cb87278dbdde718558cafc9ff"
sha256: "40921de9795fbf5887ed5c0adfdf4972d5a8d7ae7e1b2bb98dea39bc02626a88"
url: "https://pub.dev"
source: hosted
version: "3.4.0"
version: "3.4.1"
firebase_core_platform_interface:
dependency: transitive
description:
@@ -506,10 +506,10 @@ packages:
dependency: transitive
description:
name: firebase_core_web
sha256: "362e52457ed2b7b180964769c1e04d1e0ea0259fdf7025fdfedd019d4ae2bd88"
sha256: f4ee170441ca141c5f9ee5ad8737daba3ee9c8e7efb6902aee90b4fbd178ce25
url: "https://pub.dev"
source: hosted
version: "2.17.5"
version: "2.18.0"
firebase_crashlytics:
dependency: "direct main"
description:
@@ -538,18 +538,18 @@ packages:
dependency: transitive
description:
name: firebase_messaging_platform_interface
sha256: "26c5370d3a79b15c8032724a68a4741e28f63e1f1a45699c4f0a8ae740aadd72"
sha256: d8a4984635f09213302243ea670fe5c42f3261d7d8c7c0a5f7dcd5d6c84be459
url: "https://pub.dev"
source: hosted
version: "4.5.43"
version: "4.5.44"
firebase_messaging_web:
dependency: transitive
description:
name: firebase_messaging_web
sha256: "58276cd5d9e22a9320ef9e5bc358628920f770f93c91221f8b638e8346ed5df4"
sha256: "258b9d637965db7855299b123533609ed95e52350746a723dfd1d8d6f3fac678"
url: "https://pub.dev"
source: hosted
version: "3.8.13"
version: "3.9.0"
firebase_performance:
dependency: "direct main"
description:
@@ -849,10 +849,10 @@ packages:
dependency: "direct main"
description:
name: flutter_webrtc
sha256: "67faa07cf49392b50b1aa14590a83caa64d2109345fabd29899dcd8da8538348"
sha256: f6800cc2af79018c12e955ddf8ad007891fdfbb8199b0ce3dccd0977ed2add9c
url: "https://pub.dev"
source: hosted
version: "0.11.6+hotfix.1"
version: "0.11.7"
font_awesome_flutter:
dependency: "direct main"
description:
@@ -1169,10 +1169,10 @@ packages:
dependency: "direct main"
description:
name: livekit_client
sha256: fc86a8b65b74b41faef646cc671c1892a457c24fd69910e25f7a50dc8cdd3155
sha256: "5df9b6f153b5f2c59fbf116b41e54597dfe8b2340b6630f7d8869887a9e58f44"
url: "https://pub.dev"
source: hosted
version: "2.2.4"
version: "2.2.5"
logging:
dependency: transitive
description:
@@ -1369,10 +1369,10 @@ packages:
dependency: "direct main"
description:
name: pasteboard
sha256: "1c8b6a8b3f1d12e55d4e9404433cda1b4abe66db6b17bc2d2fb5965772c04674"
sha256: "7bf733f3a00c7188ec1f2c6f0612854248b302cf91ef3611a2b7bb141c0f9d55"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.3.0"
path:
dependency: "direct main"
description:
@@ -1721,10 +1721,10 @@ packages:
dependency: "direct main"
description:
name: share_plus
sha256: "59dfd53f497340a0c3a81909b220cfdb9b8973a91055c4e5ab9b9b9ad7c513c0"
sha256: "468c43f285207c84bcabf5737f33b914ceb8eb38398b91e5e3ad1698d1b72a52"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
version: "10.0.2"
share_plus_platform_interface:
dependency: transitive
description:
@@ -1886,10 +1886,10 @@ packages:
dependency: transitive
description:
name: sqlite3
sha256: fde692580bee3379374af1f624eb3e113ab2865ecb161dbe2d8ac2de9735dbdb
sha256: "45f168ae2213201b54e09429ed0c593dc2c88c924a1488d6f9c523a255d567cb"
url: "https://pub.dev"
source: hosted
version: "2.4.5"
version: "2.4.6"
sqlparser:
dependency: transitive
description:
@@ -2166,10 +2166,10 @@ packages:
dependency: transitive
description:
name: web
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "1.0.0"
web_socket:
dependency: transitive
description:

View File

@@ -44,7 +44,7 @@ dependencies:
sqflite: ^2.3.3+1
protocol_handler: ^0.2.0
markdown: ^7.2.2
pasteboard: ^0.2.0
pasteboard: ^0.3.0
desktop_drop: ^0.4.4
badges: ^3.1.2
flutter_card_swiper: ^7.0.1