mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-27 20:56:12 +01:00
feat: main styling/ui/ux final changes
This commit is contained in:
parent
67161c983f
commit
8f58c95452
17 changed files with 166 additions and 70 deletions
|
|
@ -17,14 +17,15 @@ const initialState = {
|
|||
refreshConvoHint: 0,
|
||||
search: false,
|
||||
latestMessage: null,
|
||||
convos: []
|
||||
convos: [],
|
||||
convoMap: {},
|
||||
};
|
||||
|
||||
const currentSlice = createSlice({
|
||||
name: 'convo',
|
||||
initialState,
|
||||
reducers: {
|
||||
refreshConversation: (state, action) => {
|
||||
refreshConversation: (state) => {
|
||||
state.refreshConvoHint = state.refreshConvoHint + 1;
|
||||
},
|
||||
setConversation: (state, action) => {
|
||||
|
|
@ -69,6 +70,13 @@ const currentSlice = createSlice({
|
|||
} else {
|
||||
state.convos = convos.sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt));
|
||||
}
|
||||
|
||||
// state.convoMap = convos.reduce((acc, curr) => {
|
||||
// acc[curr.conversationId] = { ...curr };
|
||||
// delete acc[curr.conversationId].conversationId;
|
||||
// return acc;
|
||||
// }, {});
|
||||
|
||||
},
|
||||
setPages: (state, action) => {
|
||||
state.pages = action.payload;
|
||||
|
|
|
|||
|
|
@ -4,12 +4,16 @@ const initialState = {
|
|||
searchEnabled: false,
|
||||
search: false,
|
||||
query: '',
|
||||
inputValue: '',
|
||||
};
|
||||
|
||||
const currentSlice = createSlice({
|
||||
name: 'search',
|
||||
initialState,
|
||||
reducers: {
|
||||
setInputValue: (state, action) => {
|
||||
state.inputValue = action.payload;
|
||||
},
|
||||
setSearchState: (state, action) => {
|
||||
state.searchEnabled = action.payload;
|
||||
},
|
||||
|
|
@ -26,6 +30,6 @@ const currentSlice = createSlice({
|
|||
}
|
||||
});
|
||||
|
||||
export const { setSearchState, setQuery } = currentSlice.actions;
|
||||
export const { setInputValue, setSearchState, setQuery } = currentSlice.actions;
|
||||
|
||||
export default currentSlice.reducer;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue