From 9975888d222206fd358d0f2c159a28a6abc1a404 Mon Sep 17 00:00:00 2001
From: 905086 <k2049@qq.com>
Date: Wed, 04 Nov 2026 07:32:40 +0800
Subject: [PATCH] feat: 替换应用名称为“游趣电玩”并添加窗口拖动最大化功能
---
fluttergamebox/lib/widgets/auth_dialogs.dart | 14 +++++++++++---
fluttergamebox/lib/main.dart | 4 ++--
fluttergamebox/lib/pages/main_shell.dart | 15 ++++++++++++---
fluttergamebox/lib/pages/login_page.dart | 2 +-
fluttergamebox/windows/runner/main.cpp | 2 +-
server/admin/index.html | 6 +++---
6 files changed, 30 insertions(+), 13 deletions(-)
diff --git a/fluttergamebox/lib/main.dart b/fluttergamebox/lib/main.dart
index 6f2e629..faf6ea5 100644
--- a/fluttergamebox/lib/main.dart
+++ b/fluttergamebox/lib/main.dart
@@ -13,7 +13,7 @@
const WindowOptions(
size: Size(1280, 820),
minimumSize: Size(1100, 700),
- title: '99游戏盒子',
+ title: '游趣电玩',
titleBarStyle: TitleBarStyle.hidden,
center: true,
backgroundColor: Color(0xFF14161F),
@@ -64,7 +64,7 @@
@override
Widget build(BuildContext context) {
return MaterialApp(
- title: '99游戏盒子',
+ title: '游趣电玩',
debugShowCheckedModeBanner: false,
theme: ThemeData(
fontFamily: 'Microsoft YaHei',
diff --git a/fluttergamebox/lib/pages/login_page.dart b/fluttergamebox/lib/pages/login_page.dart
index 516063a..29a43b9 100644
--- a/fluttergamebox/lib/pages/login_page.dart
+++ b/fluttergamebox/lib/pages/login_page.dart
@@ -90,7 +90,7 @@
errorBuilder: (_, __, ___) => Container(
color: const Color(0xFF1B1E2E),
child: const Center(
- child: Text('99游戏盒子',
+ child: Text('游趣电玩',
style: TextStyle(
color: AppColors.pink,
fontSize: 40,
diff --git a/fluttergamebox/lib/pages/main_shell.dart b/fluttergamebox/lib/pages/main_shell.dart
index bdfdac5..3b0088f 100644
--- a/fluttergamebox/lib/pages/main_shell.dart
+++ b/fluttergamebox/lib/pages/main_shell.dart
@@ -12,6 +12,7 @@
import 'package:fluttergamebox/widgets/activate_dialog.dart';
import 'package:fluttergamebox/widgets/download_manager.dart';
import 'package:shared_preferences/shared_preferences.dart';
+import 'package:window_manager/window_manager.dart';
import 'package:fluttergamebox/widgets/info_dialogs.dart';
import 'package:fluttergamebox/widgets/window_controls.dart';
@@ -133,7 +134,15 @@
Widget _buildTopBar() {
return GestureDetector(
- onDoubleTap: () {},
+ // 拖动顶栏移动窗口;双击最大化/还原
+ onPanStart: (_) => windowManager.startDragging(),
+ onDoubleTap: () async {
+ if (await windowManager.isMaximized()) {
+ windowManager.unmaximize();
+ } else {
+ windowManager.maximize();
+ }
+ },
child: Container(
height: 52,
color: const Color(0xFF191C2B),
@@ -151,12 +160,12 @@
height: 28,
color: AppColors.pink,
child: const Center(
- child: Text('99',
+ child: Text('游',
style: TextStyle(
color: Colors.white, fontSize: 11))))),
),
const SizedBox(width: 8),
- const Text('99游戏盒子',
+ const Text('游趣电玩',
style: TextStyle(
color: Colors.white,
fontSize: 14,
diff --git a/fluttergamebox/lib/widgets/auth_dialogs.dart b/fluttergamebox/lib/widgets/auth_dialogs.dart
index 4fbad2d..30a4439 100644
--- a/fluttergamebox/lib/widgets/auth_dialogs.dart
+++ b/fluttergamebox/lib/widgets/auth_dialogs.dart
@@ -1,4 +1,6 @@
-import 'package:flutter/material.dart';
+import 'dart:convert';
+
+import 'package:flutter/material.dart';
import 'package:fluttergamebox/api/api_service.dart';
import 'package:fluttergamebox/common/theme.dart';
import 'package:fluttergamebox/pages/login_page.dart';
@@ -50,10 +52,16 @@
try {
final res = await ApiService.captcha();
if (res['code'] == 0) {
+ // 服务端返回 data URI(data:image/png;base64,xxx),解码后用 Image.memory 显示
+ String b64 = res['data']['captcha_image'] as String;
+ if (b64.contains(',')) {
+ b64 = b64.substring(b64.indexOf(',') + 1);
+ }
+ final bytes = base64Decode(b64);
setState(() {
captchaId = res['data']['captcha_id'];
- captchaImage = Image.network(
- res['data']['captcha_image'],
+ captchaImage = Image.memory(
+ bytes,
width: double.infinity,
height: double.infinity,
fit: BoxFit.fill,
diff --git a/fluttergamebox/windows/runner/main.cpp b/fluttergamebox/windows/runner/main.cpp
index 0be071a..7e7b1e4 100644
--- a/fluttergamebox/windows/runner/main.cpp
+++ b/fluttergamebox/windows/runner/main.cpp
@@ -27,7 +27,7 @@
FlutterWindow window(project);
Win32Window::Point origin(10, 10);
Win32Window::Size size(1280, 720);
- if (!window.Create(L"fluttergamebox", origin, size)) {
+ if (!window.Create(L"游趣电玩", origin, size)) {
return EXIT_FAILURE;
}
window.SetQuitOnClose(true);
diff --git a/server/admin/index.html b/server/admin/index.html
index 18fe189..16f3a0a 100644
--- a/server/admin/index.html
+++ b/server/admin/index.html
@@ -2,7 +2,7 @@
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
-<title>99游戏盒子 - 管理后台</title>
+<title>游趣电玩 - 管理后台</title>
<style>
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:"Microsoft YaHei",sans-serif; background:#14161f; color:#e0e0e0; font-size:14px; }
@@ -81,7 +81,7 @@
<!-- 登录 -->
<div id="loginPage">
<div class="login-box">
- <h1>99游戏盒子 · 管理后台</h1>
+ <h1>游趣电玩 · 管理后台</h1>
<div class="sub">GameBox Admin</div>
<input id="adminUser" placeholder="管理员账号" value="admin">
<input id="adminPwd" type="password" placeholder="密码">
@@ -92,7 +92,7 @@
<!-- 主面板 -->
<div id="mainPage">
<div class="topbar">
- <div class="logo">99游戏盒子 · 管理后台</div>
+ <div class="logo">游趣电玩 · 管理后台</div>
<div class="nav-tabs">
<button class="active" data-tab="keys" onclick="switchTab('keys')">密钥管理</button>
<button data-tab="games" onclick="switchTab('games')">游戏管理</button>
--
Gitblit v1.10.0