refactor: improve styling and layout in authentication and connection issue pages

- Removed unused flutter_animate dependency to streamline the codebase.
- Adjusted container dimensions and padding in the connection issue page for better layout consistency.
- Updated spacing values and text styles to enhance readability and align with the overall theme.
- Refined border radius and background colors for improved aesthetics in various components.
- Enhanced the user interface by ensuring consistent styling across authentication and connection issue pages.
This commit is contained in:
cogwheel0
2025-10-05 00:59:32 +05:30
parent f924d894dd
commit c98e4bf959
9 changed files with 247 additions and 336 deletions

View File

@@ -2,7 +2,6 @@ import 'dart:io' show Platform;
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';

View File

@@ -61,7 +61,7 @@ class _ConnectionIssuePageState extends ConsumerState<ConnectionIssuePage> {
Expanded(
child: Center(
child: ConstrainedBox(
constraints: const BoxConstraints(maxWidth: 420),
constraints: const BoxConstraints(maxWidth: 480),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.stretch,
@@ -71,13 +71,13 @@ class _ConnectionIssuePageState extends ConsumerState<ConnectionIssuePage> {
const SizedBox(height: Spacing.sm),
_buildServerDetails(context, activeServer),
],
const SizedBox(height: Spacing.md),
const SizedBox(height: Spacing.lg),
Text(
l10n.connectionIssueSubtitle,
textAlign: TextAlign.center,
style: context.conduitTheme.bodyMedium?.copyWith(
color: context.conduitTheme.textSecondary,
height: 1.45,
height: 1.4,
),
),
],
@@ -111,27 +111,30 @@ class _ConnectionIssuePageState extends ConsumerState<ConnectionIssuePage> {
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Container(
width: 72,
height: 72,
width: 64,
height: 64,
decoration: BoxDecoration(
color: context.conduitTheme.surfaceContainerHighest,
color: context.conduitTheme.error.withValues(alpha: 0.1),
shape: BoxShape.circle,
boxShadow: ConduitShadows.high(context),
border: Border.all(
color: context.conduitTheme.error.withValues(alpha: 0.2),
width: BorderWidth.thin,
),
),
child: Icon(
Platform.isIOS
? CupertinoIcons.wifi_exclamationmark
: Icons.wifi_off_rounded,
color: iconColor,
size: 34,
size: 28,
),
),
const SizedBox(height: Spacing.md),
const SizedBox(height: Spacing.lg),
Text(
l10n.connectionIssueTitle,
textAlign: TextAlign.center,
style: context.conduitTheme.headingMedium?.copyWith(
fontWeight: FontWeight.w700,
fontWeight: FontWeight.w600,
color: context.conduitTheme.textPrimary,
),
),

View File

@@ -2,7 +2,6 @@ import 'dart:io' show Platform;
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_animate/flutter_animate.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:go_router/go_router.dart';
import 'package:flutter/services.dart';
@@ -470,9 +469,8 @@ class _ServerConnectionPageState extends ConsumerState<ServerConnectionPage> {
return Column(
children: [
InkWell(
onTap: () => setState(
() => _showAdvancedSettings = !_showAdvancedSettings,
),
onTap: () =>
setState(() => _showAdvancedSettings = !_showAdvancedSettings),
borderRadius: BorderRadius.circular(AppBorderRadius.button),
child: Padding(
padding: const EdgeInsets.symmetric(
@@ -597,7 +595,9 @@ class _ServerConnectionPageState extends ConsumerState<ServerConnectionPage> {
const SizedBox(width: Spacing.sm),
ConduitIconButton(
icon: Platform.isIOS ? CupertinoIcons.plus : Icons.add,
onPressed: _customHeaders.length >= 10 ? null : _addCustomHeader,
onPressed: _customHeaders.length >= 10
? null
: _addCustomHeader,
tooltip: _customHeaders.length >= 10
? AppLocalizations.of(context)!.maximumHeadersReached
: AppLocalizations.of(context)!.addHeader,