chore: make space nav bar narrower on mobile and ensure space nav bar matches user's theme
This commit is contained in:
parent
87c2639625
commit
fef96359c9
3 changed files with 110 additions and 100 deletions
|
|
@ -44,7 +44,11 @@ class NaviRailItem extends StatelessWidget {
|
|||
bottom: 8,
|
||||
left: 0,
|
||||
child: AnimatedContainer(
|
||||
width: isSelected ? 8 : 0,
|
||||
width: isSelected
|
||||
? FluffyThemes.isColumnMode(context)
|
||||
? 8
|
||||
: 4
|
||||
: 0,
|
||||
duration: FluffyThemes.animationDuration,
|
||||
curve: FluffyThemes.animationCurve,
|
||||
decoration: BoxDecoration(
|
||||
|
|
|
|||
|
|
@ -34,8 +34,7 @@ class SettingsView extends StatelessWidget {
|
|||
?.tryGet<String>('account');
|
||||
return Row(
|
||||
children: [
|
||||
if (FluffyThemes.isColumnMode(context) ||
|
||||
AppConfig.displayNavigationRail) ...[
|
||||
if (FluffyThemes.isColumnMode(context)) ...[
|
||||
SpacesNavigationRail(
|
||||
activeSpaceId: null,
|
||||
onGoToChats: () => context.go('/rooms'),
|
||||
|
|
|
|||
|
|
@ -33,7 +33,9 @@ class SpacesNavigationRail extends StatelessWidget {
|
|||
.uri
|
||||
.path
|
||||
.startsWith('/rooms/settings');
|
||||
return StreamBuilder(
|
||||
return Material(
|
||||
child: SafeArea(
|
||||
child: StreamBuilder(
|
||||
key: ValueKey(
|
||||
client.userID.toString(),
|
||||
),
|
||||
|
|
@ -52,7 +54,9 @@ class SpacesNavigationRail extends StatelessWidget {
|
|||
.toList();
|
||||
|
||||
return SizedBox(
|
||||
width: FluffyThemes.navRailWidth,
|
||||
width: FluffyThemes.isColumnMode(context)
|
||||
? FluffyThemes.navRailWidth
|
||||
: FluffyThemes.navRailWidth * 0.75,
|
||||
child: Column(
|
||||
children: [
|
||||
Expanded(
|
||||
|
|
@ -89,7 +93,8 @@ class SpacesNavigationRail extends StatelessWidget {
|
|||
);
|
||||
}
|
||||
final space = rootSpaces[i];
|
||||
final displayname = rootSpaces[i].getLocalizedDisplayname(
|
||||
final displayname =
|
||||
rootSpaces[i].getLocalizedDisplayname(
|
||||
MatrixLocals(L10n.of(context)),
|
||||
);
|
||||
final spaceChildrenIds =
|
||||
|
|
@ -132,6 +137,8 @@ class SpacesNavigationRail extends StatelessWidget {
|
|||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue