mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
opt: window title bar (#672)
* opt: window title bar * rm: `VirtualWindowFrame` on `SettingsPage`
This commit is contained in:
@@ -60,7 +60,7 @@ class _ContainerPageState extends State<ContainerPage> {
|
||||
builder: (_, __) => Consumer<ContainerProvider>(
|
||||
builder: (_, ___, __) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: TwoLineText(up: l10n.container, down: widget.spi.name),
|
||||
actions: [
|
||||
|
||||
@@ -107,7 +107,7 @@ class _EditorPageState extends State<EditorPage> {
|
||||
}
|
||||
|
||||
PreferredSizeWidget _buildAppBar() {
|
||||
return CustomAppBar(
|
||||
return AppBar(
|
||||
centerTitle: true,
|
||||
title: TwoLineText(
|
||||
up: widget.args?.title ??
|
||||
|
||||
@@ -26,8 +26,8 @@ class _IPerfPageState extends State<IPerfPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: const CustomAppBar(
|
||||
title: Text('iperf'),
|
||||
appBar: AppBar(
|
||||
title: const Text('iperf'),
|
||||
),
|
||||
body: _buildBody(),
|
||||
floatingActionButton: _buildFAB(),
|
||||
|
||||
@@ -78,7 +78,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
|
||||
);
|
||||
}
|
||||
|
||||
CustomAppBar _buildAppBar() {
|
||||
AppBar _buildAppBar() {
|
||||
final actions = [
|
||||
IconButton(
|
||||
tooltip: libL10n.delete,
|
||||
@@ -101,7 +101,7 @@ class _PrivateKeyEditPageState extends State<PrivateKeyEditPage> {
|
||||
icon: const Icon(Icons.delete),
|
||||
)
|
||||
];
|
||||
return CustomAppBar(
|
||||
return AppBar(
|
||||
title: Text(libL10n.edit),
|
||||
actions: widget.pki == null ? null : actions,
|
||||
);
|
||||
|
||||
@@ -123,7 +123,7 @@ class _ProcessPageState extends State<ProcessPage> {
|
||||
);
|
||||
}
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
title: TwoLineText(up: widget.spi.name, down: l10n.process),
|
||||
actions: actions,
|
||||
|
||||
@@ -52,7 +52,7 @@ final class _PvePageState extends State<PvePage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(
|
||||
appBar: AppBar(
|
||||
title: TwoLineText(up: 'PVE', down: widget.spi.name),
|
||||
actions: [
|
||||
ValBuilder(
|
||||
|
||||
@@ -87,7 +87,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
||||
final s = widget.spi.server;
|
||||
if (s == null) {
|
||||
return Scaffold(
|
||||
appBar: const CustomAppBar(),
|
||||
appBar: AppBar(),
|
||||
body: Center(child: Text(libL10n.empty)),
|
||||
);
|
||||
}
|
||||
@@ -120,8 +120,8 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
||||
);
|
||||
}
|
||||
|
||||
CustomAppBar _buildAppBar(Server si) {
|
||||
return CustomAppBar(
|
||||
AppBar _buildAppBar(Server si) {
|
||||
return AppBar(
|
||||
title: Hero(
|
||||
tag: 'home_card_title_${si.spi.id}',
|
||||
transitionOnUserGestures: true,
|
||||
|
||||
@@ -110,7 +110,7 @@ class _ServerEditPageState extends State<ServerEditPage> with AfterLayoutMixin {
|
||||
return GestureDetector(
|
||||
onTap: () => _focusScope.unfocus(),
|
||||
child: Scaffold(
|
||||
appBar: CustomAppBar(title: Text(libL10n.edit), actions: actions),
|
||||
appBar: AppBar(title: Text(libL10n.edit), actions: actions),
|
||||
body: _buildForm(),
|
||||
floatingActionButton: _buildFAB(),
|
||||
),
|
||||
|
||||
@@ -17,7 +17,7 @@ class _AndroidSettingsPageState extends State<AndroidSettingsPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: const CustomAppBar(title: Text('Android')),
|
||||
appBar: AppBar(title: const Text('Android')),
|
||||
body: ListView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 17),
|
||||
children: [
|
||||
|
||||
@@ -27,7 +27,7 @@ class _IOSSettingsPageState extends State<IOSSettingsPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: const CustomAppBar(title: Text('iOS')),
|
||||
appBar: AppBar(title: const Text('iOS')),
|
||||
body: ListView(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 17),
|
||||
children: [
|
||||
|
||||
@@ -17,7 +17,7 @@ class _ServerDetailOrderPageState extends State<ServerDetailOrderPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(title: Text(l10n.serverDetailOrder)),
|
||||
appBar: AppBar(title: Text(l10n.serverDetailOrder)),
|
||||
body: _buildBody(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class _ServerDetailOrderPageState extends State<ServerFuncBtnsOrderPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(title: Text(l10n.sequence)),
|
||||
appBar: AppBar(title: Text(l10n.sequence)),
|
||||
body: _buildBody(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ class _ServerOrderPageState extends State<ServerOrderPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(title: Text(l10n.serverOrder)),
|
||||
appBar: AppBar(title: Text(l10n.serverOrder)),
|
||||
body: _buildBody(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ class _SSHVirtKeySettingPageState extends State<SSHVirtKeySettingPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(title: Text(l10n.editVirtKeys)),
|
||||
appBar: AppBar(title: Text(l10n.editVirtKeys)),
|
||||
body: Column(
|
||||
children: [
|
||||
Padding(
|
||||
|
||||
@@ -38,7 +38,7 @@ class _SnippetEditPageState extends State<SnippetEditPage>
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(
|
||||
appBar: AppBar(
|
||||
title: Text(libL10n.edit),
|
||||
actions: _buildAppBarActions(),
|
||||
),
|
||||
|
||||
@@ -11,7 +11,7 @@ class SnippetResultPage extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(title: Text(l10n.result)),
|
||||
appBar: AppBar(title: Text(l10n.result)),
|
||||
body: _buildBody(),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ class _LocalFilePageState extends State<LocalFilePage>
|
||||
super.build(context);
|
||||
final title = _path.path.fileNameGetter ?? libL10n.file;
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(
|
||||
appBar: AppBar(
|
||||
title: AnimatedSwitcher(
|
||||
duration: Durations.short3,
|
||||
child: Text(title, key: ValueKey(title)),
|
||||
|
||||
@@ -62,7 +62,7 @@ class _SftpPageState extends State<SftpPage> with AfterLayoutMixin {
|
||||
if (isDesktop) children.add(_buildRefreshBtn());
|
||||
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(
|
||||
appBar: AppBar(
|
||||
title: TwoLineText(up: 'SFTP', down: widget.spi.name),
|
||||
actions: children,
|
||||
),
|
||||
|
||||
@@ -16,7 +16,7 @@ class _SftpMissionPageState extends State<SftpMissionPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(
|
||||
appBar: AppBar(
|
||||
title: Text(l10n.mission, style: UIs.text18),
|
||||
),
|
||||
body: _buildBody(),
|
||||
|
||||
@@ -42,7 +42,7 @@ final class _SystemdPageState extends State<SystemdPage> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: CustomAppBar(
|
||||
appBar: AppBar(
|
||||
title: const Text('Systemd'),
|
||||
actions: isDesktop
|
||||
? [Btn.icon(icon: const Icon(Icons.refresh), onTap: _pro.getUnits)]
|
||||
|
||||
Reference in New Issue
Block a user