mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 15:57:25 +00:00
Improve UI of comic source page.
This commit is contained in:
@@ -191,13 +191,6 @@ class _BodyState extends State<_Body> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Widget buildCard(BuildContext context) {
|
Widget buildCard(BuildContext context) {
|
||||||
Widget buildButton({
|
|
||||||
required Widget child,
|
|
||||||
required VoidCallback onPressed,
|
|
||||||
}) {
|
|
||||||
return Button.normal(onPressed: onPressed, child: child).fixHeight(32);
|
|
||||||
}
|
|
||||||
|
|
||||||
return SliverToBoxAdapter(
|
return SliverToBoxAdapter(
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
@@ -224,10 +217,13 @@ class _BodyState extends State<_Body> {
|
|||||||
},
|
},
|
||||||
onSubmitted: handleAddSource,
|
onSubmitted: handleAddSource,
|
||||||
).paddingHorizontal(16).paddingBottom(8),
|
).paddingHorizontal(16).paddingBottom(8),
|
||||||
ListTile(
|
Wrap(
|
||||||
title: Text("Comic Source list".tl),
|
spacing: 8,
|
||||||
trailing: buildButton(
|
runSpacing: 8,
|
||||||
child: Text("View".tl),
|
children: [
|
||||||
|
FilledButton.tonalIcon(
|
||||||
|
icon: Icon(Icons.article_outlined),
|
||||||
|
label: Text("Comic Source list".tl),
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
showPopUpWidget(
|
showPopUpWidget(
|
||||||
App.rootContext,
|
App.rootContext,
|
||||||
@@ -235,22 +231,19 @@ class _BodyState extends State<_Body> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
FilledButton.tonalIcon(
|
||||||
ListTile(
|
icon: Icon(Icons.file_open_outlined),
|
||||||
title: Text("Use a config file".tl),
|
label: Text("Use a config file".tl),
|
||||||
trailing: buildButton(
|
|
||||||
onPressed: _selectFile,
|
onPressed: _selectFile,
|
||||||
child: Text("Select".tl),
|
|
||||||
),
|
),
|
||||||
|
FilledButton.tonalIcon(
|
||||||
|
icon: Icon(Icons.help_outline),
|
||||||
|
label: Text("Help".tl),
|
||||||
|
onPressed: help,
|
||||||
),
|
),
|
||||||
ListTile(
|
_CheckUpdatesButton(),
|
||||||
title: Text("Help".tl),
|
],
|
||||||
trailing: buildButton(onPressed: help, child: Text("Open".tl)),
|
).paddingHorizontal(12).paddingVertical(8),
|
||||||
),
|
|
||||||
ListTile(
|
|
||||||
title: Text("Check updates".tl),
|
|
||||||
trailing: _CheckUpdatesButton(),
|
|
||||||
),
|
|
||||||
const SizedBox(height: 8),
|
const SizedBox(height: 8),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@@ -699,11 +692,15 @@ class _CheckUpdatesButtonState extends State<_CheckUpdatesButton> {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Button.normal(
|
return FilledButton.tonalIcon(
|
||||||
|
icon: isLoading ? SizedBox(
|
||||||
|
width: 18,
|
||||||
|
height: 18,
|
||||||
|
child: CircularProgressIndicator(strokeWidth: 2),
|
||||||
|
) : Icon(Icons.update),
|
||||||
|
label: Text("Check updates".tl),
|
||||||
onPressed: check,
|
onPressed: check,
|
||||||
isLoading: isLoading,
|
);
|
||||||
child: Text("Check".tl),
|
|
||||||
).fixHeight(32);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user