Change navigation layout on small screens in web UI (#34910)

This commit is contained in:
Eugen Rochko 2025-06-11 13:55:43 +02:00 committed by GitHub
parent 8cf246e4d3
commit a13b33d851
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 1390 additions and 682 deletions

View file

@ -0,0 +1,28 @@
import { createReducer } from '@reduxjs/toolkit';
import {
openNavigation,
closeNavigation,
toggleNavigation,
} from 'mastodon/actions/navigation';
interface State {
open: boolean;
}
const initialState: State = {
open: false,
};
export const navigationReducer = createReducer(initialState, (builder) => {
builder
.addCase(openNavigation, (state) => {
state.open = true;
})
.addCase(closeNavigation, (state) => {
state.open = false;
})
.addCase(toggleNavigation, (state) => {
state.open = !state.open;
});
});