neoagent 3.0.1-beta.11 → 3.0.1-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,26 +46,6 @@ Future<void> _openUrl(String url) async {
46
46
  await url_launcher.launchUrl(uri, mode: url_launcher.LaunchMode.externalApplication);
47
47
  }
48
48
 
49
- // ── Plan icon/color helpers ────────────────────────────────────────────────────
50
-
51
- const List<_PlanStyle> _planStyles = <_PlanStyle>[
52
- _PlanStyle(Icons.spa_outlined, Color(0xFF84BA87), Color(0x2084BA87)),
53
- _PlanStyle(Icons.bolt_outlined, Color(0xFFE1B052), Color(0x20E1B052)),
54
- _PlanStyle(Icons.group_outlined, Color(0xFF6FB0A4), Color(0x206FB0A4)),
55
- _PlanStyle(Icons.star_outline, Color(0xFFDE8A78), Color(0x20DE8A78)),
56
- _PlanStyle(Icons.rocket_launch_outlined, Color(0xFFB39DDB), Color(0x20B39DDB)),
57
- ];
58
-
59
- class _PlanStyle {
60
- const _PlanStyle(this.icon, this.color, this.bg);
61
- final IconData icon;
62
- final Color color;
63
- final Color bg;
64
- }
65
-
66
- _PlanStyle _styleForPlan(int index) =>
67
- _planStyles[index % _planStyles.length];
68
-
69
49
  // ── Main panel ────────────────────────────────────────────────────────────────
70
50
 
71
51
  enum _BillingTab { overview, plans, history }
@@ -808,7 +788,18 @@ class _BillingPlansTabState extends State<_BillingPlansTab> {
808
788
  final url = await _c.createCheckoutSession(planId);
809
789
  if (!mounted) return;
810
790
  setState(() => _checkingOut = null);
811
- if (url != null) await _openUrl(url);
791
+ if (url != null) {
792
+ await _openUrl(url);
793
+ } else {
794
+ ScaffoldMessenger.of(context).showSnackBar(
795
+ SnackBar(
796
+ content: Text(
797
+ _c.errorMessage ?? 'Could not start checkout. Check Stripe configuration.',
798
+ ),
799
+ backgroundColor: _danger,
800
+ ),
801
+ );
802
+ }
812
803
  }
813
804
 
814
805
  @override
@@ -855,7 +846,8 @@ class _BillingPlansTabState extends State<_BillingPlansTab> {
855
846
  children: <Widget>[
856
847
  _IntervalToggle(
857
848
  annual: widget.annual,
858
- onToggle: hasAnnual ? widget.onToggleAnnual : null,
849
+ onToggle: widget.onToggleAnnual,
850
+ annualAvailable: hasAnnual,
859
851
  ),
860
852
  if (savingsPct != null && savingsPct > 0) ...<Widget>[
861
853
  const SizedBox(width: 10),
@@ -900,7 +892,6 @@ class _BillingPlansTabState extends State<_BillingPlansTab> {
900
892
  itemCount: plans.length,
901
893
  itemBuilder: (_, i) => _PlanCard(
902
894
  plan: plans[i],
903
- style: _styleForPlan(i),
904
895
  recommended: i == recommendedIndex,
905
896
  current: plans[i]['id'] == currentPlanId,
906
897
  loading: _checkingOut == plans[i]['id'] as String?,
@@ -916,10 +907,15 @@ class _BillingPlansTabState extends State<_BillingPlansTab> {
916
907
  }
917
908
 
918
909
  class _IntervalToggle extends StatelessWidget {
919
- const _IntervalToggle({required this.annual, this.onToggle});
910
+ const _IntervalToggle({
911
+ required this.annual,
912
+ required this.onToggle,
913
+ this.annualAvailable = true,
914
+ });
920
915
 
921
916
  final bool annual;
922
- final ValueChanged<bool>? onToggle;
917
+ final ValueChanged<bool> onToggle;
918
+ final bool annualAvailable;
923
919
 
924
920
  @override
925
921
  Widget build(BuildContext context) {
@@ -933,8 +929,8 @@ class _IntervalToggle extends StatelessWidget {
933
929
  child: Row(
934
930
  mainAxisSize: MainAxisSize.min,
935
931
  children: <Widget>[
936
- _pill('Monthly', !annual, () => onToggle?.call(false)),
937
- _pill('Annual', annual, () => onToggle?.call(true)),
932
+ _pill('Monthly', !annual, () => onToggle(false)),
933
+ _pill('Annual', annual, annualAvailable ? () => onToggle(true) : null),
938
934
  ],
939
935
  ),
940
936
  );
@@ -966,7 +962,6 @@ class _IntervalToggle extends StatelessWidget {
966
962
  class _PlanCard extends StatelessWidget {
967
963
  const _PlanCard({
968
964
  required this.plan,
969
- required this.style,
970
965
  required this.recommended,
971
966
  required this.current,
972
967
  required this.loading,
@@ -974,7 +969,6 @@ class _PlanCard extends StatelessWidget {
974
969
  });
975
970
 
976
971
  final Map<String, dynamic> plan;
977
- final _PlanStyle style;
978
972
  final bool recommended;
979
973
  final bool current;
980
974
  final bool loading;
@@ -1007,39 +1001,23 @@ class _PlanCard extends StatelessWidget {
1007
1001
  child: Column(
1008
1002
  crossAxisAlignment: CrossAxisAlignment.start,
1009
1003
  children: <Widget>[
1010
- // Icon + name
1011
- Row(
1004
+ // Plan name + description
1005
+ Column(
1006
+ crossAxisAlignment: CrossAxisAlignment.start,
1012
1007
  children: <Widget>[
1013
- Container(
1014
- width: 42,
1015
- height: 42,
1016
- decoration: BoxDecoration(
1017
- color: style.bg,
1018
- borderRadius: BorderRadius.circular(12),
1019
- ),
1020
- child: Icon(style.icon, color: style.color, size: 20),
1021
- ),
1022
- const SizedBox(width: 12),
1023
- Expanded(
1024
- child: Column(
1025
- crossAxisAlignment: CrossAxisAlignment.start,
1026
- children: <Widget>[
1027
- Text(name,
1028
- style: GoogleFonts.geist(
1029
- fontSize: 17,
1030
- fontWeight: FontWeight.w800,
1031
- color: _textPrimary,
1032
- letterSpacing: -0.3,
1033
- )),
1034
- if (desc.isNotEmpty)
1035
- Text(desc,
1036
- style: TextStyle(
1037
- fontSize: 12, color: _textMuted),
1038
- maxLines: 1,
1039
- overflow: TextOverflow.ellipsis),
1040
- ],
1041
- ),
1042
- ),
1008
+ Text(name,
1009
+ style: GoogleFonts.geist(
1010
+ fontSize: 17,
1011
+ fontWeight: FontWeight.w800,
1012
+ color: _textPrimary,
1013
+ letterSpacing: -0.3,
1014
+ )),
1015
+ if (desc.isNotEmpty)
1016
+ Text(desc,
1017
+ style: TextStyle(
1018
+ fontSize: 12, color: _textMuted),
1019
+ maxLines: 1,
1020
+ overflow: TextOverflow.ellipsis),
1043
1021
  ],
1044
1022
  ),
1045
1023
  const SizedBox(height: 16),
@@ -1225,7 +1203,7 @@ class _BillingHistoryTabState extends State<_BillingHistoryTab> {
1225
1203
  borderRadius: BorderRadius.circular(6),
1226
1204
  border: Border.all(color: _border),
1227
1205
  ),
1228
- child: Icon(Icons.credit_card_outlined,
1206
+ child: Icon(Icons.credit_card,
1229
1207
  size: 20, color: _textSecondary),
1230
1208
  ),
1231
1209
  const SizedBox(width: 14),
@@ -142,7 +142,7 @@ extension AppSectionX on AppSection {
142
142
  case AppSection.server:
143
143
  return Icons.dns_outlined;
144
144
  case AppSection.billing:
145
- return Icons.credit_card_outlined;
145
+ return Icons.credit_card;
146
146
  }
147
147
  }
148
148
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neoagent",
3
- "version": "3.0.1-beta.11",
3
+ "version": "3.0.1-beta.12",
4
4
  "description": "Self-hosted AI agent for long-running tasks, automation, messaging, device control, and local memory",
5
5
  "license": "AGPL-3.0-only",
6
6
  "main": "server/index.js",
@@ -1 +1 @@
1
- 467d170613101fb1e118e6e6e438becd
1
+ ea6fa5cc59204621d580c6c7ce0cf0ad
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"77e2e94772b6eb43759e34ed1ad7da4674e19c
37
37
 
38
38
  _flutter.loader.load({
39
39
  serviceWorkerSettings: {
40
- serviceWorkerVersion: "3687178864" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
40
+ serviceWorkerVersion: "158549597" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
41
41
  }
42
42
  });