Change icons
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:hiddify/core/localization/translations.dart';
|
||||
import 'package:hiddify/core/widget/adaptive_icon.dart';
|
||||
import 'package:hiddify/core/widget/animated_visibility.dart';
|
||||
import 'package:hiddify/core/widget/tip_card.dart';
|
||||
import 'package:hiddify/features/geo_asset/overview/geo_assets_overview_notifier.dart';
|
||||
import 'package:hiddify/features/geo_asset/widget/geo_asset_tile.dart';
|
||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||
@@ -22,6 +25,7 @@ class GeoAssetsOverviewPage extends HookConsumerWidget {
|
||||
pinned: true,
|
||||
actions: [
|
||||
PopupMenuButton(
|
||||
icon: Icon(AdaptiveIcon(context).more),
|
||||
itemBuilder: (context) {
|
||||
return [
|
||||
PopupMenuItem(
|
||||
@@ -39,13 +43,13 @@ class GeoAssetsOverviewPage extends HookConsumerWidget {
|
||||
),
|
||||
if (state case AsyncData(value: (:final geoip, :final geosite)))
|
||||
SliverPinnedHeader(
|
||||
child: AnimatedSwitcher(
|
||||
duration: const Duration(milliseconds: 200),
|
||||
child: (geoip + geosite)
|
||||
.where((e) => e.$1.active && e.$2 == null)
|
||||
.isNotEmpty
|
||||
? const MissingRoutingAssetsCard()
|
||||
: const SizedBox(),
|
||||
child: AnimatedVisibility(
|
||||
visible: (geoip + geosite)
|
||||
.where((e) => e.$1.active && e.$2 == null)
|
||||
.isNotEmpty,
|
||||
axis: Axis.vertical,
|
||||
child:
|
||||
TipCard(message: t.settings.geoAssets.missingGeoAssetsMsg),
|
||||
),
|
||||
),
|
||||
switch (state) {
|
||||
@@ -96,39 +100,3 @@ class GeoAssetsOverviewPage extends HookConsumerWidget {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class MissingRoutingAssetsCard extends HookConsumerWidget {
|
||||
const MissingRoutingAssetsCard({super.key});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context, WidgetRef ref) {
|
||||
final t = ref.watch(translationsProvider);
|
||||
|
||||
return Card(
|
||||
margin: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
vertical: 4,
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
const Padding(
|
||||
padding: EdgeInsets.all(8.0),
|
||||
child: Icon(Icons.lightbulb),
|
||||
),
|
||||
Expanded(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||
children: [
|
||||
Padding(
|
||||
padding:
|
||||
const EdgeInsets.symmetric(horizontal: 8, vertical: 8),
|
||||
child: Text(t.settings.geoAssets.missingGeoAssetsMsg),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user