mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-30 03:38:26 -07:00
[UI Work] Add Overview Artist Index View
This commit is contained in:
parent
f6fc78d927
commit
566ac1a9d3
41 changed files with 1337 additions and 138 deletions
|
@ -55,6 +55,7 @@ export const SET_ARTIST_VIEW = 'SET_ARTIST_VIEW';
|
|||
export const SET_ARTIST_TABLE_OPTION = 'SET_ARTIST_TABLE_OPTION';
|
||||
export const SET_ARTIST_POSTER_OPTION = 'SET_ARTIST_POSTER_OPTION';
|
||||
export const SET_ARTIST_BANNER_OPTION = 'SET_ARTIST_BANNER_OPTION';
|
||||
export const SET_ARTIST_OVERVIEW_OPTION = 'SET_ARTIST_OVERVIEW_OPTION';
|
||||
|
||||
export const TOGGLE_ARTIST_MONITORED = 'TOGGLE_ARTIST_MONITORED';
|
||||
export const TOGGLE_ALBUM_MONITORED = 'TOGGLE_ALBUM_MONITORED';
|
||||
|
|
|
@ -7,3 +7,4 @@ export const setArtistView = createAction(types.SET_ARTIST_VIEW);
|
|||
export const setArtistTableOption = createAction(types.SET_ARTIST_TABLE_OPTION);
|
||||
export const setArtistPosterOption = createAction(types.SET_ARTIST_POSTER_OPTION);
|
||||
export const setArtistBannerOption = createAction(types.SET_ARTIST_BANNER_OPTION);
|
||||
export const setArtistOverviewOption = createAction(types.SET_ARTIST_OVERVIEW_OPTION);
|
||||
|
|
|
@ -176,6 +176,10 @@ const calendarActionHandlers = {
|
|||
|
||||
[types.SET_CALENDAR_DAYS_COUNT]: function(payload) {
|
||||
return function(dispatch, getState) {
|
||||
if (payload.dayCount === getState().calendar.dayCount) {
|
||||
return;
|
||||
}
|
||||
|
||||
dispatch(set({
|
||||
section,
|
||||
dayCount: payload.dayCount
|
||||
|
@ -184,10 +188,7 @@ const calendarActionHandlers = {
|
|||
const state = getState();
|
||||
const { time, view } = state.calendar;
|
||||
|
||||
dispatch(fetchCalendar({
|
||||
time,
|
||||
view
|
||||
}));
|
||||
dispatch(fetchCalendar({ time, view }));
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -201,10 +202,7 @@ const calendarActionHandlers = {
|
|||
const state = getState();
|
||||
const { time, view } = state.calendar;
|
||||
|
||||
dispatch(fetchCalendar({
|
||||
time,
|
||||
view
|
||||
}));
|
||||
dispatch(fetchCalendar({ time, view }));
|
||||
};
|
||||
},
|
||||
|
||||
|
@ -212,7 +210,9 @@ const calendarActionHandlers = {
|
|||
return function(dispatch, getState) {
|
||||
const state = getState();
|
||||
const view = payload.view;
|
||||
const time = view === calendarViews.FORECAST ? moment() : state.calendar.time;
|
||||
const time = view === calendarViews.FORECAST ?
|
||||
moment() :
|
||||
state.calendar.time;
|
||||
|
||||
dispatch(fetchCalendar({ time, view }));
|
||||
};
|
||||
|
|
|
@ -206,7 +206,10 @@ const queueActionHandlers = {
|
|||
});
|
||||
|
||||
promise.done((data) => {
|
||||
dispatch(fetchQueue());
|
||||
dispatch(batchActions([
|
||||
set({ section, isRemoving: false }),
|
||||
fetchQueue()
|
||||
]));
|
||||
});
|
||||
|
||||
promise.fail((xhr) => {
|
||||
|
|
|
@ -21,14 +21,26 @@ export const defaultState = {
|
|||
detailedProgressBar: false,
|
||||
size: 'large',
|
||||
showTitle: false,
|
||||
showQualityProfile: false
|
||||
showQualityProfile: true
|
||||
},
|
||||
|
||||
bannerOptions: {
|
||||
detailedProgressBar: false,
|
||||
size: 'large',
|
||||
showTitle: false,
|
||||
showQualityProfile: false
|
||||
showQualityProfile: true
|
||||
},
|
||||
|
||||
overviewOptions: {
|
||||
detailedProgressBar: false,
|
||||
size: 'medium',
|
||||
showNetwork: true,
|
||||
showQualityProfile: true,
|
||||
showPreviousAiring: false,
|
||||
showAdded: false,
|
||||
showAlbumCount: true,
|
||||
showPath: false,
|
||||
showSizeOnDisk: false
|
||||
},
|
||||
|
||||
columns: [
|
||||
|
@ -175,7 +187,8 @@ export const persistState = [
|
|||
'artistIndex.view',
|
||||
'artistIndex.columns',
|
||||
'artistIndex.posterOptions',
|
||||
'artistIndex.bannerOptions'
|
||||
'artistIndex.bannerOptions',
|
||||
'artistIndex.overviewOptions'
|
||||
];
|
||||
|
||||
const reducerSection = 'artistIndex';
|
||||
|
@ -215,6 +228,18 @@ const artistIndexReducers = handleActions({
|
|||
...payload
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
[types.SET_ARTIST_OVERVIEW_OPTION]: function(state, { payload }) {
|
||||
const overviewOptions = state.overviewOptions;
|
||||
|
||||
return {
|
||||
...state,
|
||||
overviewOptions: {
|
||||
...overviewOptions,
|
||||
...payload
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
}, defaultState);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue