Skip to content

Commit

Permalink
Update UI Packages
Browse files Browse the repository at this point in the history
Align with Lidarr
  • Loading branch information
Qstick committed Jan 24, 2023
1 parent fbdc9f3 commit 1caa49c
Show file tree
Hide file tree
Showing 330 changed files with 3,631 additions and 4,172 deletions.
12 changes: 6 additions & 6 deletions frontend/src/Activity/Blocklist/Blocklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,33 +61,33 @@ class Blocklist extends Component {

getSelectedIds = () => {
return getSelectedIds(this.state.selectedState);
}
};

//
// Listeners

onSelectAllChange = ({ value }) => {
this.setState(selectAll(this.state.selectedState, value));
}
};

onSelectedChange = ({ id, value, shiftKey = false }) => {
this.setState((state) => {
return toggleSelected(state, this.props.items, id, value, shiftKey);
});
}
};

onRemoveSelectedPress = () => {
this.setState({ isConfirmRemoveModalOpen: true });
}
};

onRemoveSelectedConfirmed = () => {
this.props.onRemoveSelected(this.getSelectedIds());
this.setState({ isConfirmRemoveModalOpen: false });
}
};

onConfirmRemoveModalClose = () => {
this.setState({ isConfirmRemoveModalOpen: false });
}
};

//
// Render
Expand Down
20 changes: 10 additions & 10 deletions frontend/src/Activity/Blocklist/BlocklistConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,49 +68,49 @@ class BlocklistConnector extends Component {

repopulate = () => {
this.props.fetchBlocklist();
}
};
//
// Listeners

onFirstPagePress = () => {
this.props.gotoBlocklistFirstPage();
}
};

onPreviousPagePress = () => {
this.props.gotoBlocklistPreviousPage();
}
};

onNextPagePress = () => {
this.props.gotoBlocklistNextPage();
}
};

onLastPagePress = () => {
this.props.gotoBlocklistLastPage();
}
};

onPageSelect = (page) => {
this.props.gotoBlocklistPage({ page });
}
};

onRemoveSelected = (ids) => {
this.props.removeBlocklistItems({ ids });
}
};

onSortPress = (sortKey) => {
this.props.setBlocklistSort({ sortKey });
}
};

onTableOptionChange = (payload) => {
this.props.setBlocklistTableOption(payload);

if (payload.pageSize) {
this.props.gotoBlocklistFirstPage();
}
}
};

onClearBlocklistPress = () => {
this.props.executeCommand({ name: commandNames.CLEAR_BLOCKLIST });
}
};

//
// Render
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Activity/Blocklist/BlocklistRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ class BlocklistRow extends Component {

onDetailsPress = () => {
this.setState({ isDetailsModalOpen: true });
}
};

onDetailsModalClose = () => {
this.setState({ isDetailsModalOpen: false });
}
};

//
// Render
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/Activity/History/HistoryConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,46 +60,46 @@ class HistoryConnector extends Component {

repopulate = () => {
this.props.fetchHistory();
}
};

//
// Listeners

onFirstPagePress = () => {
this.props.gotoHistoryFirstPage();
}
};

onPreviousPagePress = () => {
this.props.gotoHistoryPreviousPage();
}
};

onNextPagePress = () => {
this.props.gotoHistoryNextPage();
}
};

onLastPagePress = () => {
this.props.gotoHistoryLastPage();
}
};

onPageSelect = (page) => {
this.props.gotoHistoryPage({ page });
}
};

onSortPress = (sortKey) => {
this.props.setHistorySort({ sortKey });
}
};

onFilterSelect = (selectedFilterKey) => {
this.props.setHistoryFilter({ selectedFilterKey });
}
};

onTableOptionChange = (payload) => {
this.props.setHistoryTableOption(payload);

if (payload.pageSize) {
this.props.gotoHistoryFirstPage();
}
}
};

//
// Render
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Activity/History/HistoryRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ class HistoryRow extends Component {

onDetailsPress = () => {
this.setState({ isDetailsModalOpen: true });
}
};

onDetailsModalClose = () => {
this.setState({ isDetailsModalOpen: false });
}
};

//
// Render
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Activity/History/HistoryRowConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class HistoryRowConnector extends Component {

onMarkAsFailedPress = () => {
this.props.markAsFailed({ id: this.props.id });
}
};

//
// Render
Expand Down
16 changes: 8 additions & 8 deletions frontend/src/Activity/Queue/Queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,45 +100,45 @@ class Queue extends Component {

getSelectedIds = () => {
return getSelectedIds(this.state.selectedState);
}
};

//
// Listeners

onQueueRowModalOpenOrClose = (isOpen) => {
this._shouldBlockRefresh = isOpen;
}
};

onSelectAllChange = ({ value }) => {
this.setState(selectAll(this.state.selectedState, value));
}
};

onSelectedChange = ({ id, value, shiftKey = false }) => {
this.setState((state) => {
return toggleSelected(state, this.props.items, id, value, shiftKey);
});
}
};

onGrabSelectedPress = () => {
this.props.onGrabSelectedPress(this.getSelectedIds());
}
};

onRemoveSelectedPress = () => {
this.setState({ isConfirmRemoveModalOpen: true }, () => {
this._shouldBlockRefresh = true;
});
}
};

onRemoveSelectedConfirmed = (payload) => {
this._shouldBlockRefresh = false;
this.props.onRemoveSelectedPress({ ids: this.getSelectedIds(), ...payload });
this.setState({ isConfirmRemoveModalOpen: false });
}
};

onConfirmRemoveModalClose = () => {
this._shouldBlockRefresh = false;
this.setState({ isConfirmRemoveModalOpen: false });
}
};

//
// Render
Expand Down
22 changes: 11 additions & 11 deletions frontend/src/Activity/Queue/QueueConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,56 +79,56 @@ class QueueConnector extends Component {

repopulate = () => {
this.props.fetchQueue();
}
};

//
// Listeners

onFirstPagePress = () => {
this.props.gotoQueueFirstPage();
}
};

onPreviousPagePress = () => {
this.props.gotoQueuePreviousPage();
}
};

onNextPagePress = () => {
this.props.gotoQueueNextPage();
}
};

onLastPagePress = () => {
this.props.gotoQueueLastPage();
}
};

onPageSelect = (page) => {
this.props.gotoQueuePage({ page });
}
};

onSortPress = (sortKey) => {
this.props.setQueueSort({ sortKey });
}
};

onTableOptionChange = (payload) => {
this.props.setQueueTableOption(payload);

if (payload.pageSize) {
this.props.gotoQueueFirstPage();
}
}
};

onRefreshPress = () => {
this.props.executeCommand({
name: commandNames.REFRESH_MONITORED_DOWNLOADS
});
}
};

onGrabSelectedPress = (ids) => {
this.props.grabQueueItems({ ids });
}
};

onRemoveSelectedPress = (payload) => {
this.props.removeQueueItems(payload);
}
};

//
// Render
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Activity/Queue/QueueOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class QueueOptions extends Component {
[name]: value
});
});
}
};

//
// Render
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/Activity/Queue/QueueRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class QueueRow extends Component {

onRemoveQueueItemPress = () => {
this.setState({ isRemoveQueueItemModalOpen: true });
}
};

onRemoveQueueItemModalConfirmed = (blocklist, skipredownload) => {
const {
Expand All @@ -53,25 +53,25 @@ class QueueRow extends Component {
onRemoveQueueItemPress(blocklist, skipredownload);

this.setState({ isRemoveQueueItemModalOpen: false });
}
};

onRemoveQueueItemModalClose = () => {
this.props.onQueueRowModalOpenOrClose(false);

this.setState({ isRemoveQueueItemModalOpen: false });
}
};

onInteractiveImportPress = () => {
this.props.onQueueRowModalOpenOrClose(true);

this.setState({ isInteractiveImportModalOpen: true });
}
};

onInteractiveImportModalClose = () => {
this.props.onQueueRowModalOpenOrClose(false);

this.setState({ isInteractiveImportModalOpen: false });
}
};

//
// Render
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Activity/Queue/QueueRowConnector.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ class QueueRowConnector extends Component {

onGrabPress = () => {
this.props.grabQueueItem({ id: this.props.id });
}
};

onRemoveQueueItemPress = (payload) => {
this.props.removeQueueItem({ id: this.props.id, ...payload });
}
};

//
// Render
Expand Down

0 comments on commit 1caa49c

Please sign in to comment.