Fix ui bugs
This commit is contained in:
@@ -6,7 +6,8 @@ import 'package:hiddify/features/common/adaptive_root_scaffold.dart';
|
|||||||
bool showDrawerButton(BuildContext context) {
|
bool showDrawerButton(BuildContext context) {
|
||||||
if (!useMobileRouter) return true;
|
if (!useMobileRouter) return true;
|
||||||
final String location = GoRouterState.of(context).uri.path;
|
final String location = GoRouterState.of(context).uri.path;
|
||||||
if (location == const HomeRoute().location) return true;
|
if (location == const HomeRoute().location ||
|
||||||
|
location == const ProfilesRoute().location) return true;
|
||||||
if (location.startsWith(const ProxiesRoute().location)) return true;
|
if (location.startsWith(const ProxiesRoute().location)) return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -345,6 +345,7 @@ class ProfileSubscriptionInfo extends HookConsumerWidget {
|
|||||||
children: [
|
children: [
|
||||||
Directionality(
|
Directionality(
|
||||||
textDirection: TextDirection.ltr,
|
textDirection: TextDirection.ltr,
|
||||||
|
child: Flexible(
|
||||||
child: Text(
|
child: Text(
|
||||||
subInfo.total > 10 * 1099511627776 //10TB
|
subInfo.total > 10 * 1099511627776 //10TB
|
||||||
? "∞ GiB"
|
? "∞ GiB"
|
||||||
@@ -355,11 +356,16 @@ class ProfileSubscriptionInfo extends HookConsumerWidget {
|
|||||||
total: subInfo.total.sizeGB(),
|
total: subInfo.total.sizeGB(),
|
||||||
),
|
),
|
||||||
style: theme.textTheme.bodySmall,
|
style: theme.textTheme.bodySmall,
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(
|
),
|
||||||
|
Flexible(
|
||||||
|
child: Text(
|
||||||
remaining.$1,
|
remaining.$1,
|
||||||
style: theme.textTheme.bodySmall?.copyWith(color: remaining.$2),
|
style: theme.textTheme.bodySmall?.copyWith(color: remaining.$2),
|
||||||
|
overflow: TextOverflow.ellipsis,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import 'package:dartx/dartx.dart';
|
import 'package:dartx/dartx.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:gap/gap.dart';
|
|
||||||
import 'package:hiddify/core/core_providers.dart';
|
import 'package:hiddify/core/core_providers.dart';
|
||||||
import 'package:hiddify/core/router/router.dart';
|
import 'package:hiddify/core/router/router.dart';
|
||||||
import 'package:hiddify/domain/failures.dart';
|
import 'package:hiddify/domain/failures.dart';
|
||||||
@@ -30,13 +29,18 @@ class HomePage extends HookConsumerWidget {
|
|||||||
CustomScrollView(
|
CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
NestedAppBar(
|
NestedAppBar(
|
||||||
title: Row(
|
title: Text.rich(
|
||||||
|
TextSpan(
|
||||||
children: [
|
children: [
|
||||||
Text(t.general.appTitle),
|
TextSpan(text: t.general.appTitle),
|
||||||
const Gap(4),
|
const TextSpan(text: " "),
|
||||||
const AppVersionLabel(),
|
const WidgetSpan(
|
||||||
|
child: AppVersionLabel(),
|
||||||
|
alignment: PlaceholderAlignment.middle,
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
actions: [
|
actions: [
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: () => const AddProfileRoute().push(context),
|
onPressed: () => const AddProfileRoute().push(context),
|
||||||
|
|||||||
@@ -21,17 +21,17 @@ class IntroPage extends HookConsumerWidget with PresLogger {
|
|||||||
|
|
||||||
final isStarting = useState(false);
|
final isStarting = useState(false);
|
||||||
|
|
||||||
return Scaffold(
|
return SafeArea(
|
||||||
|
child: Scaffold(
|
||||||
body: CustomScrollView(
|
body: CustomScrollView(
|
||||||
shrinkWrap: true,
|
shrinkWrap: true,
|
||||||
slivers: [
|
slivers: [
|
||||||
const SliverGap(24),
|
|
||||||
SliverToBoxAdapter(
|
SliverToBoxAdapter(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: 248,
|
width: 224,
|
||||||
height: 248,
|
height: 224,
|
||||||
child: Padding(
|
child: Padding(
|
||||||
padding: const EdgeInsets.all(36),
|
padding: const EdgeInsets.all(24),
|
||||||
child: Assets.images.logo.svg(),
|
child: Assets.images.logo.svg(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -41,11 +41,11 @@ class IntroPage extends HookConsumerWidget with PresLogger {
|
|||||||
child: MultiSliver(
|
child: MultiSliver(
|
||||||
children: [
|
children: [
|
||||||
const LocalePrefTile(),
|
const LocalePrefTile(),
|
||||||
const SliverGap(8),
|
const SliverGap(4),
|
||||||
const RegionPrefTile(),
|
const RegionPrefTile(),
|
||||||
const SliverGap(8),
|
const SliverGap(4),
|
||||||
const EnableAnalyticsPrefTile(),
|
const EnableAnalyticsPrefTile(),
|
||||||
const SliverGap(8),
|
const SliverGap(4),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||||
child: Text.rich(
|
child: Text.rich(
|
||||||
@@ -102,6 +102,7 @@ class IntroPage extends HookConsumerWidget with PresLogger {
|
|||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class BottomSheetPage extends Page {
|
|||||||
Route<void> createRoute(BuildContext context) {
|
Route<void> createRoute(BuildContext context) {
|
||||||
return ModalBottomSheetRoute(
|
return ModalBottomSheetRoute(
|
||||||
settings: this,
|
settings: this,
|
||||||
isScrollControlled: !fixed,
|
isScrollControlled: true,
|
||||||
useSafeArea: true,
|
useSafeArea: true,
|
||||||
showDragHandle: true,
|
showDragHandle: true,
|
||||||
builder: (_) {
|
builder: (_) {
|
||||||
|
|||||||
Reference in New Issue
Block a user