chore: 发布 v1.0.1 并支持端口参数

This commit is contained in:
2026-06-23 17:01:25 +08:00
parent ae8fe7f31b
commit ebded5057f
4 changed files with 75 additions and 34 deletions

View File

@@ -124,7 +124,10 @@ class _SettingsPageState extends State<SettingsPage> {
return Scaffold(
appBar: AppBar(
title: Text(l10n.settings, style: TextStyle(fontWeight: FontWeight.bold)),
title: Text(
l10n.settings,
style: TextStyle(fontWeight: FontWeight.bold),
),
centerTitle: true,
),
body: SingleChildScrollView(
@@ -136,17 +139,21 @@ class _SettingsPageState extends State<SettingsPage> {
_buildProfileSection(auth),
const SizedBox(height: 32),
],
_buildSectionTitle(l10n.language),
const SizedBox(height: 16),
DropdownButtonFormField<Locale?>(
initialValue: settings.locale == null
? null
: AppLocalizations.supportedLocales.cast<Locale?>().firstWhere(
(l) => l?.languageCode == settings.locale?.languageCode &&
l?.scriptCode == settings.locale?.scriptCode,
orElse: () => null,
),
initialValue: settings.locale == null
? null
: AppLocalizations.supportedLocales
.cast<Locale?>()
.firstWhere(
(l) =>
l?.languageCode ==
settings.locale?.languageCode &&
l?.scriptCode == settings.locale?.scriptCode,
orElse: () => null,
),
decoration: InputDecoration(
labelText: l10n.selectLanguage,
prefixIcon: const Icon(Icons.language),
@@ -155,10 +162,7 @@ class _SettingsPageState extends State<SettingsPage> {
),
),
items: [
DropdownMenuItem(
value: null,
child: Text(l10n.system),
),
DropdownMenuItem(value: null, child: Text(l10n.system)),
DropdownMenuItem(
value: const Locale('en'),
child: Text(l10n.english),
@@ -168,7 +172,10 @@ class _SettingsPageState extends State<SettingsPage> {
child: Text(l10n.simplifiedChinese),
),
DropdownMenuItem(
value: const Locale.fromSubtags(languageCode: 'zh', scriptCode: 'Hant'),
value: const Locale.fromSubtags(
languageCode: 'zh',
scriptCode: 'Hant',
),
child: Text(l10n.traditionalChinese),
),
DropdownMenuItem(
@@ -258,7 +265,10 @@ class _SettingsPageState extends State<SettingsPage> {
},
),
const SizedBox(height: 20),
Text(l10n.accentColor, style: Theme.of(context).textTheme.labelLarge),
Text(
l10n.accentColor,
style: Theme.of(context).textTheme.labelLarge,
),
const SizedBox(height: 12),
Wrap(
spacing: 12,
@@ -301,9 +311,7 @@ class _SettingsPageState extends State<SettingsPage> {
SwitchListTile.adaptive(
contentPadding: EdgeInsets.zero,
title: Text(l10n.livePreviewThumbnails),
subtitle: Text(
l10n.livePreviewThumbnailsDesc,
),
subtitle: Text(l10n.livePreviewThumbnailsDesc),
value: settings.livePreviewThumbnailsEnabled,
onChanged: settings.setLivePreviewThumbnailsEnabled,
),
@@ -392,10 +400,7 @@ class _SettingsPageState extends State<SettingsPage> {
"Hightube",
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
),
Text(
"Version: 1.0.0-beta4.8",
style: TextStyle(color: Colors.grey),
),
Text("Version: 1.0.1", style: TextStyle(color: Colors.grey)),
Text(
"Author: Highground-Soft",
style: TextStyle(color: Colors.grey),