mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
fixed style
This commit is contained in:
@ -1,4 +1,5 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:syncrow_web/pages/common/buttons/cancel_button.dart';
|
||||||
import 'package:syncrow_web/utils/color_manager.dart';
|
import 'package:syncrow_web/utils/color_manager.dart';
|
||||||
|
|
||||||
void showDeleteConfirmationDialog(BuildContext context, VoidCallback onConfirm, bool isSpace) {
|
void showDeleteConfirmationDialog(BuildContext context, VoidCallback onConfirm, bool isSpace) {
|
||||||
@ -74,22 +75,9 @@ void showDeleteConfirmationDialog(BuildContext context, VoidCallback onConfirm,
|
|||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||||
children: [
|
children: [
|
||||||
ElevatedButton(
|
CancelButton(
|
||||||
onPressed: () {
|
label: 'Cancel',
|
||||||
Navigator.of(context).pop(); // Close the first dialog
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
// Trigger the second popup
|
|
||||||
},
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(12),
|
|
||||||
side: const BorderSide(color: ColorsManager.boxColor), // Black border
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: const Text(
|
|
||||||
'Cancel',
|
|
||||||
style: TextStyle(color: Colors.black),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
@ -97,11 +85,11 @@ void showDeleteConfirmationDialog(BuildContext context, VoidCallback onConfirm,
|
|||||||
showProcessingPopup(context, isSpace, onConfirm);
|
showProcessingPopup(context, isSpace, onConfirm);
|
||||||
},
|
},
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: Colors.blue,
|
backgroundColor: Colors.blue,
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
borderRadius: BorderRadius.circular(8.0),
|
||||||
),
|
),
|
||||||
),
|
fixedSize: Size(140, 40)),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
'Continue',
|
'Continue',
|
||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white),
|
||||||
@ -184,13 +172,13 @@ void showProcessingPopup(BuildContext context, bool isSpace, VoidCallback onDele
|
|||||||
ElevatedButton(
|
ElevatedButton(
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
// Trigger the second popup
|
// Trigger the second popup
|
||||||
onDelete();
|
onDelete();
|
||||||
},
|
},
|
||||||
style: ElevatedButton.styleFrom(
|
style: ElevatedButton.styleFrom(
|
||||||
backgroundColor: ColorsManager.warningRed,
|
backgroundColor: ColorsManager.warningRed,
|
||||||
|
fixedSize: Size(140, 40),
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(12),
|
borderRadius: BorderRadius.circular(12),
|
||||||
side: const BorderSide(color: ColorsManager.boxColor), // Black border
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
child: const Text(
|
child: const Text(
|
||||||
@ -198,20 +186,9 @@ void showProcessingPopup(BuildContext context, bool isSpace, VoidCallback onDele
|
|||||||
style: TextStyle(color: Colors.white),
|
style: TextStyle(color: Colors.white),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
ElevatedButton(
|
CancelButton(
|
||||||
onPressed: () {
|
label: 'Cancel',
|
||||||
Navigator.of(context).pop(); // Close the first dialog
|
onPressed: () => Navigator.of(context).pop(),
|
||||||
},
|
|
||||||
style: ElevatedButton.styleFrom(
|
|
||||||
backgroundColor: Colors.white,
|
|
||||||
shape: RoundedRectangleBorder(
|
|
||||||
borderRadius: BorderRadius.circular(8.0),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
child: const Text(
|
|
||||||
'Cancel',
|
|
||||||
style: TextStyle(color: Colors.black),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -50,7 +50,7 @@ class _SidebarWidgetState extends State<SidebarWidget> {
|
|||||||
super.didUpdateWidget(oldWidget);
|
super.didUpdateWidget(oldWidget);
|
||||||
if (widget.selectedSpaceUuid != oldWidget.selectedSpaceUuid) {
|
if (widget.selectedSpaceUuid != oldWidget.selectedSpaceUuid) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_selectedId = widget.selectedSpaceUuid;
|
_selectedId = widget.selectedSpaceUuid;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -86,8 +86,6 @@ class _SidebarWidgetState extends State<SidebarWidget> {
|
|||||||
final containsQueryInSpaces =
|
final containsQueryInSpaces =
|
||||||
community.spaces.any((space) => _containsQuery(space, _searchQuery.toLowerCase()));
|
community.spaces.any((space) => _containsQuery(space, _searchQuery.toLowerCase()));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return containsQueryInCommunity || containsQueryInSpaces;
|
return containsQueryInCommunity || containsQueryInSpaces;
|
||||||
}).toList();
|
}).toList();
|
||||||
}
|
}
|
||||||
@ -140,10 +138,10 @@ class _SidebarWidgetState extends State<SidebarWidget> {
|
|||||||
child: Row(
|
child: Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text('Communities',
|
||||||
'Communities',
|
style: Theme.of(context).textTheme.titleMedium?.copyWith(
|
||||||
style: Theme.of(context).textTheme.titleMedium,
|
color: Colors.black,
|
||||||
),
|
)),
|
||||||
GestureDetector(
|
GestureDetector(
|
||||||
onTap: () => _showCreateCommunityDialog(context),
|
onTap: () => _showCreateCommunityDialog(context),
|
||||||
child: Container(
|
child: Container(
|
||||||
@ -238,7 +236,7 @@ class _SidebarWidgetState extends State<SidebarWidget> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (widget.onSelectedSpaceChanged != null) {
|
if (widget.onSelectedSpaceChanged != null) {
|
||||||
widget.onSelectedSpaceChanged!(space.uuid);
|
widget.onSelectedSpaceChanged!(space.uuid);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
children: space.children.isNotEmpty
|
children: space.children.isNotEmpty
|
||||||
|
Reference in New Issue
Block a user