Turn the top nav bar into a sidebar
Add an edit mode
This commit is contained in:
parent
91a660ef43
commit
f63798e897
11 changed files with 266 additions and 49 deletions
5
Start/Client/Store/Features/Sidebar/SidebarActions.cs
Normal file
5
Start/Client/Store/Features/Sidebar/SidebarActions.cs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
namespace Start.Client.Store.Features.Sidebar {
|
||||
public class ShowSidebarAction { }
|
||||
public class HideSidebarAction { }
|
||||
public class ToggleEditModeAction { }
|
||||
}
|
||||
27
Start/Client/Store/Features/Sidebar/SidebarReducers.cs
Normal file
27
Start/Client/Store/Features/Sidebar/SidebarReducers.cs
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
using Fluxor;
|
||||
using Start.Client.Store.State;
|
||||
|
||||
namespace Start.Client.Store.Features.Sidebar {
|
||||
public static class SidebarReducers {
|
||||
[ReducerMethod(typeof(ShowSidebarAction))]
|
||||
public static RootState ShowSidebar(RootState state) {
|
||||
return state with {
|
||||
ShowSidebar = true
|
||||
};
|
||||
}
|
||||
|
||||
[ReducerMethod(typeof(HideSidebarAction))]
|
||||
public static RootState HideSidebar(RootState state) {
|
||||
return state with {
|
||||
ShowSidebar = false
|
||||
};
|
||||
}
|
||||
|
||||
[ReducerMethod(typeof(ToggleEditModeAction))]
|
||||
public static RootState ToggleEditMode(RootState state) {
|
||||
return state with {
|
||||
EditMode = !state.EditMode
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -8,6 +8,9 @@ namespace Start.Client.Store.State {
|
|||
public ContainerListState ContainerListState { get; init; }
|
||||
public CurrentContainerState CurrentContainerState { get; init; }
|
||||
|
||||
public bool ShowSidebar { get; init; }
|
||||
public bool EditMode { get; init; }
|
||||
|
||||
public RootState() {
|
||||
this.ContainerListState = new ContainerListState();
|
||||
this.CurrentContainerState = new CurrentContainerState();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue