Remove string casing
This commit is contained in:
@@ -1,83 +1,82 @@
|
|||||||
{
|
{
|
||||||
"general": {
|
"general": {
|
||||||
"appTitle": "Hiddify Next",
|
"appTitle": "Hiddify Next",
|
||||||
"reset": "reset",
|
"reset": "Reset",
|
||||||
"toggle": {
|
"toggle": {
|
||||||
"enabled": "enabled",
|
"enabled": "Enabled",
|
||||||
"disabled": "disabled"
|
"disabled": "Disabled"
|
||||||
},
|
},
|
||||||
"sort": "sort",
|
"sort": "Sort",
|
||||||
"sortBy": "sort by"
|
"sortBy": "Sort by"
|
||||||
},
|
},
|
||||||
"home": {
|
"home": {
|
||||||
"pageTitle": "home",
|
"pageTitle": "Home",
|
||||||
"emptyProfilesMsg": "start by adding subscription profile",
|
"emptyProfilesMsg": "Start by adding subscription profile",
|
||||||
"noActiveProfileMsg": "select a profile",
|
"noActiveProfileMsg": "Select a profile",
|
||||||
"connection": {
|
"connection": {
|
||||||
"tapToConnect": "tap to connect",
|
"tapToConnect": "Tap to Connect",
|
||||||
"connecting": "connecting",
|
"connecting": "Connecting",
|
||||||
"disconnecting": "disconnecting",
|
"disconnecting": "Disconnecting",
|
||||||
"connected": "connected"
|
"connected": "Connected"
|
||||||
},
|
},
|
||||||
"stats": {
|
"stats": {
|
||||||
"traffic": "traffic",
|
"traffic": "Traffic",
|
||||||
"trafficTotal": "traffic total",
|
"trafficTotal": "Traffic total",
|
||||||
"uplink": "uplink",
|
"uplink": "Uplink",
|
||||||
"downlink": "downlink"
|
"downlink": "Downlink"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"profile": {
|
"profile": {
|
||||||
"overviewPageTitle": "profiles",
|
"overviewPageTitle": "Profiles",
|
||||||
"detailsPageTitle": "profile",
|
"detailsPageTitle": "Profile",
|
||||||
"subscription": {
|
"subscription": {
|
||||||
"traffic": "traffic",
|
"traffic": "Traffic",
|
||||||
"updatedTimeAgo": "updated ${timeago}",
|
"updatedTimeAgo": "Updated ${timeago}",
|
||||||
"remainingDuration": "${duration} days remaining",
|
"remainingDuration": "${duration} days remaining",
|
||||||
"expired": "expired",
|
"expired": "Expired",
|
||||||
"noTraffic": "no traffic",
|
"noTraffic": "No traffic"
|
||||||
"gigaByte": "GB"
|
|
||||||
},
|
},
|
||||||
"sortBy": {
|
"sortBy": {
|
||||||
"lastUpdate": "Recently updated",
|
"lastUpdate": "Recently updated",
|
||||||
"name": "by Name"
|
"name": "by Name"
|
||||||
},
|
},
|
||||||
"add": {
|
"add": {
|
||||||
"buttonText": "add new profile",
|
"buttonText": "Add New Profile",
|
||||||
"shortBtnTxt": "add new",
|
"shortBtnTxt": "Add New",
|
||||||
"fromClipboard": "add from clipboard",
|
"fromClipboard": "Add From Clipboard",
|
||||||
"scanQr": "Scan QR code",
|
"scanQr": "Scan QR code",
|
||||||
"manually": "add manually",
|
"manually": "Add Manually",
|
||||||
"addingProfileMsg": "adding profile",
|
"addingProfileMsg": "Adding Profile",
|
||||||
"invalidUrlMsg": "unexpected url"
|
"invalidUrlMsg": "Unexpected URL"
|
||||||
},
|
},
|
||||||
"update": {
|
"update": {
|
||||||
"buttonTxt": "update",
|
"buttonTxt": "Update",
|
||||||
"tooltip": "update profile",
|
"tooltip": "update profile",
|
||||||
"failureMsg": "failed to update profile: ${reason}",
|
"failureMsg": "Failed to update profile: ${reason}",
|
||||||
"successMsg": "successfully updated profile"
|
"successMsg": "Successfully updated profile"
|
||||||
},
|
},
|
||||||
"edit": {
|
"edit": {
|
||||||
"buttonTxt": "edit"
|
"buttonTxt": "Edit"
|
||||||
},
|
},
|
||||||
"delete": {
|
"delete": {
|
||||||
"buttonTxt": "delete",
|
"buttonTxt": "Delete",
|
||||||
"confirmationMsg": "delete profile for ever? this can not be undone",
|
"confirmationMsg": "Delete profile for ever? This can not be undone",
|
||||||
"successMsg": "successfully deleted profile"
|
"successMsg": "Successfully deleted profile"
|
||||||
},
|
},
|
||||||
"save": {
|
"save": {
|
||||||
"buttonText": "save",
|
"buttonText": "Save",
|
||||||
"successMsg": "successfully saved profile"
|
"successMsg": "Successfully saved profile"
|
||||||
},
|
},
|
||||||
"detailsForm": {
|
"detailsForm": {
|
||||||
"nameHint": "name",
|
"nameHint": "Name",
|
||||||
"urlHint": "url",
|
"urlHint": "URL",
|
||||||
"emptyNameMsg": "name can't be empty",
|
"emptyNameMsg": "Name can't be empty",
|
||||||
"invalidUrlMsg": "invalid URL"
|
"invalidUrlMsg": "Invalid URL"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"proxies": {
|
"proxies": {
|
||||||
"pageTitle": "proxies",
|
"pageTitle": "Proxies",
|
||||||
"emptyProxiesMsg": "no proxies",
|
"emptyProxiesMsg": "No Proxies",
|
||||||
"delayTestTooltip": "delay test",
|
"delayTestTooltip": "delay test",
|
||||||
"sortTooltip": "sort proxies",
|
"sortTooltip": "sort proxies",
|
||||||
"sortOptions": {
|
"sortOptions": {
|
||||||
@@ -87,12 +86,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"logs": {
|
"logs": {
|
||||||
"pageTitle": "logs",
|
"pageTitle": "Logs",
|
||||||
"clearLogsButtonText": "clear",
|
"clearLogsButtonText": "Clear",
|
||||||
"filterHint": "filter",
|
"filterHint": "Filter",
|
||||||
"allLevelsFilter": "all",
|
"allLevelsFilter": "All",
|
||||||
"shareCoreLogs": "share core logs",
|
"shareCoreLogs": "Share core logs",
|
||||||
"shareAppLogs": "share app logs"
|
"shareAppLogs": "Share app logs"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"pageTitle": "Settings",
|
"pageTitle": "Settings",
|
||||||
@@ -150,12 +149,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"about": {
|
"about": {
|
||||||
"pageTitle": "about",
|
"pageTitle": "About",
|
||||||
"version": "version",
|
"version": "Version",
|
||||||
"whatsNew": "what's new",
|
"sourceCode": "Source Code",
|
||||||
"sourceCode": "source code",
|
"telegramChannel": "Telegram Channel",
|
||||||
"telegramChannel": "telegram channel",
|
"checkForUpdate": "Check for update"
|
||||||
"checkForUpdate": "check for update"
|
|
||||||
},
|
},
|
||||||
"appUpdate": {
|
"appUpdate": {
|
||||||
"dialogTitle": "Update Available",
|
"dialogTitle": "Update Available",
|
||||||
|
|||||||
@@ -34,8 +34,7 @@
|
|||||||
"updatedTimeAgo": "بروزرسانی شده در ${timeago}",
|
"updatedTimeAgo": "بروزرسانی شده در ${timeago}",
|
||||||
"remainingDuration": "${duration} روز باقی مانده",
|
"remainingDuration": "${duration} روز باقی مانده",
|
||||||
"expired": "منقضی شده",
|
"expired": "منقضی شده",
|
||||||
"noTraffic": "پایان ترافیک",
|
"noTraffic": "پایان ترافیک"
|
||||||
"gigaByte": "گیگ"
|
|
||||||
},
|
},
|
||||||
"sortBy": {
|
"sortBy": {
|
||||||
"lastUpdate": "اخیرا بروز شده",
|
"lastUpdate": "اخیرا بروز شده",
|
||||||
@@ -152,7 +151,6 @@
|
|||||||
"about": {
|
"about": {
|
||||||
"pageTitle": "درباره",
|
"pageTitle": "درباره",
|
||||||
"version": "ورژن",
|
"version": "ورژن",
|
||||||
"whatsNew": "تغییرات",
|
|
||||||
"sourceCode": "سورس کد",
|
"sourceCode": "سورس کد",
|
||||||
"telegramChannel": "کانال تلگرام",
|
"telegramChannel": "کانال تلگرام",
|
||||||
"checkForUpdate": "بررسی آپدیت جدید"
|
"checkForUpdate": "بررسی آپدیت جدید"
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import 'package:hiddify/gen/assets.gen.dart';
|
|||||||
import 'package:hiddify/services/service_providers.dart';
|
import 'package:hiddify/services/service_providers.dart';
|
||||||
import 'package:hiddify/utils/utils.dart';
|
import 'package:hiddify/utils/utils.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
|
|
||||||
class AboutPage extends HookConsumerWidget {
|
class AboutPage extends HookConsumerWidget {
|
||||||
const AboutPage({super.key});
|
const AboutPage({super.key});
|
||||||
@@ -52,7 +51,7 @@ class AboutPage extends HookConsumerWidget {
|
|||||||
body: CustomScrollView(
|
body: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
SliverAppBar(
|
SliverAppBar(
|
||||||
title: Text(t.about.pageTitle.titleCase),
|
title: Text(t.about.pageTitle),
|
||||||
),
|
),
|
||||||
...switch (appVersion) {
|
...switch (appVersion) {
|
||||||
AsyncData(:final value) => [
|
AsyncData(:final value) => [
|
||||||
@@ -68,7 +67,7 @@ class AboutPage extends HookConsumerWidget {
|
|||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
t.general.appTitle.titleCase,
|
t.general.appTitle,
|
||||||
style: Theme.of(context).textTheme.titleLarge,
|
style: Theme.of(context).textTheme.titleLarge,
|
||||||
),
|
),
|
||||||
const Gap(4),
|
const Gap(4),
|
||||||
@@ -85,7 +84,7 @@ class AboutPage extends HookConsumerWidget {
|
|||||||
delegate: SliverChildListDelegate(
|
delegate: SliverChildListDelegate(
|
||||||
[
|
[
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(t.about.sourceCode.sentenceCase),
|
title: Text(t.about.sourceCode),
|
||||||
trailing: const Icon(Icons.open_in_new),
|
trailing: const Icon(Icons.open_in_new),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await UriUtils.tryLaunch(
|
await UriUtils.tryLaunch(
|
||||||
@@ -94,7 +93,7 @@ class AboutPage extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(t.about.telegramChannel.sentenceCase),
|
title: Text(t.about.telegramChannel),
|
||||||
trailing: const Icon(Icons.open_in_new),
|
trailing: const Icon(Icons.open_in_new),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await UriUtils.tryLaunch(
|
await UriUtils.tryLaunch(
|
||||||
@@ -103,7 +102,7 @@ class AboutPage extends HookConsumerWidget {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text(t.about.checkForUpdate.sentenceCase),
|
title: Text(t.about.checkForUpdate),
|
||||||
trailing: isCheckingForUpdate
|
trailing: isCheckingForUpdate
|
||||||
? const SizedBox(
|
? const SizedBox(
|
||||||
width: 24,
|
width: 24,
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import 'package:hiddify/domain/app/app.dart';
|
|||||||
import 'package:hiddify/domain/constants.dart';
|
import 'package:hiddify/domain/constants.dart';
|
||||||
import 'package:hiddify/utils/utils.dart';
|
import 'package:hiddify/utils/utils.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
|
|
||||||
// TODO add release notes
|
// TODO add release notes
|
||||||
class NewVersionDialog extends HookConsumerWidget {
|
class NewVersionDialog extends HookConsumerWidget {
|
||||||
@@ -34,7 +33,7 @@ class NewVersionDialog extends HookConsumerWidget {
|
|||||||
final theme = Theme.of(context);
|
final theme = Theme.of(context);
|
||||||
|
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text(t.appUpdate.dialogTitle.titleCase),
|
title: Text(t.appUpdate.dialogTitle),
|
||||||
content: Column(
|
content: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
@@ -78,11 +77,11 @@ class NewVersionDialog extends HookConsumerWidget {
|
|||||||
// TODO add prefs for ignoring version
|
// TODO add prefs for ignoring version
|
||||||
context.pop();
|
context.pop();
|
||||||
},
|
},
|
||||||
child: Text(t.appUpdate.ignoreBtnTxt.titleCase),
|
child: Text(t.appUpdate.ignoreBtnTxt),
|
||||||
),
|
),
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: context.pop,
|
onPressed: context.pop,
|
||||||
child: Text(t.appUpdate.laterBtnTxt.titleCase),
|
child: Text(t.appUpdate.laterBtnTxt),
|
||||||
),
|
),
|
||||||
TextButton(
|
TextButton(
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
@@ -90,7 +89,7 @@ class NewVersionDialog extends HookConsumerWidget {
|
|||||||
Uri.parse(Constants.githubLatestReleaseUrl),
|
Uri.parse(Constants.githubLatestReleaseUrl),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
child: Text(t.appUpdate.updateNowBtnTxt.titleCase),
|
child: Text(t.appUpdate.updateNowBtnTxt),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import 'package:hiddify/features/profiles/notifier/notifier.dart';
|
|||||||
import 'package:hiddify/utils/utils.dart';
|
import 'package:hiddify/utils/utils.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:percent_indicator/percent_indicator.dart';
|
import 'package:percent_indicator/percent_indicator.dart';
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
|
|
||||||
class ProfileTile extends HookConsumerWidget {
|
class ProfileTile extends HookConsumerWidget {
|
||||||
const ProfileTile({
|
const ProfileTile({
|
||||||
@@ -232,7 +231,7 @@ class ProfileActionsMenu extends HookConsumerWidget {
|
|||||||
menuChildren: [
|
menuChildren: [
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
leadingIcon: const Icon(Icons.update),
|
leadingIcon: const Icon(Icons.update),
|
||||||
child: Text(t.profile.update.buttonTxt.titleCase),
|
child: Text(t.profile.update.buttonTxt),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (updateProfileMutation.state.isInProgress) {
|
if (updateProfileMutation.state.isInProgress) {
|
||||||
return;
|
return;
|
||||||
@@ -246,22 +245,22 @@ class ProfileActionsMenu extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
leadingIcon: const Icon(Icons.edit),
|
leadingIcon: const Icon(Icons.edit),
|
||||||
child: Text(t.profile.edit.buttonTxt.titleCase),
|
child: Text(t.profile.edit.buttonTxt),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
await ProfileDetailsRoute(profile.id).push(context);
|
await ProfileDetailsRoute(profile.id).push(context);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
MenuItemButton(
|
MenuItemButton(
|
||||||
leadingIcon: const Icon(Icons.delete),
|
leadingIcon: const Icon(Icons.delete),
|
||||||
child: Text(t.profile.delete.buttonTxt.titleCase),
|
child: Text(t.profile.delete.buttonTxt),
|
||||||
onPressed: () async {
|
onPressed: () async {
|
||||||
if (deleteProfileMutation.state.isInProgress) {
|
if (deleteProfileMutation.state.isInProgress) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
final deleteConfirmed = await showConfirmationDialog(
|
final deleteConfirmed = await showConfirmationDialog(
|
||||||
context,
|
context,
|
||||||
title: t.profile.delete.buttonTxt.titleCase,
|
title: t.profile.delete.buttonTxt,
|
||||||
message: t.profile.delete.confirmationMsg.sentenceCase,
|
message: t.profile.delete.confirmationMsg,
|
||||||
);
|
);
|
||||||
if (deleteConfirmed) {
|
if (deleteConfirmed) {
|
||||||
deleteProfileMutation.setFuture(
|
deleteProfileMutation.setFuture(
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import 'package:hiddify/domain/singbox/singbox.dart';
|
|||||||
import 'package:hiddify/features/common/stats/stats_notifier.dart';
|
import 'package:hiddify/features/common/stats/stats_notifier.dart';
|
||||||
import 'package:hiddify/utils/utils.dart';
|
import 'package:hiddify/utils/utils.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
|
|
||||||
class StatsOverview extends HookConsumerWidget {
|
class StatsOverview extends HookConsumerWidget {
|
||||||
const StatsOverview({super.key});
|
const StatsOverview({super.key});
|
||||||
@@ -23,25 +22,25 @@ class StatsOverview extends HookConsumerWidget {
|
|||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
_StatCard(
|
_StatCard(
|
||||||
title: t.home.stats.traffic.titleCase,
|
title: t.home.stats.traffic,
|
||||||
firstStat: (
|
firstStat: (
|
||||||
label: t.home.stats.uplink.titleCase,
|
label: t.home.stats.uplink,
|
||||||
data: stats.uplink.speed(),
|
data: stats.uplink.speed(),
|
||||||
),
|
),
|
||||||
secondStat: (
|
secondStat: (
|
||||||
label: t.home.stats.downlink.titleCase,
|
label: t.home.stats.downlink,
|
||||||
data: stats.downlink.speed(),
|
data: stats.downlink.speed(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const Gap(8),
|
const Gap(8),
|
||||||
_StatCard(
|
_StatCard(
|
||||||
title: t.home.stats.trafficTotal.titleCase,
|
title: t.home.stats.trafficTotal,
|
||||||
firstStat: (
|
firstStat: (
|
||||||
label: t.home.stats.uplink.titleCase,
|
label: t.home.stats.uplink,
|
||||||
data: stats.uplinkTotal.size(),
|
data: stats.uplinkTotal.size(),
|
||||||
),
|
),
|
||||||
secondStat: (
|
secondStat: (
|
||||||
label: t.home.stats.downlink.titleCase,
|
label: t.home.stats.downlink,
|
||||||
data: stats.downlinkTotal.size(),
|
data: stats.downlinkTotal.size(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import 'package:hiddify/features/common/common.dart';
|
|||||||
import 'package:hiddify/features/home/widgets/widgets.dart';
|
import 'package:hiddify/features/home/widgets/widgets.dart';
|
||||||
import 'package:hiddify/utils/utils.dart';
|
import 'package:hiddify/utils/utils.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
import 'package:sliver_tools/sliver_tools.dart';
|
import 'package:sliver_tools/sliver_tools.dart';
|
||||||
|
|
||||||
class HomePage extends HookConsumerWidget {
|
class HomePage extends HookConsumerWidget {
|
||||||
@@ -30,7 +30,7 @@ class HomePage extends HookConsumerWidget {
|
|||||||
NestedTabAppBar(
|
NestedTabAppBar(
|
||||||
title: Row(
|
title: Row(
|
||||||
children: [
|
children: [
|
||||||
Text(t.general.appTitle.titleCase),
|
Text(t.general.appTitle),
|
||||||
const Gap(4),
|
const Gap(4),
|
||||||
const AppVersionLabel(),
|
const AppVersionLabel(),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import 'package:hiddify/features/common/connectivity/connectivity_controller.dar
|
|||||||
import 'package:hiddify/gen/assets.gen.dart';
|
import 'package:hiddify/gen/assets.gen.dart';
|
||||||
import 'package:hiddify/utils/alerts.dart';
|
import 'package:hiddify/utils/alerts.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
|
|
||||||
// TODO: rewrite
|
// TODO: rewrite
|
||||||
class ConnectionButton extends HookConsumerWidget {
|
class ConnectionButton extends HookConsumerWidget {
|
||||||
@@ -128,7 +127,7 @@ class _ConnectionButton extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
Text(
|
Text(
|
||||||
label.sentenceCase,
|
label,
|
||||||
style: Theme.of(context).textTheme.bodyLarge,
|
style: Theme.of(context).textTheme.bodyLarge,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ 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:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
|
|
||||||
class EmptyProfilesHomeBody extends HookConsumerWidget {
|
class EmptyProfilesHomeBody extends HookConsumerWidget {
|
||||||
const EmptyProfilesHomeBody({super.key});
|
const EmptyProfilesHomeBody({super.key});
|
||||||
@@ -17,12 +16,12 @@ class EmptyProfilesHomeBody extends HookConsumerWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(t.home.emptyProfilesMsg.sentenceCase),
|
Text(t.home.emptyProfilesMsg),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
OutlinedButton.icon(
|
OutlinedButton.icon(
|
||||||
onPressed: () => const AddProfileRoute().push(context),
|
onPressed: () => const AddProfileRoute().push(context),
|
||||||
icon: const Icon(Icons.add),
|
icon: const Icon(Icons.add),
|
||||||
label: Text(t.profile.add.buttonText.titleCase),
|
label: Text(t.profile.add.buttonText),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -42,11 +41,11 @@ class EmptyActiveProfileHomeBody extends HookConsumerWidget {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(t.home.noActiveProfileMsg.sentenceCase),
|
Text(t.home.noActiveProfileMsg),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
OutlinedButton(
|
OutlinedButton(
|
||||||
onPressed: () => const ProfilesRoute().push(context),
|
onPressed: () => const ProfilesRoute().push(context),
|
||||||
child: Text(t.profile.overviewPageTitle.titleCase),
|
child: Text(t.profile.overviewPageTitle),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import 'package:hiddify/features/logs/notifier/notifier.dart';
|
|||||||
import 'package:hiddify/services/service_providers.dart';
|
import 'package:hiddify/services/service_providers.dart';
|
||||||
import 'package:hiddify/utils/utils.dart';
|
import 'package:hiddify/utils/utils.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
import 'package:tint/tint.dart';
|
import 'package:tint/tint.dart';
|
||||||
|
|
||||||
class LogsPage extends HookConsumerWidget with PresLogger {
|
class LogsPage extends HookConsumerWidget with PresLogger {
|
||||||
@@ -29,7 +29,7 @@ class LogsPage extends HookConsumerWidget with PresLogger {
|
|||||||
final List<PopupMenuEntry> popupButtons = debug || PlatformUtils.isDesktop
|
final List<PopupMenuEntry> popupButtons = debug || PlatformUtils.isDesktop
|
||||||
? [
|
? [
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
child: Text(t.logs.shareCoreLogs.sentenceCase),
|
child: Text(t.logs.shareCoreLogs),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await UriUtils.tryShareOrLaunchFile(
|
await UriUtils.tryShareOrLaunchFile(
|
||||||
Uri.parse(filesEditor.coreLogsPath),
|
Uri.parse(filesEditor.coreLogsPath),
|
||||||
@@ -38,7 +38,7 @@ class LogsPage extends HookConsumerWidget with PresLogger {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
child: Text(t.logs.shareAppLogs.sentenceCase),
|
child: Text(t.logs.shareAppLogs),
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await UriUtils.tryShareOrLaunchFile(
|
await UriUtils.tryShareOrLaunchFile(
|
||||||
Uri.parse(filesEditor.appLogsPath),
|
Uri.parse(filesEditor.appLogsPath),
|
||||||
@@ -55,7 +55,7 @@ class LogsPage extends HookConsumerWidget with PresLogger {
|
|||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
// TODO: fix height
|
// TODO: fix height
|
||||||
toolbarHeight: 90,
|
toolbarHeight: 90,
|
||||||
title: Text(t.logs.pageTitle.titleCase),
|
title: Text(t.logs.pageTitle),
|
||||||
actions: [
|
actions: [
|
||||||
if (popupButtons.isNotEmpty)
|
if (popupButtons.isNotEmpty)
|
||||||
PopupMenuButton(
|
PopupMenuButton(
|
||||||
@@ -76,7 +76,7 @@ class LogsPage extends HookConsumerWidget with PresLogger {
|
|||||||
onChanged: notifier.filterMessage,
|
onChanged: notifier.filterMessage,
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
isDense: true,
|
isDense: true,
|
||||||
hintText: t.logs.filterHint.sentenceCase,
|
hintText: t.logs.filterHint,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -92,12 +92,12 @@ class LogsPage extends HookConsumerWidget with PresLogger {
|
|||||||
items: [
|
items: [
|
||||||
DropdownMenuItem(
|
DropdownMenuItem(
|
||||||
value: none(),
|
value: none(),
|
||||||
child: Text(t.logs.allLevelsFilter.sentenceCase),
|
child: Text(t.logs.allLevelsFilter),
|
||||||
),
|
),
|
||||||
...LogLevel.values.takeFirst(3).map(
|
...LogLevel.values.takeFirst(3).map(
|
||||||
(e) => DropdownMenuItem(
|
(e) => DropdownMenuItem(
|
||||||
value: some(e),
|
value: some(e),
|
||||||
child: Text(e.name.sentenceCase),
|
child: Text(e.name),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
@@ -136,7 +136,7 @@ class LogsPage extends HookConsumerWidget with PresLogger {
|
|||||||
body: CustomScrollView(
|
body: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
NestedTabAppBar(
|
NestedTabAppBar(
|
||||||
title: Text(t.logs.pageTitle.titleCase),
|
title: Text(t.logs.pageTitle),
|
||||||
),
|
),
|
||||||
SliverErrorBodyPlaceholder(t.printError(error)),
|
SliverErrorBodyPlaceholder(t.printError(error)),
|
||||||
],
|
],
|
||||||
@@ -148,7 +148,7 @@ class LogsPage extends HookConsumerWidget with PresLogger {
|
|||||||
body: CustomScrollView(
|
body: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
NestedTabAppBar(
|
NestedTabAppBar(
|
||||||
title: Text(t.logs.pageTitle.titleCase),
|
title: Text(t.logs.pageTitle),
|
||||||
),
|
),
|
||||||
const SliverLoadingBodyPlaceholder(),
|
const SliverLoadingBodyPlaceholder(),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -7,7 +7,6 @@ import 'package:hiddify/features/common/confirmation_dialogs.dart';
|
|||||||
import 'package:hiddify/features/profile_detail/notifier/notifier.dart';
|
import 'package:hiddify/features/profile_detail/notifier/notifier.dart';
|
||||||
import 'package:hiddify/utils/utils.dart';
|
import 'package:hiddify/utils/utils.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
|
|
||||||
// TODO: test and improve
|
// TODO: test and improve
|
||||||
// TODO: prevent popping screen when busy
|
// TODO: prevent popping screen when busy
|
||||||
@@ -41,8 +40,7 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
|
|||||||
case MutationFailure(:final failure):
|
case MutationFailure(:final failure):
|
||||||
CustomToast.error(t.printError(failure)).show(context);
|
CustomToast.error(t.printError(failure)).show(context);
|
||||||
case MutationSuccess():
|
case MutationSuccess():
|
||||||
CustomToast.success(t.profile.save.successMsg.sentenceCase)
|
CustomToast.success(t.profile.save.successMsg).show(context);
|
||||||
.show(context);
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback(
|
WidgetsBinding.instance.addPostFrameCallback(
|
||||||
(_) {
|
(_) {
|
||||||
if (context.mounted) context.pop();
|
if (context.mounted) context.pop();
|
||||||
@@ -61,8 +59,7 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
|
|||||||
case MutationFailure(:final failure):
|
case MutationFailure(:final failure):
|
||||||
CustomToast.error(t.printError(failure)).show(context);
|
CustomToast.error(t.printError(failure)).show(context);
|
||||||
case MutationSuccess():
|
case MutationSuccess():
|
||||||
CustomToast.success(t.profile.delete.successMsg.sentenceCase)
|
CustomToast.success(t.profile.delete.successMsg).show(context);
|
||||||
.show(context);
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback(
|
WidgetsBinding.instance.addPostFrameCallback(
|
||||||
(_) {
|
(_) {
|
||||||
if (context.mounted) context.pop();
|
if (context.mounted) context.pop();
|
||||||
@@ -82,7 +79,7 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
|
|||||||
slivers: [
|
slivers: [
|
||||||
SliverAppBar(
|
SliverAppBar(
|
||||||
pinned: true,
|
pinned: true,
|
||||||
title: Text(t.profile.detailsPageTitle.titleCase),
|
title: Text(t.profile.detailsPageTitle),
|
||||||
),
|
),
|
||||||
const SliverGap(8),
|
const SliverGap(8),
|
||||||
SliverPadding(
|
SliverPadding(
|
||||||
@@ -102,7 +99,7 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
|
|||||||
validator: (value) => (value?.isEmpty ?? true)
|
validator: (value) => (value?.isEmpty ?? true)
|
||||||
? t.profile.detailsForm.emptyNameMsg
|
? t.profile.detailsForm.emptyNameMsg
|
||||||
: null,
|
: null,
|
||||||
label: t.profile.detailsForm.nameHint.titleCase,
|
label: t.profile.detailsForm.nameHint,
|
||||||
),
|
),
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
CustomTextFormField(
|
CustomTextFormField(
|
||||||
@@ -142,10 +139,8 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
|
|||||||
final deleteConfirmed =
|
final deleteConfirmed =
|
||||||
await showConfirmationDialog(
|
await showConfirmationDialog(
|
||||||
context,
|
context,
|
||||||
title:
|
title: t.profile.delete.buttonTxt,
|
||||||
t.profile.delete.buttonTxt.titleCase,
|
message: t.profile.delete.confirmationMsg,
|
||||||
message: t.profile.delete.confirmationMsg
|
|
||||||
.sentenceCase,
|
|
||||||
);
|
);
|
||||||
if (deleteConfirmed) {
|
if (deleteConfirmed) {
|
||||||
await notifier.delete();
|
await notifier.delete();
|
||||||
@@ -157,7 +152,7 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
t.profile.delete.buttonTxt.titleCase,
|
t.profile.delete.buttonTxt,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: themeData
|
color: themeData
|
||||||
.colorScheme.onErrorContainer,
|
.colorScheme.onErrorContainer,
|
||||||
@@ -166,8 +161,7 @@ class ProfileDetailPage extends HookConsumerWidget with PresLogger {
|
|||||||
),
|
),
|
||||||
OutlinedButton(
|
OutlinedButton(
|
||||||
onPressed: notifier.save,
|
onPressed: notifier.save,
|
||||||
child:
|
child: Text(t.profile.save.buttonText),
|
||||||
Text(t.profile.save.buttonText.titleCase),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import 'package:hiddify/features/common/qr_code_scanner_screen.dart';
|
|||||||
import 'package:hiddify/features/profiles/notifier/notifier.dart';
|
import 'package:hiddify/features/profiles/notifier/notifier.dart';
|
||||||
import 'package:hiddify/utils/utils.dart';
|
import 'package:hiddify/utils/utils.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
|
|
||||||
class AddProfileModal extends HookConsumerWidget {
|
class AddProfileModal extends HookConsumerWidget {
|
||||||
const AddProfileModal({
|
const AddProfileModal({
|
||||||
@@ -34,8 +33,7 @@ class AddProfileModal extends HookConsumerWidget {
|
|||||||
CustomAlertDialog.fromErr(t.presentError(err)).show(context);
|
CustomAlertDialog.fromErr(t.presentError(err)).show(context);
|
||||||
},
|
},
|
||||||
initialOnSuccess: () {
|
initialOnSuccess: () {
|
||||||
CustomToast.success(t.profile.save.successMsg.sentenceCase)
|
CustomToast.success(t.profile.save.successMsg).show(context);
|
||||||
.show(context);
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback(
|
WidgetsBinding.instance.addPostFrameCallback(
|
||||||
(_) {
|
(_) {
|
||||||
if (context.mounted) context.pop();
|
if (context.mounted) context.pop();
|
||||||
@@ -79,7 +77,7 @@ class AddProfileModal extends HookConsumerWidget {
|
|||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
t.profile.add.addingProfileMsg.sentenceCase,
|
t.profile.add.addingProfileMsg,
|
||||||
style: theme.textTheme.bodySmall,
|
style: theme.textTheme.bodySmall,
|
||||||
),
|
),
|
||||||
const Gap(8),
|
const Gap(8),
|
||||||
@@ -98,7 +96,7 @@ class AddProfileModal extends HookConsumerWidget {
|
|||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
_Button(
|
_Button(
|
||||||
label: t.profile.add.fromClipboard.sentenceCase,
|
label: t.profile.add.fromClipboard,
|
||||||
icon: Icons.content_paste,
|
icon: Icons.content_paste,
|
||||||
size: buttonWidth,
|
size: buttonWidth,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
@@ -117,7 +115,7 @@ class AddProfileModal extends HookConsumerWidget {
|
|||||||
} else {
|
} else {
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
CustomToast.error(
|
CustomToast.error(
|
||||||
t.profile.add.invalidUrlMsg.sentenceCase,
|
t.profile.add.invalidUrlMsg,
|
||||||
).show(context);
|
).show(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -148,7 +146,7 @@ class AddProfileModal extends HookConsumerWidget {
|
|||||||
} else {
|
} else {
|
||||||
if (context.mounted) {
|
if (context.mounted) {
|
||||||
CustomToast.error(
|
CustomToast.error(
|
||||||
t.profile.add.invalidUrlMsg.sentenceCase,
|
t.profile.add.invalidUrlMsg,
|
||||||
).show(context);
|
).show(context);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -156,7 +154,7 @@ class AddProfileModal extends HookConsumerWidget {
|
|||||||
)
|
)
|
||||||
else
|
else
|
||||||
_Button(
|
_Button(
|
||||||
label: t.profile.add.manually.sentenceCase,
|
label: t.profile.add.manually,
|
||||||
icon: Icons.add,
|
icon: Icons.add,
|
||||||
size: buttonWidth,
|
size: buttonWidth,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
@@ -198,7 +196,7 @@ class AddProfileModal extends HookConsumerWidget {
|
|||||||
),
|
),
|
||||||
const Gap(8),
|
const Gap(8),
|
||||||
Text(
|
Text(
|
||||||
t.profile.add.manually.sentenceCase,
|
t.profile.add.manually,
|
||||||
style: theme.textTheme.labelLarge?.copyWith(
|
style: theme.textTheme.labelLarge?.copyWith(
|
||||||
color: theme.colorScheme.primary,
|
color: theme.colorScheme.primary,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import 'package:hiddify/features/common/common.dart';
|
|||||||
import 'package:hiddify/features/profiles/notifier/notifier.dart';
|
import 'package:hiddify/features/profiles/notifier/notifier.dart';
|
||||||
import 'package:hiddify/utils/utils.dart';
|
import 'package:hiddify/utils/utils.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
|
|
||||||
class ProfilesModal extends HookConsumerWidget {
|
class ProfilesModal extends HookConsumerWidget {
|
||||||
const ProfilesModal({
|
const ProfilesModal({
|
||||||
@@ -57,7 +56,7 @@ class ProfilesModal extends HookConsumerWidget {
|
|||||||
const AddProfileRoute().push(context);
|
const AddProfileRoute().push(context);
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.add),
|
icon: const Icon(Icons.add),
|
||||||
label: Text(t.profile.add.shortBtnTxt.titleCase),
|
label: Text(t.profile.add.shortBtnTxt),
|
||||||
),
|
),
|
||||||
FilledButton.icon(
|
FilledButton.icon(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@@ -69,7 +68,7 @@ class ProfilesModal extends HookConsumerWidget {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
icon: const Icon(Icons.sort),
|
icon: const Icon(Icons.sort),
|
||||||
label: Text(t.general.sort.titleCase),
|
label: Text(t.general.sort),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -88,7 +87,7 @@ class ProfilesSortModal extends HookConsumerWidget {
|
|||||||
final t = ref.watch(translationsProvider);
|
final t = ref.watch(translationsProvider);
|
||||||
|
|
||||||
return AlertDialog(
|
return AlertDialog(
|
||||||
title: Text(t.general.sortBy.titleCase),
|
title: Text(t.general.sortBy),
|
||||||
content: Consumer(
|
content: Consumer(
|
||||||
builder: (context, ref, child) {
|
builder: (context, ref, child) {
|
||||||
final sort = ref.watch(profilesSortNotifierProvider);
|
final sort = ref.watch(profilesSortNotifierProvider);
|
||||||
|
|||||||
@@ -6,7 +6,6 @@ import 'package:hiddify/features/proxies/notifier/notifier.dart';
|
|||||||
import 'package:hiddify/features/proxies/widgets/widgets.dart';
|
import 'package:hiddify/features/proxies/widgets/widgets.dart';
|
||||||
import 'package:hiddify/utils/utils.dart';
|
import 'package:hiddify/utils/utils.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
|
|
||||||
class ProxiesPage extends HookConsumerWidget with PresLogger {
|
class ProxiesPage extends HookConsumerWidget with PresLogger {
|
||||||
const ProxiesPage({super.key});
|
const ProxiesPage({super.key});
|
||||||
@@ -31,13 +30,13 @@ class ProxiesPage extends HookConsumerWidget with PresLogger {
|
|||||||
body: CustomScrollView(
|
body: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
NestedTabAppBar(
|
NestedTabAppBar(
|
||||||
title: Text(t.proxies.pageTitle.titleCase),
|
title: Text(t.proxies.pageTitle),
|
||||||
),
|
),
|
||||||
SliverFillRemaining(
|
SliverFillRemaining(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(t.proxies.emptyProxiesMsg.titleCase),
|
Text(t.proxies.emptyProxiesMsg),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -52,7 +51,7 @@ class ProxiesPage extends HookConsumerWidget with PresLogger {
|
|||||||
body: CustomScrollView(
|
body: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
NestedTabAppBar(
|
NestedTabAppBar(
|
||||||
title: Text(t.proxies.pageTitle.titleCase),
|
title: Text(t.proxies.pageTitle),
|
||||||
actions: [
|
actions: [
|
||||||
PopupMenuButton<ProxiesSort>(
|
PopupMenuButton<ProxiesSort>(
|
||||||
initialValue: sortBy,
|
initialValue: sortBy,
|
||||||
@@ -131,7 +130,7 @@ class ProxiesPage extends HookConsumerWidget with PresLogger {
|
|||||||
),
|
),
|
||||||
floatingActionButton: FloatingActionButton(
|
floatingActionButton: FloatingActionButton(
|
||||||
onPressed: () async => notifier.urlTest(group.tag),
|
onPressed: () async => notifier.urlTest(group.tag),
|
||||||
tooltip: t.proxies.delayTestTooltip.titleCase,
|
tooltip: t.proxies.delayTestTooltip,
|
||||||
child: const Icon(Icons.bolt),
|
child: const Icon(Icons.bolt),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -141,7 +140,7 @@ class ProxiesPage extends HookConsumerWidget with PresLogger {
|
|||||||
body: CustomScrollView(
|
body: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
NestedTabAppBar(
|
NestedTabAppBar(
|
||||||
title: Text(t.proxies.pageTitle.titleCase),
|
title: Text(t.proxies.pageTitle),
|
||||||
),
|
),
|
||||||
SliverErrorBodyPlaceholder(
|
SliverErrorBodyPlaceholder(
|
||||||
t.printError(error),
|
t.printError(error),
|
||||||
@@ -156,7 +155,7 @@ class ProxiesPage extends HookConsumerWidget with PresLogger {
|
|||||||
body: CustomScrollView(
|
body: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
NestedTabAppBar(
|
NestedTabAppBar(
|
||||||
title: Text(t.proxies.pageTitle.titleCase),
|
title: Text(t.proxies.pageTitle),
|
||||||
),
|
),
|
||||||
const SliverLoadingBodyPlaceholder(),
|
const SliverLoadingBodyPlaceholder(),
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import 'package:hiddify/core/core_providers.dart';
|
|||||||
import 'package:hiddify/core/router/router.dart';
|
import 'package:hiddify/core/router/router.dart';
|
||||||
import 'package:hiddify/features/common/stats/stats_overview.dart';
|
import 'package:hiddify/features/common/stats/stats_overview.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
|
|
||||||
class DesktopWrapper extends HookConsumerWidget {
|
class DesktopWrapper extends HookConsumerWidget {
|
||||||
const DesktopWrapper(this.navigator, {super.key});
|
const DesktopWrapper(this.navigator, {super.key});
|
||||||
@@ -19,23 +18,23 @@ class DesktopWrapper extends HookConsumerWidget {
|
|||||||
final destinations = [
|
final destinations = [
|
||||||
NavigationRailDestination(
|
NavigationRailDestination(
|
||||||
icon: const Icon(Icons.power_settings_new),
|
icon: const Icon(Icons.power_settings_new),
|
||||||
label: Text(t.home.pageTitle.titleCase),
|
label: Text(t.home.pageTitle),
|
||||||
),
|
),
|
||||||
NavigationRailDestination(
|
NavigationRailDestination(
|
||||||
icon: const Icon(Icons.filter_list),
|
icon: const Icon(Icons.filter_list),
|
||||||
label: Text(t.proxies.pageTitle.titleCase),
|
label: Text(t.proxies.pageTitle),
|
||||||
),
|
),
|
||||||
NavigationRailDestination(
|
NavigationRailDestination(
|
||||||
icon: const Icon(Icons.article),
|
icon: const Icon(Icons.article),
|
||||||
label: Text(t.logs.pageTitle.titleCase),
|
label: Text(t.logs.pageTitle),
|
||||||
),
|
),
|
||||||
NavigationRailDestination(
|
NavigationRailDestination(
|
||||||
icon: const Icon(Icons.settings),
|
icon: const Icon(Icons.settings),
|
||||||
label: Text(t.settings.pageTitle.titleCase),
|
label: Text(t.settings.pageTitle),
|
||||||
),
|
),
|
||||||
NavigationRailDestination(
|
NavigationRailDestination(
|
||||||
icon: const Icon(Icons.info),
|
icon: const Icon(Icons.info),
|
||||||
label: Text(t.about.pageTitle.titleCase),
|
label: Text(t.about.pageTitle),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import 'package:hiddify/core/core_providers.dart';
|
|||||||
import 'package:hiddify/core/router/router.dart';
|
import 'package:hiddify/core/router/router.dart';
|
||||||
import 'package:hiddify/features/common/common.dart';
|
import 'package:hiddify/features/common/common.dart';
|
||||||
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||||||
import 'package:recase/recase.dart';
|
|
||||||
|
|
||||||
class MobileWrapper extends HookConsumerWidget {
|
class MobileWrapper extends HookConsumerWidget {
|
||||||
const MobileWrapper(this.navigator, {super.key});
|
const MobileWrapper(this.navigator, {super.key});
|
||||||
@@ -30,19 +29,19 @@ class MobileWrapper extends HookConsumerWidget {
|
|||||||
children: [
|
children: [
|
||||||
const Gap(16),
|
const Gap(16),
|
||||||
DrawerTile(
|
DrawerTile(
|
||||||
label: t.settings.pageTitle.titleCase,
|
label: t.settings.pageTitle,
|
||||||
icon: Icons.settings,
|
icon: Icons.settings,
|
||||||
selected: location == SettingsRoute.path,
|
selected: location == SettingsRoute.path,
|
||||||
onSelect: () => const SettingsRoute().push(context),
|
onSelect: () => const SettingsRoute().push(context),
|
||||||
),
|
),
|
||||||
DrawerTile(
|
DrawerTile(
|
||||||
label: t.logs.pageTitle.titleCase,
|
label: t.logs.pageTitle,
|
||||||
icon: Icons.article,
|
icon: Icons.article,
|
||||||
selected: location == LogsRoute.path,
|
selected: location == LogsRoute.path,
|
||||||
onSelect: () => const LogsRoute().push(context),
|
onSelect: () => const LogsRoute().push(context),
|
||||||
),
|
),
|
||||||
DrawerTile(
|
DrawerTile(
|
||||||
label: t.about.pageTitle.titleCase,
|
label: t.about.pageTitle,
|
||||||
icon: Icons.info,
|
icon: Icons.info,
|
||||||
selected: location == AboutRoute.path,
|
selected: location == AboutRoute.path,
|
||||||
onSelect: () => const AboutRoute().push(context),
|
onSelect: () => const AboutRoute().push(context),
|
||||||
@@ -56,11 +55,11 @@ class MobileWrapper extends HookConsumerWidget {
|
|||||||
destinations: [
|
destinations: [
|
||||||
NavigationDestination(
|
NavigationDestination(
|
||||||
icon: const Icon(Icons.power_settings_new),
|
icon: const Icon(Icons.power_settings_new),
|
||||||
label: t.home.pageTitle.titleCase,
|
label: t.home.pageTitle,
|
||||||
),
|
),
|
||||||
NavigationDestination(
|
NavigationDestination(
|
||||||
icon: const Icon(Icons.filter_list),
|
icon: const Icon(Icons.filter_list),
|
||||||
label: t.proxies.pageTitle.titleCase,
|
label: t.proxies.pageTitle,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
selectedIndex: currentIndex > 1 ? 0 : currentIndex,
|
selectedIndex: currentIndex > 1 ? 0 : currentIndex,
|
||||||
|
|||||||
@@ -966,7 +966,7 @@ packages:
|
|||||||
source: hosted
|
source: hosted
|
||||||
version: "2.2.2"
|
version: "2.2.2"
|
||||||
recase:
|
recase:
|
||||||
dependency: "direct main"
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
name: recase
|
name: recase
|
||||||
sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213
|
sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ dependencies:
|
|||||||
intl: ^0.18.1
|
intl: ^0.18.1
|
||||||
slang: ^3.23.0
|
slang: ^3.23.0
|
||||||
slang_flutter: ^3.23.0
|
slang_flutter: ^3.23.0
|
||||||
recase: ^4.1.0
|
|
||||||
timeago: ^3.5.0
|
timeago: ^3.5.0
|
||||||
flutter_localized_locales: ^2.0.4
|
flutter_localized_locales: ^2.0.4
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user