mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 14:47:23 +00:00
Hide the sidebar
This commit is contained in:
@ -30,7 +30,7 @@ class AccessManagementPage extends StatelessWidget with HelperResponsiveLayout {
|
||||
final padding = isLargeScreen ? const EdgeInsets.all(30) : const EdgeInsets.all(15);
|
||||
|
||||
return WebScaffold(
|
||||
enableMenuSideba: false,
|
||||
enableMenuSidebar: false,
|
||||
appBarTitle: FittedBox(
|
||||
child: Text(
|
||||
'Access Management',
|
||||
|
@ -21,13 +21,11 @@ class DeviceManagementPage extends StatelessWidget with HelperResponsiveLayout {
|
||||
),
|
||||
),
|
||||
rightBody: const NavigateHomeGridView(),
|
||||
enableMenuSideba: isLargeScreenSize(context),
|
||||
scaffoldBody: BlocBuilder<DeviceManagementBloc, DeviceManagementState>(
|
||||
builder: (context, state) {
|
||||
if (state is DeviceManagementLoading) {
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
} else if (state is DeviceManagementLoaded ||
|
||||
state is DeviceManagementFiltered) {
|
||||
} else if (state is DeviceManagementLoaded || state is DeviceManagementFiltered) {
|
||||
final devices = state is DeviceManagementLoaded
|
||||
? state.devices
|
||||
: (state as DeviceManagementFiltered).filteredDevices;
|
||||
|
@ -18,7 +18,7 @@ class HomeMobilePage extends StatelessWidget {
|
||||
canPop: false,
|
||||
onPopInvoked: (didPop) => false,
|
||||
child: WebScaffold(
|
||||
enableMenuSideba: false,
|
||||
enableMenuSidebar: false,
|
||||
appBarTitle: Row(
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
@ -41,8 +41,7 @@ class HomeMobilePage extends StatelessWidget {
|
||||
SizedBox(height: size.height * 0.05),
|
||||
const Text(
|
||||
'ACCESS YOUR APPS',
|
||||
style:
|
||||
TextStyle(fontSize: 20, fontWeight: FontWeight.w700),
|
||||
style: TextStyle(fontSize: 20, fontWeight: FontWeight.w700),
|
||||
),
|
||||
const SizedBox(height: 30),
|
||||
Expanded(
|
||||
@ -52,8 +51,7 @@ class HomeMobilePage extends StatelessWidget {
|
||||
width: size.width * 0.68,
|
||||
child: GridView.builder(
|
||||
itemCount: 8,
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
crossAxisSpacing: 20.0,
|
||||
mainAxisSpacing: 20.0,
|
||||
@ -65,8 +63,7 @@ class HomeMobilePage extends StatelessWidget {
|
||||
active: homeItems[index]['active'],
|
||||
name: homeItems[index]['title'],
|
||||
img: homeItems[index]['icon'],
|
||||
onTap: () =>
|
||||
homeBloc.homeItems[index].onPress(context),
|
||||
onTap: () => homeBloc.homeItems[index].onPress(context),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
@ -20,7 +20,7 @@ class HomeWebPage extends StatelessWidget {
|
||||
builder: (context, state) {
|
||||
final homeBloc = BlocProvider.of<HomeBloc>(context);
|
||||
return WebScaffold(
|
||||
enableMenuSideba: false,
|
||||
enableMenuSidebar: false,
|
||||
appBarTitle: Row(
|
||||
children: [
|
||||
SvgPicture.asset(
|
||||
|
@ -14,7 +14,6 @@ import 'package:syncrow_web/services/access_mang_api.dart';
|
||||
import 'package:syncrow_web/utils/color_manager.dart';
|
||||
import 'package:syncrow_web/utils/constants/assets.dart';
|
||||
import 'package:syncrow_web/utils/snack_bar.dart';
|
||||
import 'package:syncrow_web/utils/style.dart';
|
||||
|
||||
class VisitorPasswordBloc extends Bloc<VisitorPasswordEvent, VisitorPasswordState> {
|
||||
VisitorPasswordBloc() : super(VisitorPasswordInitial()) {
|
||||
@ -379,17 +378,17 @@ class VisitorPasswordBloc extends Bloc<VisitorPasswordEvent, VisitorPasswordStat
|
||||
1000; // Divide by 1000 to remove milliseconds
|
||||
if (event.isEffective) {
|
||||
if (expirationTimeTimeStamp != null && selectedTimestamp > expirationTimeTimeStamp!) {
|
||||
accessPeriodValidate="Effective Time cannot be later than Expiration Time.";
|
||||
accessPeriodValidate = "Effective Time cannot be later than Expiration Time.";
|
||||
} else {
|
||||
accessPeriodValidate='';
|
||||
accessPeriodValidate = '';
|
||||
effectiveTime = selectedDateTime.toString().split('.').first;
|
||||
effectiveTimeTimeStamp = selectedTimestamp;
|
||||
}
|
||||
} else {
|
||||
if (effectiveTimeTimeStamp != null && selectedTimestamp < effectiveTimeTimeStamp!) {
|
||||
accessPeriodValidate= 'Expiration Time cannot be earlier than Effective Time.';
|
||||
accessPeriodValidate = 'Expiration Time cannot be earlier than Effective Time.';
|
||||
} else {
|
||||
accessPeriodValidate='';
|
||||
accessPeriodValidate = '';
|
||||
expirationTime = selectedDateTime.toString().split('.').first;
|
||||
expirationTimeTimeStamp = selectedTimestamp;
|
||||
}
|
||||
@ -449,7 +448,6 @@ class VisitorPasswordBloc extends Bloc<VisitorPasswordEvent, VisitorPasswordStat
|
||||
<Widget>[
|
||||
TextButton(
|
||||
onPressed: () {
|
||||
|
||||
Navigator.of(context).pop(true);
|
||||
},
|
||||
child: const Text('OK'),
|
||||
|
@ -6,7 +6,7 @@ import 'package:syncrow_web/web_layout/web_app_bar.dart';
|
||||
import 'menu_sidebar.dart';
|
||||
|
||||
class WebScaffold extends StatelessWidget with HelperResponsiveLayout {
|
||||
final bool enableMenuSideba;
|
||||
final bool enableMenuSidebar;
|
||||
final Widget? appBarTitle;
|
||||
final Widget? centerBody;
|
||||
final Widget? rightBody;
|
||||
@ -17,7 +17,7 @@ class WebScaffold extends StatelessWidget with HelperResponsiveLayout {
|
||||
this.centerBody,
|
||||
this.rightBody,
|
||||
this.scaffoldBody,
|
||||
this.enableMenuSideba = true,
|
||||
this.enableMenuSidebar = false,
|
||||
});
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@ -49,7 +49,7 @@ class WebScaffold extends StatelessWidget with HelperResponsiveLayout {
|
||||
Expanded(
|
||||
child: Row(
|
||||
children: [
|
||||
if (enableMenuSideba && !isSmall) const MenuSidebar(),
|
||||
if (enableMenuSidebar && !isSmall) const MenuSidebar(),
|
||||
Expanded(flex: 5, child: scaffoldBody!)
|
||||
],
|
||||
),
|
||||
|
Reference in New Issue
Block a user