Update UI Packages

Align with Lidarr
This commit is contained in:
Qstick
2023-01-23 22:53:16 -06:00
parent fbdc9f3a13
commit 1caa49c895
330 changed files with 3555 additions and 4096 deletions
+16 -16
View File
@@ -97,14 +97,14 @@ class BookIndex extends Component {
setScrollerRef = (ref) => {
this.setState({ scroller: ref });
}
};
getSelectedIds = () => {
if (this.state.allUnselected) {
return [];
}
return getSelectedIds(this.state.selectedState);
}
};
setSelectedState() {
const {
@@ -191,19 +191,19 @@ class BookIndex extends Component {
onPosterOptionsPress = () => {
this.setState({ isPosterOptionsModalOpen: true });
}
};
onPosterOptionsModalClose = () => {
this.setState({ isPosterOptionsModalOpen: false });
}
};
onOverviewOptionsPress = () => {
this.setState({ isOverviewOptionsModalOpen: true });
}
};
onOverviewOptionsModalClose = () => {
this.setState({ isOverviewOptionsModalOpen: false });
}
};
onEditorTogglePress = () => {
if (this.state.isEditorActive) {
@@ -213,43 +213,43 @@ class BookIndex extends Component {
newState.isEditorActive = true;
this.setState(newState);
}
}
};
onJumpBarItemPress = (jumpToCharacter) => {
this.setState({ jumpToCharacter });
}
};
onSelectAllChange = ({ value }) => {
this.setState(selectAll(this.state.selectedState, value));
}
};
onSelectAllPress = () => {
this.onSelectAllChange({ value: !this.state.allSelected });
}
};
onSelectedChange = ({ id, value, shiftKey = false }) => {
this.setState((state) => {
return toggleSelected(state, this.props.items, id, value, shiftKey);
});
}
};
onSaveSelected = (changes) => {
this.props.onSaveSelected({
bookIds: this.getSelectedIds(),
...changes
});
}
};
onSearchPress = () => {
this.setState({ isConfirmSearchModalOpen: true });
}
};
onRefreshBookPress = () => {
const selectedIds = this.getSelectedIds();
const refreshIds = this.state.isEditorActive && selectedIds.length > 0 ? selectedIds : [];
this.props.onRefreshBookPress(refreshIds);
}
};
onSearchConfirmed = () => {
const selectedMovieIds = this.getSelectedIds();
@@ -257,11 +257,11 @@ class BookIndex extends Component {
this.props.onSearchPress(searchIds);
this.setState({ isConfirmSearchModalOpen: false });
}
};
onConfirmSearchModalClose = () => {
this.setState({ isConfirmSearchModalOpen: false });
}
};
//
// Render
@@ -94,15 +94,15 @@ class BookIndexConnector extends Component {
onViewSelect = (view) => {
this.props.dispatchSetBookView(view);
}
};
onSaveSelected = (payload) => {
this.props.dispatchSaveBookEditor(payload);
}
};
onScroll = ({ scrollTop }) => {
scrollPositions.bookIndex = scrollTop;
}
};
//
// Render
@@ -98,14 +98,14 @@ class BookIndexItemConnector extends Component {
name: commandNames.REFRESH_BOOK,
bookId: this.props.id
});
}
};
onSearchPress = () => {
this.props.dispatchExecuteCommand({
name: commandNames.BOOK_SEARCH,
bookIds: [this.props.id]
});
}
};
//
// Render
@@ -68,22 +68,22 @@ class BookIndexOverview extends Component {
onEditAuthorPress = () => {
this.setState({ isEditAuthorModalOpen: true });
}
};
onEditAuthorModalClose = () => {
this.setState({ isEditAuthorModalOpen: false });
}
};
onDeleteAuthorPress = () => {
this.setState({
isEditAuthorModalOpen: false,
isDeleteAuthorModalOpen: true
});
}
};
onDeleteAuthorModalClose = () => {
this.setState({ isDeleteAuthorModalOpen: false });
}
};
onChange = ({ value, shiftKey }) => {
const {
@@ -92,7 +92,7 @@ class BookIndexOverview extends Component {
} = this.props;
onSelectedChange({ id, value, shiftKey });
}
};
//
// Render
@@ -123,7 +123,7 @@ class BookIndexOverviews extends Component {
setGridRef = (ref) => {
this._grid = ref;
}
};
calculateGrid = (width = this.state.width, isSmallScreen) => {
const {
@@ -141,7 +141,7 @@ class BookIndexOverviews extends Component {
posterHeight,
rowHeight
});
}
};
cellRenderer = ({ key, rowIndex, style }) => {
const {
@@ -196,14 +196,14 @@ class BookIndexOverviews extends Component {
/>
</div>
);
}
};
//
// Listeners
onMeasure = ({ width }) => {
this.calculateGrid(width, this.props.isSmallScreen);
}
};
//
// Render
@@ -105,7 +105,7 @@ class BookIndexOverviewOptionsModalContent extends Component {
}, () => {
this.props.onChangeOverviewOption({ [name]: value });
});
}
};
//
// Render
@@ -37,42 +37,42 @@ class BookIndexPoster extends Component {
onEditAuthorPress = () => {
this.setState({ isEditAuthorModalOpen: true });
}
};
onEditAuthorModalClose = () => {
this.setState({ isEditAuthorModalOpen: false });
}
};
onDeleteAuthorPress = () => {
this.setState({
isEditAuthorModalOpen: false,
isDeleteAuthorModalOpen: true
});
}
};
onDeleteAuthorModalClose = () => {
this.setState({ isDeleteAuthorModalOpen: false });
}
};
onEditBookPress = () => {
this.setState({ isEditBookModalOpen: true });
}
};
onEditBookModalClose = () => {
this.setState({ isEditBookModalOpen: false });
}
};
onPosterLoad = () => {
if (this.state.hasPosterError) {
this.setState({ hasPosterError: false });
}
}
};
onPosterLoadError = () => {
if (!this.state.hasPosterError) {
this.setState({ hasPosterError: true });
}
}
};
onChange = ({ value, shiftKey }) => {
const {
@@ -81,7 +81,7 @@ class BookIndexPoster extends Component {
} = this.props;
onSelectedChange({ id, value, shiftKey });
}
};
//
// Render
@@ -175,7 +175,7 @@ class BookIndexPosters extends Component {
setGridRef = (ref) => {
this._grid = ref;
}
};
calculateGrid = (width = this.state.width, isSmallScreen) => {
const {
@@ -197,7 +197,7 @@ class BookIndexPosters extends Component {
posterHeight,
rowHeight
});
}
};
cellRenderer = ({ key, rowIndex, columnIndex, style }) => {
const {
@@ -264,14 +264,14 @@ class BookIndexPosters extends Component {
/>
</div>
);
}
};
//
// Listeners
onMeasure = ({ width }) => {
this.calculateGrid(width, this.props.isSmallScreen);
}
};
//
// Render
@@ -93,7 +93,7 @@ class BookIndexPosterOptionsModalContent extends Component {
}, () => {
this.props.onChangePosterOption({ [name]: value });
});
}
};
//
// Render
@@ -27,22 +27,22 @@ class BookIndexActionsCell extends Component {
onEditAuthorPress = () => {
this.setState({ isEditAuthorModalOpen: true });
}
};
onEditAuthorModalClose = () => {
this.setState({ isEditAuthorModalOpen: false });
}
};
onDeleteAuthorPress = () => {
this.setState({
isEditAuthorModalOpen: false,
isDeleteAuthorModalOpen: true
});
}
};
onDeleteAuthorModalClose = () => {
this.setState({ isDeleteAuthorModalOpen: false });
}
};
//
// Render
@@ -37,47 +37,47 @@ class BookIndexRow extends Component {
onEditAuthorPress = () => {
this.setState({ isEditAuthorModalOpen: true });
}
};
onEditAuthorModalClose = () => {
this.setState({ isEditAuthorModalOpen: false });
}
};
onDeleteAuthorPress = () => {
this.setState({
isEditAuthorModalOpen: false,
isDeleteAuthorModalOpen: true
});
}
};
onDeleteAuthorModalClose = () => {
this.setState({ isDeleteAuthorModalOpen: false });
}
};
onEditBookPress = () => {
this.setState({ isEditBookModalOpen: true });
}
};
onEditBookModalClose = () => {
this.setState({ isEditBookModalOpen: false });
}
};
onUseSceneNumberingChange = () => {
// Mock handler to satisfy `onChange` being required for `CheckInput`.
//
}
};
onBannerLoad = () => {
if (this.state.hasBannerError) {
this.setState({ hasBannerError: false });
}
}
};
onBannerLoadError = () => {
if (!this.state.hasBannerError) {
this.setState({ hasBannerError: true });
}
}
};
//
// Render
@@ -73,7 +73,7 @@ class BookIndexTable extends Component {
/>
</VirtualTableRow>
);
}
};
//
// Render
@@ -47,7 +47,7 @@ class BookIndexTableOptions extends Component {
}
});
});
}
};
//
// Render