fix(client): 设置页兑换入口空 onTap 修复 + 新增我的订单入口(桌面侧栏 Settings 路径)
- settings_page 的「兑换&购买」行 onTap 之前是空占位 → 接上 open(redeem) - 新增「我的订单」行 → open(orders) - bump 1.0.68+69 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013nMthbVEmQquxBRKb9Fj8u
This commit is contained in:
@@ -7,14 +7,18 @@ import 'dart:io';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../core/responsive/form_factor.dart';
|
||||
import '../l10n/app_text.dart';
|
||||
import '../pangolin_theme.dart';
|
||||
import '../services/web_launch.dart';
|
||||
import '../state/app_providers.dart';
|
||||
import '../state/navigation_provider.dart';
|
||||
import '../state/settings_provider.dart';
|
||||
import '../state/update_provider.dart';
|
||||
import '../widgets/account_screens.dart';
|
||||
import '../widgets/pangolin_icons.dart';
|
||||
import '../widgets/pangolin_toast.dart';
|
||||
import 'orders_page.dart';
|
||||
/// 「检查更新」手动触发:拉取 `$kApiBaseUrl/version`,失败/无更新走轻提示,
|
||||
/// 有更新则清掉「已忽略版本」→ 顶部更新 banner 显示 + toast(不弹窗)。
|
||||
Future<void> _checkForUpdate(BuildContext context, WidgetRef ref, AppText t) async {
|
||||
@@ -51,15 +55,29 @@ class SettingsPage extends ConsumerWidget {
|
||||
Widget sw(bool v, ValueChanged<bool> on) =>
|
||||
Switch(value: v, activeThumbColor: c.accent, onChanged: on);
|
||||
|
||||
// desktop 内容区下钻(切 navView);mobile/tablet 全屏 push(与 account_page 同)。
|
||||
final isDesktop = context.formFactor == FormFactor.desktop;
|
||||
void open(NavView v, Widget mobilePage) {
|
||||
if (isDesktop) {
|
||||
ref.read(navViewProvider.notifier).state = v;
|
||||
} else {
|
||||
Navigator.of(context).push(MaterialPageRoute(builder: (_) => mobilePage));
|
||||
}
|
||||
}
|
||||
|
||||
return SingleChildScrollView(
|
||||
padding: const EdgeInsets.fromLTRB(32, 16, 32, 24),
|
||||
child: ConstrainedBox(
|
||||
constraints: const BoxConstraints(maxWidth: 560),
|
||||
child: Column(crossAxisAlignment: CrossAxisAlignment.stretch, children: [
|
||||
// 兑换入口
|
||||
// 兑换 & 购买 + 我的订单
|
||||
_Card(children: [
|
||||
_Row(title: t.redeemEntry, sub: t.proMember, last: true,
|
||||
right: Icon(PangolinIcons.chevronRight, size: 18, color: c.fg3), onTap: () {}),
|
||||
_Row(title: t.redeemEntry, sub: t.proMember,
|
||||
right: Icon(PangolinIcons.chevronRight, size: 18, color: c.fg3),
|
||||
onTap: () => open(NavView.redeem, RedeemScreen(t: t))),
|
||||
_Row(title: t.ordersTitle, last: true,
|
||||
right: Icon(PangolinIcons.chevronRight, size: 18, color: c.fg3),
|
||||
onTap: () => open(NavView.orders, OrdersScreen(t: t))),
|
||||
]),
|
||||
const SizedBox(height: 16),
|
||||
// 功能开关组(开机自启是桌面端登录项概念,iOS/Android 无此能力,仅桌面显示)
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
name: pangolin_vpn
|
||||
description: 穿山甲 · Pangolin — 极简、稳定、跨平台网络加速客户端。
|
||||
publish_to: "none"
|
||||
version: 1.0.67+68
|
||||
version: 1.0.68+69
|
||||
|
||||
environment:
|
||||
sdk: ^3.5.0
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
; 前置: 先在 client/ 跑 `flutter build windows`(Release),产物在
|
||||
; ..\..\build\windows\x64\runner\Release
|
||||
#define MyAppName "穿山甲 Pangolin"
|
||||
#define MyAppVersion "1.0.67"
|
||||
#define MyAppVersion "1.0.68"
|
||||
#define MyAppPublisher "Pangolin"
|
||||
#define MyAppExeName "pangolin_vpn.exe"
|
||||
#define BuildDir "..\..\build\windows\x64\runner\Release"
|
||||
|
||||
Reference in New Issue
Block a user