Compare commits
2 Commits
415446e3bb
...
f3b7b02e77
Author | SHA1 | Date | |
---|---|---|---|
f3b7b02e77 | |||
687db37daf |
@ -10,6 +10,7 @@
|
||||
<uses-permission android:name="android.permission.BLUETOOTH" android:maxSdkVersion="30" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="29" />
|
||||
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
|
||||
|
||||
<application
|
||||
android:label="Solian"
|
||||
@ -55,4 +56,4 @@
|
||||
<data android:mimeType="text/plain" />
|
||||
</intent>
|
||||
</queries>
|
||||
</manifest>
|
||||
</manifest>
|
||||
|
@ -1,6 +1,4 @@
|
||||
{
|
||||
"nextVersionAlert": "高强度开发提示",
|
||||
"nextVersionNotice": "您正在使用的是 Solian 2.0 的抢先体验版本,目前稳定分支(sn.solsynth.dev)版本为 1.4。该版本还在持续的开发中,部分功能可能不稳定,也并非所有功能都支持了。您可以通过 TestFlight 回滚到 1.4.X 或者继续体验新版本(sn-next.solsynth.dev)。",
|
||||
"screen": "页面",
|
||||
"screenAbout": "关于",
|
||||
"screenHome": "首页",
|
||||
|
@ -2,11 +2,13 @@ import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:material_symbols_icons/symbols.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:styled_widget/styled_widget.dart';
|
||||
import 'package:surface/providers/sn_network.dart';
|
||||
import 'package:surface/providers/userinfo.dart';
|
||||
import 'package:surface/providers/websocket.dart';
|
||||
import 'package:surface/widgets/account/account_image.dart';
|
||||
import 'package:surface/widgets/app_bar_leading.dart';
|
||||
import 'package:surface/widgets/dialog.dart';
|
||||
@ -123,7 +125,11 @@ class _AuthorizedAccountScreen extends StatelessWidget {
|
||||
'accountLogoutConfirm'.tr(),
|
||||
)
|
||||
.then((value) {
|
||||
if(!context.mounted) return;
|
||||
if (value) ua.logoutUser();
|
||||
final ws = context.read<WebSocketProvider>();
|
||||
ws.disconnect();
|
||||
Hive.deleteFromDisk();
|
||||
});
|
||||
},
|
||||
),
|
||||
|
@ -11,6 +11,8 @@ import 'package:surface/types/auth.dart';
|
||||
import 'package:surface/widgets/dialog.dart';
|
||||
import 'package:url_launcher/url_launcher_string.dart';
|
||||
|
||||
import '../../providers/websocket.dart';
|
||||
|
||||
final Map<int, (String label, IconData icon, bool isOtp)> _factorLabelMap = {
|
||||
0: ('authFactorPassword'.tr(), Symbols.password, false),
|
||||
1: ('authFactorEmail'.tr(), Symbols.email, true),
|
||||
@ -156,6 +158,9 @@ class _LoginCheckScreenState extends State<_LoginCheckScreen> {
|
||||
final user = context.read<UserProvider>();
|
||||
await user.refreshUser();
|
||||
if (!mounted) return;
|
||||
final ws = context.read<WebSocketProvider>();
|
||||
await ws.connect();
|
||||
if (!mounted) return;
|
||||
Navigator.pop(context, true);
|
||||
} catch (err) {
|
||||
context.showErrorDialog(err);
|
||||
|
@ -64,16 +64,6 @@ class _HomeScreenState extends State<HomeScreen> {
|
||||
: MainAxisAlignment.start,
|
||||
children: [
|
||||
if (constraints.maxWidth <= 640) const Gap(8),
|
||||
Card(
|
||||
child: ListTile(
|
||||
isThreeLine: true,
|
||||
leading: const Icon(Symbols.construction),
|
||||
title: Text('nextVersionAlert').tr(),
|
||||
subtitle: Text('nextVersionNotice').tr(),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
vertical: 8, horizontal: 16),
|
||||
),
|
||||
).padding(horizontal: 8),
|
||||
_HomeDashSpecialDayWidget().padding(top: 8, horizontal: 8),
|
||||
StaggeredGrid.count(
|
||||
crossAxisCount: 2,
|
||||
|
@ -1522,6 +1522,14 @@ packages:
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.1.3"
|
||||
screenshot:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: screenshot
|
||||
sha256: "63817697a7835e6ce82add4228e15d233b74d42975c143ad8cfe07009fab866b"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
sdp_transform:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -100,6 +100,7 @@ dependencies:
|
||||
email_validator: ^3.0.0
|
||||
package_info_plus: ^8.1.1
|
||||
intl: ^0.19.0
|
||||
screenshot: ^3.0.0
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
|
Loading…
Reference in New Issue
Block a user