opt.: app bar

Fixes #727
This commit is contained in:
lollipopkit🏳️‍⚧️
2025-03-20 20:20:13 +08:00
parent dd5fea09b1
commit 24d64b835d
26 changed files with 47 additions and 76 deletions

View File

@@ -97,23 +97,23 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/watch_connectivity/ios"
SPEC CHECKSUMS:
app_links: e7a6750a915a9e161c58d91bc610e8cd1d4d0ad0
camera_avfoundation: dd002b0330f4981e1bbcb46ae9b62829237459a4
file_picker: c79185e70b9b45728cde2a8d8da454e0cb43f287
app_links: 76b66b60cc809390ca1ad69bfd66b998d2387ac7
camera_avfoundation: 04b44aeb14070126c6529e5ab82cc7c9fca107cf
file_picker: fb04e739ae6239a76ce1f571863a196a922c87d4
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_inappwebview_ios: 6f63631e2c62a7c350263b13fa5427aedefe81d4
flutter_native_splash: e8a1e01082d97a8099d973f919f57904c925008a
icloud_storage: d9ac7a33ced81df08ba7ea1bf3099cc0ee58f60a
local_auth_darwin: 66e40372f1c29f383a314c738c7446e2f7fdadc3
flutter_inappwebview_ios: b89ba3482b96fb25e00c967aae065701b66e9b99
flutter_native_splash: c32d145d68aeda5502d5f543ee38c192065986cf
icloud_storage: e55639f0c0d7cb2b0ba9c0b3d5968ccca9cd9aa2
local_auth_darwin: 553ce4f9b16d3fdfeafce9cf042e7c9f77c1c391
OrderedSet: e539b66b644ff081c73a262d24ad552a69be3a94
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46
plain_notification_token: b36467dc91939a7b6754267c701bbaca14996ee1
share_plus: 8b6f8b3447e494cca5317c8c3073de39b3600d1f
shared_preferences_foundation: fcdcbc04712aee1108ac7fda236f363274528f78
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1
watch_connectivity: 715eb484685e05846eab74795348a44bb2809b82
package_info_plus: af8e2ca6888548050f16fa2f1938db7b5a5df499
path_provider_foundation: 080d55be775b7414fd5a5ef3ac137b97b097e564
plain_notification_token: 047876b9d80a5b93565ddcc13a487a7e7b906f7d
share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
shared_preferences_foundation: 9e1978ff2562383bd5676f64ec4e9aa8fa06a6f7
url_launcher_ios: 694010445543906933d732453a59da0a173ae33d
wakelock_plus: 04623e3f525556020ebd4034310f20fe7fda8b49
watch_connectivity: 88e5bea25b473e66ef8d3f960954d154ed0356d6
PODFILE CHECKSUM: ec6ef69056f066e8b21a3391082f23b5ad2d37f8

View File

@@ -48,6 +48,7 @@
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">

View File

@@ -60,7 +60,7 @@ class _ContainerPageState extends State<ContainerPage> {
builder: (_, __) => Consumer<ContainerProvider>(
builder: (_, ___, __) {
return Scaffold(
appBar: AppBar(
appBar: CustomAppBar(
centerTitle: true,
title: TwoLineText(up: l10n.container, down: widget.spi.name),
actions: [

View File

@@ -117,7 +117,7 @@ class _EditorPageState extends State<EditorPage> {
}
PreferredSizeWidget _buildAppBar() {
return AppBar(
return CustomAppBar(
centerTitle: true,
title: TwoLineText(
up: widget.args?.title ??

View File

@@ -9,26 +9,6 @@ final class _AppBar extends StatelessWidget implements PreferredSizeWidget {
Widget build(BuildContext context) {
return SizedBox(
height: preferredSize.height,
child: isIOS ? Center(child: _buildLogo()) : null,
);
}
Widget _buildLogo() {
final text = Text(
BuildData.name,
style: TextStyle(
fontSize: 10,
fontWeight: FontWeight.bold,
color: UIs.primaryColor.isBrightColor ? Colors.black : Colors.white,
),
);
return Container(
decoration: BoxDecoration(
color: UIs.primaryColor,
borderRadius: BorderRadius.circular(11),
),
padding: const EdgeInsets.symmetric(horizontal: 5, vertical: 1),
child: text,
);
}

View File

@@ -26,7 +26,7 @@ class _IPerfPageState extends State<IPerfPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
appBar: CustomAppBar(
title: const Text('iperf'),
),
body: _buildBody(),

View File

@@ -78,7 +78,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
);
}
AppBar _buildAppBar() {
CustomAppBar _buildAppBar() {
final actions = [
IconButton(
tooltip: libL10n.delete,
@@ -101,7 +101,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
icon: const Icon(Icons.delete),
)
];
return AppBar(
return CustomAppBar(
title: Text(libL10n.edit),
actions: widget.pki == null ? null : actions,
);

View File

@@ -123,7 +123,7 @@ class _ProcessPageState extends State<ProcessPage> {
);
}
return Scaffold(
appBar: AppBar(
appBar: CustomAppBar(
centerTitle: true,
title: TwoLineText(up: widget.spi.name, down: l10n.process),
actions: actions,

View File

@@ -52,7 +52,7 @@ final class _PvePageState extends State<PvePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
appBar: CustomAppBar(
title: TwoLineText(up: 'PVE', down: widget.spi.name),
actions: [
ValBuilder(

View File

@@ -87,7 +87,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
final s = widget.spi.server;
if (s == null) {
return Scaffold(
appBar: AppBar(),
appBar: CustomAppBar(),
body: Center(child: Text(libL10n.empty)),
);
}
@@ -120,8 +120,8 @@ class _ServerDetailPageState extends State<ServerDetailPage>
);
}
AppBar _buildAppBar(Server si) {
return AppBar(
CustomAppBar _buildAppBar(Server si) {
return CustomAppBar(
title: Hero(
tag: 'home_card_title_${si.spi.id}',
transitionOnUserGestures: true,

View File

@@ -110,7 +110,7 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
return GestureDetector(
onTap: () => _focusScope.unfocus(),
child: Scaffold(
appBar: AppBar(title: Text(libL10n.edit), actions: actions),
appBar: CustomAppBar(title: Text(libL10n.edit), actions: actions),
body: _buildForm(),
floatingActionButton: _buildFAB(),
),

View File

@@ -71,7 +71,7 @@ class _SettingsPageState extends State<SettingsPage>
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
appBar: CustomAppBar(
title: Text(libL10n.setting, style: const TextStyle(fontSize: 20)),
bottom: TabBar(
controller: _tabCtrl,

View File

@@ -17,7 +17,7 @@ class _AndroidSettingsPageState extends State<AndroidSettingsPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Android')),
appBar: CustomAppBar(title: const Text('Android')),
body: ListView(
padding: const EdgeInsets.symmetric(horizontal: 17),
children: [

View File

@@ -27,7 +27,7 @@ class _IOSSettingsPageState extends State<IOSSettingsPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('iOS')),
appBar: CustomAppBar(title: const Text('iOS')),
body: ListView(
padding: const EdgeInsets.symmetric(horizontal: 17),
children: [

View File

@@ -17,7 +17,7 @@ class _ServerDetailOrderPageState extends State<ServerDetailOrderPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(l10n.serverDetailOrder)),
appBar: CustomAppBar(title: Text(l10n.serverDetailOrder)),
body: _buildBody(),
);
}

View File

@@ -17,7 +17,7 @@ class _ServerDetailOrderPageState extends State<ServerFuncBtnsOrderPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(l10n.sequence)),
appBar: CustomAppBar(title: Text(l10n.sequence)),
body: _buildBody(),
);
}

View File

@@ -16,7 +16,7 @@ class _ServerOrderPageState extends State<ServerOrderPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(l10n.serverOrder)),
appBar: CustomAppBar(title: Text(l10n.serverOrder)),
body: _buildBody(),
);
}

View File

@@ -17,7 +17,7 @@ class _SSHVirtKeySettingPageState extends State<SSHVirtKeySettingPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(l10n.editVirtKeys)),
appBar: CustomAppBar(title: Text(l10n.editVirtKeys)),
body: Column(
children: [
Padding(

View File

@@ -38,7 +38,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
appBar: CustomAppBar(
title: Text(libL10n.edit),
actions: _buildAppBarActions(),
),

View File

@@ -11,7 +11,7 @@ class SnippetResultPage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text(l10n.result)),
appBar: CustomAppBar(title: Text(l10n.result)),
body: _buildBody(),
);
}

View File

@@ -53,7 +53,7 @@ class _LocalFilePageState extends State<LocalFilePage>
super.build(context);
final title = _path.path.fileNameGetter ?? libL10n.file;
return Scaffold(
appBar: AppBar(
appBar: CustomAppBar(
title: AnimatedSwitcher(
duration: Durations.short3,
child: Text(title, key: ValueKey(title)),

View File

@@ -62,7 +62,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
if (isDesktop) children.add(_buildRefreshBtn());
return Scaffold(
appBar: AppBar(
appBar: CustomAppBar(
title: TwoLineText(up: 'SFTP', down: widget.spi.name),
actions: children,
),

View File

@@ -16,7 +16,7 @@ class _SftpMissionPageState extends State<SftpMissionPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
appBar: CustomAppBar(
title: Text(l10n.mission, style: UIs.text18),
),
body: _buildBody(),

View File

@@ -42,7 +42,7 @@ final class _SystemdPageState extends State<SystemdPage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
appBar: CustomAppBar(
title: const Text('Systemd'),
actions: isDesktop
? [Btn.icon(icon: const Icon(Icons.refresh), onTap: _pro.getUnits)]

View File

@@ -339,12 +339,10 @@ packages:
dartssh2:
dependency: "direct main"
description:
path: "."
ref: no-etm
resolved-ref: "88852f3a6304c8f6876b17aaed757111bf8128ae"
url: "https://github.com/lollipopkit/dartssh2"
source: git
version: "2.9.1-pre"
path: "../dartssh2"
relative: true
source: path
version: "2.12.0"
dbus:
dependency: transitive
description:
@@ -1469,14 +1467,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.2.2"
unorm_dart:
dependency: transitive
description:
name: unorm_dart
sha256: "23d8bf65605401a6a32cff99435fed66ef3dab3ddcad3454059165df46496a3b"
url: "https://pub.dev"
source: hosted
version: "0.3.0"
url_launcher:
dependency: transitive
description:

View File

@@ -63,9 +63,9 @@ dependencies:
url: https://github.com/lppcg/fl_lib
ref: v1.0.251
# dependency_overrides:
# dartssh2:
# path: ../dartssh2
dependency_overrides:
dartssh2:
path: ../dartssh2
# xterm:
# path: ../xterm.dart
# fl_lib: