mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-05-14 14:02:48 +00:00
Fixed log details screen client mobile
This commit is contained in:
parent
c8d395396a
commit
d628e56248
1 changed files with 21 additions and 7 deletions
|
@ -111,6 +111,8 @@ class _LogsListClientState extends State<LogsListClient> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final width = MediaQuery.of(context).size.width;
|
||||||
|
|
||||||
if (widget.ip != previousIp) {
|
if (widget.ip != previousIp) {
|
||||||
setState(() => loadStatus = 0);
|
setState(() => loadStatus = 0);
|
||||||
if (scrollController.hasClients) scrollController.animateTo(0, duration: const Duration(milliseconds: 1), curve: Curves.ease);
|
if (scrollController.hasClients) scrollController.animateTo(0, duration: const Duration(milliseconds: 1), curve: Curves.ease);
|
||||||
|
@ -165,13 +167,25 @@ class _LogsListClientState extends State<LogsListClient> {
|
||||||
index: index,
|
index: index,
|
||||||
length: logsData!.data.length,
|
length: logsData!.data.length,
|
||||||
useAlwaysNormalTile: true,
|
useAlwaysNormalTile: true,
|
||||||
onLogTap: (log) => showDialog(
|
onLogTap: (log) => {
|
||||||
context: context,
|
if (width > 700) {
|
||||||
builder: (context) => LogDetailsScreen(
|
showDialog(
|
||||||
log: log,
|
context: context,
|
||||||
dialog: true
|
builder: (context) => LogDetailsScreen(
|
||||||
)
|
log: log,
|
||||||
)
|
dialog: true
|
||||||
|
)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Navigator.push(context, MaterialPageRoute(
|
||||||
|
builder: (context) => LogDetailsScreen(
|
||||||
|
log: log,
|
||||||
|
dialog: false
|
||||||
|
)
|
||||||
|
))
|
||||||
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue