Added missing routes
and added a padding around the visibility selector
This commit is contained in:
parent
db5e950a93
commit
8e02de97c1
1 changed files with 288 additions and 280 deletions
|
@ -59,7 +59,9 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
|
|||
),
|
||||
Text(widget.room?.description ?? '',
|
||||
style: textTheme.bodyMedium),
|
||||
SegmentedButton<int>(
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8),
|
||||
child: SegmentedButton<int>(
|
||||
showSelectedIcon: true,
|
||||
multiSelectionEnabled: false,
|
||||
emptySelectionAllowed: false,
|
||||
|
@ -89,7 +91,8 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
|
|||
showDialog(
|
||||
context: context,
|
||||
builder: (ctx) => AlertDialog(
|
||||
title: const Text('Change room visibility'),
|
||||
title:
|
||||
const Text('Change room visibility'),
|
||||
content: Text(
|
||||
'Do you really want to change the room visibility to: ${vis.text}'),
|
||||
actions: [
|
||||
|
@ -152,13 +155,15 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
|
|||
} catch (_) {
|
||||
// network error
|
||||
final snackBar = SnackBar(
|
||||
behavior: SnackBarBehavior.floating,
|
||||
behavior:
|
||||
SnackBarBehavior.floating,
|
||||
content:
|
||||
const Text('Network error'),
|
||||
action: SnackBarAction(
|
||||
label: 'Dismiss',
|
||||
onPressed: () {
|
||||
scaffMgr.hideCurrentSnackBar();
|
||||
scaffMgr
|
||||
.hideCurrentSnackBar();
|
||||
},
|
||||
),
|
||||
);
|
||||
|
@ -176,7 +181,7 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
|
|||
}),
|
||||
selected: {(widget.room?.visibility?.type)!},
|
||||
selectedIcon: Icon((widget.room?.visibility?.icon)!),
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
)
|
||||
|
@ -201,7 +206,8 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
|
|||
subtitle: const Text(
|
||||
'Change the rooms name, description and icon'),
|
||||
onTap: () {
|
||||
// TODO: show edit room screen
|
||||
// show edit room screen
|
||||
Routemaster.of(context).push('/r/${widget.room?.serverTag}/${widget.room?.id}/edit');
|
||||
},
|
||||
),
|
||||
]
|
||||
|
@ -212,7 +218,8 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
|
|||
title: const Text('Members'),
|
||||
subtitle: const Text('Show Member list'),
|
||||
onTap: () {
|
||||
// TODO: open member view screen
|
||||
// open member view screen
|
||||
Routemaster.of(context).push('/r/${widget.room?.serverTag}/${widget.room?.id}/members');
|
||||
},
|
||||
),
|
||||
...(widget.info != null &&
|
||||
|
@ -226,7 +233,8 @@ class _AboutRoomPageState extends State<AboutRoomPage> {
|
|||
title: const Text('OTA'),
|
||||
subtitle: const Text('Manage and delete OTAs'),
|
||||
onTap: () {
|
||||
// TODO: show manage ota screen
|
||||
// show manage ota screen
|
||||
Routemaster.of(context).push('/r/${widget.room?.serverTag}/${widget.room?.id}/ota');
|
||||
},
|
||||
),
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue