feat: RSS feed and config
Some checks failed
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Loic Coenen
2025-11-02 20:36:07 +01:00
parent 9e872ea8d9
commit 77113c83e2
23 changed files with 1006 additions and 443 deletions

View File

@@ -24,6 +24,11 @@ import {
type LoadGiteaIssueError,
setSelectedLocation,
type SetSelectedLocation,
setConfig,
type LoadRssFeedsSuccess,
type SetConfig,
loadRssFeeds,
loadRssFeedsSuccess,
} from './actions';
@@ -108,6 +113,25 @@ export const reducerInner = (state: State, action: Action): State => {
issuesLoading: false,
}
}
else if(action.type === loadGiteaIssueError) {
return {
...state,
issuesLoading: false,
issuesError: (action as LoadGiteaIssueError).error,
}
}
else if(action.type === loadRssFeeds) {
return {
...state,
rssLoading: true,
}
}
else if(action.type === loadRssFeedsSuccess) {
return {
...state,
rss: (action as LoadRssFeedsSuccess).feeds,
}
}
else if(action.type === loadGiteaIssueError) {
return {
...state,
@@ -121,6 +145,15 @@ export const reducerInner = (state: State, action: Action): State => {
selectedLocation: (action as SetSelectedLocation).location,
}
}
else if(action.type === setConfig) {
return {
...state,
config: {
...state.config,
[(action as SetConfig).setting]: (action as SetConfig).value
}
}
}
return state;
}