pull/630/head
Qstick 3 years ago
parent f19a81990b
commit 520d82ed20

@ -70,18 +70,18 @@ class FileBrowserModalContent extends Component {
} else {
this._scrollerNode = null;
}
}
};
//
// Listeners
onPathInputChange = ({ value }) => {
this.setState({ currentPath: value });
}
};
onRowPress = (path) => {
this.props.onFetchPaths(path);
}
};
onOkPress = () => {
this.props.onChange({
@ -91,7 +91,7 @@ class FileBrowserModalContent extends Component {
this.props.onClearPaths();
this.props.onModalClose();
}
};
//
// Render

@ -78,16 +78,16 @@ class FileBrowserModalContentConnector extends Component {
allowFoldersWithoutTrailingSlashes: true,
includeFiles
});
}
};
onClearPaths = () => {
// this.props.dispatchClearPaths();
}
};
onModalClose = () => {
this.props.dispatchClearPaths();
this.props.onModalClose();
}
};
//
// Render

@ -28,7 +28,7 @@ class FileBrowserRow extends Component {
onPress = () => {
this.props.onPress(this.props.path);
}
};
//
// Render

@ -102,7 +102,7 @@ class DateFilterBuilderRowValue extends Component {
name: NAME,
value: newValue
});
}
};
onTimeChange = ({ value }) => {
const {
@ -117,7 +117,7 @@ class DateFilterBuilderRowValue extends Component {
value: filterValue.value
}
});
}
};
//
// Render

@ -63,7 +63,7 @@ class FilterBuilderModalContent extends Component {
onLabelChange = ({ value }) => {
this.setState({ label: value });
}
};
onFilterChange = (index, filter) => {
const filters = [...this.state.filters];
@ -72,7 +72,7 @@ class FilterBuilderModalContent extends Component {
this.setState({
filters
});
}
};
onAddFilterPress = () => {
const filters = [...this.state.filters];
@ -81,7 +81,7 @@ class FilterBuilderModalContent extends Component {
this.setState({
filters
});
}
};
onRemoveFilterPress = (index) => {
const filters = [...this.state.filters];
@ -90,7 +90,7 @@ class FilterBuilderModalContent extends Component {
this.setState({
filters
});
}
};
onSaveFilterPress = () => {
const {
@ -122,7 +122,7 @@ class FilterBuilderModalContent extends Component {
label,
filters
});
}
};
//
// Render

@ -138,7 +138,7 @@ class FilterBuilderRow extends Component {
this.selectedFilterBuilderProp = selectedFilterBuilderProp;
onFilterChange(index, filter);
}
};
onFilterChange = ({ name, value }) => {
const {
@ -158,7 +158,7 @@ class FilterBuilderRow extends Component {
filter[name] = value;
onFilterChange(index, filter);
}
};
onAddPress = () => {
const {
@ -167,7 +167,7 @@ class FilterBuilderRow extends Component {
} = this.props;
onAddPress(index);
}
};
onRemovePress = () => {
const {
@ -176,7 +176,7 @@ class FilterBuilderRow extends Component {
} = this.props;
onRemovePress(index);
}
};
//
// Render

@ -84,7 +84,7 @@ class FilterBuilderRowValue extends Component {
name: NAME,
value: [...filterValue, value]
});
}
};
onTagDelete = ({ index }) => {
const {
@ -98,7 +98,7 @@ class FilterBuilderRowValue extends Component {
name: NAME,
value
});
}
};
//
// Render

@ -47,7 +47,7 @@ class IndexerFilterBuilderRowValueConnector extends Component {
if (!this.props.isPopulated) {
this.props.dispatchFetchIndexers();
}
}
};
//
// Render

@ -55,7 +55,7 @@ class CustomFilter extends Component {
} = this.props;
onEditPress(id);
}
};
onRemovePress = () => {
const {
@ -67,7 +67,7 @@ class CustomFilter extends Component {
dispatchDeleteCustomFilter({ id });
});
}
};
//
// Render

@ -25,14 +25,14 @@ class FilterModal extends Component {
this.setState({
filterBuilder: true
});
}
};
onEditCustomFilter = (id) => {
this.setState({
filterBuilder: true,
id
});
}
};
onCancelPress = () => {
if (this.state.filterBuilder) {
@ -43,7 +43,7 @@ class FilterModal extends Component {
} else {
this.onModalClose();
}
}
};
onModalClose = () => {
this.setState({
@ -52,7 +52,7 @@ class FilterModal extends Component {
}, () => {
this.props.onModalClose();
});
}
};
//
// Render

@ -69,7 +69,7 @@ class AppProfileSelectInputConnector extends Component {
onChange = ({ name, value }) => {
this.props.onChange({ name, value: parseInt(value) });
}
};
//
// Render

@ -35,11 +35,11 @@ class AutoCompleteInput extends Component {
name: this.props.name,
value: newValue
});
}
};
onInputBlur = () => {
this.setState({ suggestions: [] });
}
};
onSuggestionsFetchRequested = ({ value }) => {
const { values } = this.props;
@ -50,11 +50,11 @@ class AutoCompleteInput extends Component {
});
this.setState({ suggestions: filteredValues });
}
};
onSuggestionsClearRequested = () => {
this.setState({ suggestions: [] });
}
};
//
// Render

@ -49,7 +49,7 @@ class AutoSuggestInput extends Component {
}}
</Reference>
);
}
};
renderSuggestionsContainer = ({ containerProps, children }) => {
return (
@ -90,7 +90,7 @@ class AutoSuggestInput extends Component {
</Popper>
</Portal>
);
}
};
//
// Listeners
@ -113,14 +113,14 @@ class AutoSuggestInput extends Component {
data.styles.width = width;
return data;
}
};
onInputChange = (event, { newValue }) => {
this.props.onChange({
name: this.props.name,
value: newValue
});
}
};
onInputKeyDown = (event) => {
const {
@ -144,7 +144,7 @@ class AutoSuggestInput extends Component {
});
}
}
}
};
//
// Render

@ -39,7 +39,7 @@ class CaptchaInputConnector extends Component {
componentWillUnmount = () => {
this.props.resetCaptcha();
}
};
//
// Listeners
@ -51,7 +51,7 @@ class CaptchaInputConnector extends Component {
} = this.props;
this.props.refreshCaptcha({ provider, providerData });
}
};
onCaptchaChange = (captchaResponse) => {
// If the captcha has expired `captchaResponse` will be null.
@ -68,7 +68,7 @@ class CaptchaInputConnector extends Component {
} = this.props;
this.props.getCaptchaCookie({ provider, providerData, captchaResponse });
}
};
//
// Render

@ -31,7 +31,7 @@ class CardigannCaptchaInputConnector extends Component {
componentWillUnmount = () => {
this.props.resetCaptcha();
}
};
//
// Listeners
@ -48,7 +48,7 @@ class CardigannCaptchaInputConnector extends Component {
this.props.resetCaptcha();
this.props.refreshCaptcha({ provider, providerData });
}
};
//
// Render

@ -59,14 +59,14 @@ class CheckInput extends Component {
shiftKey
});
}
}
};
//
// Listeners
setRef = (ref) => {
this._checkbox = ref;
}
};
onClick = (event) => {
if (this.props.isDisabled) {
@ -78,14 +78,14 @@ class CheckInput extends Component {
event.preventDefault();
this.toggleChecked(checked, shiftKey);
}
};
onChange = (event) => {
const checked = event.target.checked;
const shiftKey = event.nativeEvent.shiftKey;
this.toggleChecked(checked, shiftKey);
}
};
//
// Render

@ -23,7 +23,7 @@ class DeviceInput extends Component {
name,
value: [...value, deviceId]
});
}
};
onTagDelete = ({ index }) => {
const {
@ -39,7 +39,7 @@ class DeviceInput extends Component {
name,
value: newValue
});
}
};
//
// Render

@ -48,11 +48,11 @@ class DeviceInputConnector extends Component {
componentDidMount = () => {
this._populate();
}
};
componentWillUnmount = () => {
this.props.dispatchClearOptions({ section: 'devices' });
}
};
//
// Control
@ -77,7 +77,7 @@ class DeviceInputConnector extends Component {
onRefreshPress = () => {
this._populate();
}
};
//
// Render

@ -149,7 +149,7 @@ class EnhancedSelectInput extends Component {
}
return data;
}
};
onWindowClick = (event) => {
const button = document.getElementById(this._buttonId);
@ -168,14 +168,14 @@ class EnhancedSelectInput extends Component {
this.setState({ isOpen: false });
this._removeListener();
}
}
};
onFocus = () => {
if (this.state.isOpen) {
this._removeListener();
this.setState({ isOpen: false });
}
}
};
onBlur = () => {
if (!this.props.isEditable) {
@ -186,7 +186,7 @@ class EnhancedSelectInput extends Component {
this.setState({ selectedIndex: origIndex });
}
}
}
};
onKeyDown = (event) => {
const {
@ -253,7 +253,7 @@ class EnhancedSelectInput extends Component {
if (!_.isEmpty(newState)) {
this.setState(newState);
}
}
};
onPress = () => {
if (this.state.isOpen) {
@ -267,7 +267,7 @@ class EnhancedSelectInput extends Component {
}
this.setState({ isOpen: !this.state.isOpen });
}
};
onSelect = (value) => {
if (Array.isArray(this.props.value)) {
@ -291,15 +291,15 @@ class EnhancedSelectInput extends Component {
value
});
}
}
};
onMeasure = ({ width }) => {
this.setState({ width });
}
};
onOptionsModalClose = () => {
this.setState({ isOpen: false });
}
};
//
// Render

@ -73,7 +73,7 @@ class EnhancedSelectInputConnector extends Component {
componentDidMount = () => {
this._populate();
}
};
componentDidUpdate = (prevProps) => {
const prevKey = getProviderDataKey(prevProps.providerData);
@ -82,11 +82,11 @@ class EnhancedSelectInputConnector extends Component {
if (!_.isEqual(prevKey, nextKey)) {
this.setState({ refetchRequired: true });
}
}
};
componentWillUnmount = () => {
this._cleanup();
}
};
//
// Listeners
@ -95,7 +95,7 @@ class EnhancedSelectInputConnector extends Component {
if (this.state.refetchRequired) {
this._populate();
}
}
};
//
// Control

@ -21,11 +21,11 @@ class EnhancedSelectInputOption extends Component {
} = this.props;
onSelect(id);
}
};
onCheckPress = () => {
// CheckInput requires a handler. Swallow the change event because onPress will already handle it via event propagation.
}
};
//
// Render

@ -43,7 +43,7 @@ class IndexerFlagsSelectInputConnector extends Component {
});
this.props.onChange({ name, value: indexerFlags });
}
};
//
// Render

@ -43,7 +43,7 @@ class IndexersSelectInputConnector extends Component {
onChange = ({ name, value }) => {
this.props.onChange({ name, value });
}
};
//
// Render

@ -39,7 +39,7 @@ class KeyValueListInput extends Component {
name,
value: newValue
});
}
};
onRemoveItem = (index) => {
const {
@ -55,13 +55,13 @@ class KeyValueListInput extends Component {
name,
value: newValue
});
}
};
onFocus = () => {
this.setState({
isFocused: true
});
}
};
onBlur = () => {
this.setState({
@ -88,7 +88,7 @@ class KeyValueListInput extends Component {
value: newValue
});
}
}
};
//
// Render

@ -18,7 +18,7 @@ class KeyValueListInputItem extends Component {
} = this.props;
onChange(index, { key: keyValue, value });
}
};
onValueChange = ({ value }) => {
// TODO: Validate here or validate at a lower level component
@ -30,7 +30,7 @@ class KeyValueListInputItem extends Component {
} = this.props;
onChange(index, { key: keyValue, value });
}
};
onRemovePress = () => {
const {
@ -39,15 +39,15 @@ class KeyValueListInputItem extends Component {
} = this.props;
onRemove(index);
}
};
onFocus = () => {
this.props.onFocus();
}
};
onBlur = () => {
this.props.onBlur();
}
};
//
// Render

@ -42,7 +42,7 @@ class IndexersSelectInputConnector extends Component {
onChange = ({ name, value }) => {
this.props.onChange({ name, value });
}
};
//
// Render

@ -59,11 +59,11 @@ class NumberInput extends Component {
value: parseValue(this.props, value)
});
}
};
onFocus = () => {
this.setState({ isFocused: true });
}
};
onBlur = () => {
const {
@ -88,7 +88,7 @@ class NumberInput extends Component {
name,
value: parsedValue
});
}
};
//
// Render

@ -41,7 +41,7 @@ class OAuthInputConnector extends Component {
componentWillUnmount = () => {
this.props.resetOAuth();
}
};
//
// Listeners
@ -60,7 +60,7 @@ class OAuthInputConnector extends Component {
providerData,
section
});
}
};
//
// Render

@ -62,7 +62,7 @@ class PathInput extends Component {
onInputChange = ({ value }) => {
this.setState({ value });
}
};
onInputKeyDown = (event) => {
if (event.key === 'Tab') {
@ -80,7 +80,7 @@ class PathInput extends Component {
}
}
}
}
};
onInputBlur = () => {
this.props.onChange({
@ -89,28 +89,28 @@ class PathInput extends Component {
});
this.props.onClearPaths();
}
};
onSuggestionsFetchRequested = ({ value }) => {
this.props.onFetchPaths(value);
}
};
onSuggestionsClearRequested = () => {
// Required because props aren't always rendered, but no-op
// because we don't want to reset the paths after a path is selected.
}
};
onSuggestionSelected = (event, { suggestionValue }) => {
this.props.onFetchPaths(suggestionValue);
}
};
onFileBrowserOpenPress = () => {
this.setState({ isFileBrowserModalOpen: true });
}
};
onFileBrowserModalClose = () => {
this.setState({ isFileBrowserModalOpen: false });
}
};
//
// Render

@ -47,11 +47,11 @@ class PathInputConnector extends Component {
path,
includeFiles
});
}
};
onClearPaths = () => {
this.props.dispatchClearPaths();
}
};
//
// Render

@ -13,7 +13,7 @@ class SelectInput extends Component {
name: this.props.name,
value: event.target.value
});
}
};
//
// Render

@ -49,7 +49,7 @@ class TagInput extends Component {
_setAutosuggestRef = (ref) => {
this._autosuggestRef = ref;
}
};
getSuggestionValue({ name }) {
return name;
@ -57,7 +57,7 @@ class TagInput extends Component {
shouldRenderSuggestions = (value) => {
return value.length >= this.props.minQueryLength;
}
};
renderSuggestion({ name }) {
return name;
@ -70,14 +70,14 @@ class TagInput extends Component {
value: '',
suggestions: []
});
}, 250, { leading: true, trailing: false })
}, 250, { leading: true, trailing: false });
//
// Listeners
onInputContainerPress = () => {
this._autosuggestRef.input.focus();
}
};
onInputChange = (event, { newValue, method }) => {
const value = _.isObject(newValue) ? newValue.name : newValue;
@ -85,7 +85,7 @@ class TagInput extends Component {
if (method === 'type') {
this.setState({ value });
}
}
};
onInputKeyDown = (event) => {
const {
@ -125,11 +125,11 @@ class TagInput extends Component {
event.preventDefault();
}
}
}
};
onInputFocus = () => {
this.setState({ isFocused: true });
}
};
onInputBlur = () => {
this.setState({ isFocused: false });
@ -153,7 +153,7 @@ class TagInput extends Component {
if (tag) {
this.addTag(tag);
}
}
};
onSuggestionsFetchRequested = ({ value }) => {
const lowerCaseValue = value.toLowerCase();
@ -170,16 +170,16 @@ class TagInput extends Component {
});
this.setState({ suggestions });
}
};
onSuggestionsClearRequested = () => {
// Required because props aren't always rendered, but no-op
// because we don't want to reset the paths after a path is selected.
}
};
onSuggestionSelected = (event, { suggestion }) => {
this.addTag(suggestion);
}
};
//
// Render
@ -204,7 +204,7 @@ class TagInput extends Component {
onInputContainerPress={this.onInputContainerPress}
/>
);
}
};
render() {
const {

@ -101,7 +101,7 @@ class TagInputConnector extends Component {
newValue.push(tag.id);
this.props.onChange({ name, value: newValue });
}
};
onTagDelete = ({ index }) => {
const {
@ -116,7 +116,7 @@ class TagInputConnector extends Component {
name,
value: newValue
});
}
};
onTagCreated = (tag) => {
const {
@ -128,7 +128,7 @@ class TagInputConnector extends Component {
newValue.push(tag.id);
this.props.onChange({ name, value: newValue });
}
};
//
// Render

@ -19,7 +19,7 @@ class TagInputInput extends Component {
}
onInputContainerPress();
}
};
render() {
const {

@ -22,7 +22,7 @@ class TagInputTag extends Component {
index,
id: tag.id
});
}
};
//
// Render

@ -60,7 +60,7 @@ class TagSelectInputConnector extends Component {
}
this.props.onChange({ name, value: newValue });
}
};
onTagDelete = ({ index }) => {
const {
@ -75,7 +75,7 @@ class TagSelectInputConnector extends Component {
name,
value: newValue
});
}
};
//
// Render

@ -35,7 +35,7 @@ class TextArea extends Component {
setInputRef = (ref) => {
this._input = ref;
}
};
selectionChange() {
if (this._selectionTimeout) {
@ -75,7 +75,7 @@ class TextArea extends Component {
};
onChange(payload);
}
};
onFocus = (event) => {
if (this.props.onFocus) {
@ -83,19 +83,19 @@ class TextArea extends Component {
}
this.selectionChange();
}
};
onKeyUp = () => {
this.selectionChange();
}
};
onMouseDown = () => {
this._isMouseTarget = true;
}
};
onMouseUp = () => {
this.selectionChange();
}
};
onDocumentMouseUp = () => {
if (this._isMouseTarget) {
@ -103,7 +103,7 @@ class TextArea extends Component {
}
this._isMouseTarget = false;
}
};
//
// Render

@ -35,7 +35,7 @@ class TextInput extends Component {
setInputRef = (ref) => {
this._input = ref;
}
};
selectionChange() {
if (this._selectionTimeout) {
@ -82,7 +82,7 @@ class TextInput extends Component {
}
onChange(payload);
}
};
onFocus = (event) => {
if (this.props.onFocus) {
@ -90,19 +90,19 @@ class TextInput extends Component {
}
this.selectionChange();
}
};
onKeyUp = () => {
this.selectionChange();
}
};
onMouseDown = () => {
this._isMouseTarget = true;
}
};
onMouseUp = () => {
this.selectionChange();
}
};
onDocumentMouseUp = () => {
if (this._isMouseTarget) {
@ -110,7 +110,7 @@ class TextInput extends Component {
}
this._isMouseTarget = false;
}
};
//
// Render

@ -53,7 +53,7 @@ class TextTagInputConnector extends Component {
});
onChange({ name, value: newValue.join(',') });
}
};
onTagDelete = ({ index }) => {
const {
@ -69,7 +69,7 @@ class TextTagInputConnector extends Component {
name,
value: newValue.join(',')
});
}
};
//
// Render

@ -63,7 +63,7 @@ class ClipboardButton extends Component {
showSuccess: false,
showError: false
});
}
};
//
// Listeners
@ -72,13 +72,13 @@ class ClipboardButton extends Component {
this.setState({
showSuccess: true
});
}
};
onError = () => {
this.setState({
showError: true
});
}
};
//
// Render

@ -18,7 +18,7 @@ class Link extends Component {
if (!isDisabled && onPress) {
onPress(event);
}
}
};
//
// Render

@ -90,7 +90,7 @@ class SpinnerErrorButton extends Component {
hasWarning: false,
hasError: false
});
}
};
//
// Render

@ -17,7 +17,7 @@ class Measure extends Component {
onMeasure = _.debounce((payload) => {
this.props.onMeasure(payload);
}, 250, { leading: true, trailing: false })
}, 250, { leading: true, trailing: false });
//
// Render

@ -25,11 +25,11 @@ class FilterMenu extends Component {
onCustomFiltersPress = () => {
this.setState({ isFilterModalOpen: true });
}
};
onFiltersModalClose = () => {
this.setState({ isFilterModalOpen: false });
}
};
//
// Render

@ -14,7 +14,7 @@ class FilterMenuItem extends Component {
} = this.props;
onPress(filterKey);
}
};
//
// Render

@ -124,7 +124,7 @@ class Menu extends Component {
this.setState({ isMenuOpen: false });
this._removeListener();
}
}
};
onTouchStart = (event) => {
const menuButton = document.getElementById(this._menuButtonId);
@ -148,17 +148,17 @@ class Menu extends Component {
this.setState({ isMenuOpen: false });
this._removeListener();
}
}
};
onWindowResize = () => {
this.setMaxHeight();
}
};
onWindowScroll = (event) => {
if (this.state.isMenuOpen) {
this.setMaxHeight();
}
}
};
onMenuButtonPress = () => {
const state = {
@ -173,7 +173,7 @@ class Menu extends Component {
}
this.setState(state);
}
};
//
// Render

@ -14,7 +14,7 @@ class SearchMenuItem extends Component {
} = this.props;
onPress(name);
}
};
//
// Render

@ -17,7 +17,7 @@ class SelectedMenuItem extends Component {
} = this.props;
onPress(name);
}
};
//
// Render

@ -66,7 +66,7 @@ class Modal extends Component {
_setBackgroundRef = (ref) => {
this._backgroundRef = ref;
}
};
_openModal() {
openModals.push(this._modalId);
@ -131,7 +131,7 @@ class Modal extends Component {
onBackdropBeginPress = (event) => {
this._isBackdropPressed = this._isBackdropTarget(event);
}
};
onBackdropEndPress = (event) => {
const {
@ -148,7 +148,7 @@ class Modal extends Component {
}
this._isBackdropPressed = false;
}
};
onKeyDown = (event) => {
const keyCode = event.keyCode;
@ -161,7 +161,7 @@ class Modal extends Component {
this.props.onModalClose();
}
}
}
};
//
// Render

@ -36,12 +36,12 @@ class IndexerSearchInput extends Component {
setAutosuggestRef = (ref) => {
this._autosuggest = ref;
}
};
focusInput = (event) => {
event.preventDefault();
this._autosuggest.input.focus();
}
};
getSectionSuggestions(section) {
return section.suggestions;
@ -102,7 +102,7 @@ class IndexerSearchInput extends Component {
}
this.setState({ value: newValue });
}
};
onKeyDown = (event) => {
if (event.shiftKey || event.altKey || event.ctrlKey) {
@ -137,31 +137,31 @@ class IndexerSearchInput extends Component {
this._autosuggest.input.blur();
this.reset();
}
};
onBlur = () => {
this.reset();
}
};
onSuggestionsClearRequested = () => {
this.setState({
suggestions: [],
loading: false
});
}
};
onSuggestionsFetchRequested = () => {
this.setState({
suggestions: [],
loading: false
});
}
};
onSuggestionSelected = (event, { suggestion }) => {
if (suggestion.type === ADD_NEW_TYPE) {
this.props.onGoToAddNewMovie(this.state.value);
}
}
};
//
// Render

@ -32,14 +32,14 @@ class PageHeader extends Component {
onOpenKeyboardShortcutsModal = () => {
this.setState({ isKeyboardShortcutsModalOpen: true });
}
};
//
// Listeners
onKeyboardShortcutsModalClose = () => {
this.setState({ isKeyboardShortcutsModalOpen: false });
}
};
//
// Render

@ -28,11 +28,11 @@ class PageHeaderActionsMenuConnector extends Component {
onRestartPress = () => {
this.props.restart();
}
};
onShutdownPress = () => {
this.props.shutdown();
}
};
//
// Render

@ -54,15 +54,15 @@ class Page extends Component {
width: window.innerWidth,
height: window.innerHeight
});
}
};
onUpdatedModalClose = () => {
this.setState({ isUpdatedModalOpen: false });
}
};
onConnectionLostModalClose = () => {
this.setState({ isConnectionLostModalOpen: false });
}
};
//
// Render

@ -232,7 +232,7 @@ class PageConnector extends Component {
onSidebarToggle = () => {
this.props.onSidebarVisibleChange(!this.props.isSidebarVisible);
}
};
//
// Render

@ -27,7 +27,7 @@ class PageContentBody extends Component {
if (this.props.onScroll && !isLocked()) {
onScroll(props);
}
}
};
//
// Render

@ -101,7 +101,7 @@ class PageJumpBar extends Component {
onMeasure = ({ height }) => {
this.setState({ height });
}
};
//
// Render

@ -15,7 +15,7 @@ class PageJumpBarItem extends Component {
} = this.props;
onItemPress(label);
}
};
//
// Render

@ -35,11 +35,11 @@ class MessageConnector extends Component {
if (hideAfter) {
this._hideTimeoutId = setTimeout(this.hideMessage, hideAfter * 1000);
}
}
};
hideMessage = () => {
this.props.hideMessage({ id: this.props.id });
}
};
//
// Render

@ -234,7 +234,7 @@ class PageSidebar extends Component {
_setSidebarRef = (ref) => {
this._sidebarRef = ref;
}
};
_setSidebarTransform(isSidebarVisible, transition, callback) {
this.setState({
@ -263,11 +263,11 @@ class PageSidebar extends Component {
event.stopPropagation();
this.props.onSidebarVisibleChange(false);
}
}
};
onWindowScroll = () => {
this.setState(getPositioning());
}
};
onTouchStart = (event) => {
const touches = event.touches;
@ -287,7 +287,7 @@ class PageSidebar extends Component {
this._touchStartX = touchStartX;
this._touchStartY = touchStartY;
}
};
onTouchMove = (event) => {
const touches = event.touches;
@ -324,7 +324,7 @@ class PageSidebar extends Component {
transition: 'none',
transform
});
}
};
onTouchEnd = (event) => {
const touches = event.changedTouches;
@ -344,16 +344,16 @@ class PageSidebar extends Component {
this._touchStartX = null;
this._touchStartY = null;
}
};
onTouchCancel = (event) => {
this._touchStartX = null;
this._touchStartY = null;
}
};
onItemPress = () => {
this.props.onSidebarVisibleChange(false);
}
};
//
// Render

@ -21,7 +21,7 @@ class PageSidebarItem extends Component {
if (isChildItem || !isParentItem) {
onPress();
}
}
};
//
// Render

@ -108,7 +108,7 @@ class PageToolbarSection extends Component {
isMeasured: true,
width
});
}
};
//
// Render

@ -41,7 +41,7 @@ class OverlayScroller extends Component {
if (ref) {
this.props.registerScroller(ref.view);
}
}
};
_renderThumb = (props) => {
return (
@ -50,7 +50,7 @@ class OverlayScroller extends Component {
{...props}
/>
);
}
};
_renderTrackHorizontal = ({ style, props }) => {
const finalStyle = {
@ -69,7 +69,7 @@ class OverlayScroller extends Component {
{...props}
/>
);
}
};
_renderTrackVertical = ({ style, props }) => {
const finalStyle = {
@ -88,7 +88,7 @@ class OverlayScroller extends Component {
{...props}
/>
);
}
};
_renderView = (props) => {
return (
@ -97,18 +97,18 @@ class OverlayScroller extends Component {
{...props}
/>
);
}
};
//
// Listers
onScrollStart = () => {
this._isScrolling = true;
}
};
onScrollStop = () => {
this._isScrolling = false;
}
};
onScroll = (event) => {
const {
@ -122,7 +122,7 @@ class OverlayScroller extends Component {
if (onScroll) {
onScroll({ scrollTop, scrollLeft });
}
}
};
//
// Render

@ -38,7 +38,7 @@ class Scroller extends Component {
this._scroller = ref;
this.props.registerScroller(ref);
}
};
//
// Render

@ -139,7 +139,7 @@ class SignalRConnector extends Component {
}
console.error(`signalR: Unable to find handler for ${name}`);
}
};
handleCommand = (body) => {
if (body.action === 'sync') {
@ -158,15 +158,15 @@ class SignalRConnector extends Component {
} else {
this.props.dispatchUpdateCommand(resource);
}
}
};
handleHealth = () => {
this.props.dispatchFetchHealth();
}
};
handleIndexerstatus = () => {
this.props.dispatchFetchIndexerStatus();
}
};
handleIndexer = (body) => {
const action = body.action;
@ -177,17 +177,17 @@ class SignalRConnector extends Component {
} else if (action === 'deleted') {
this.props.dispatchRemoveItem({ section, id: body.resource.id });
}
}
};
handleVersion = (body) => {
const version = body.version;
this.props.dispatchSetVersion({ version });
}
};
handleSystemTask = () => {
this.props.dispatchFetchCommands();
}
};
handleTag = (body) => {
if (body.action === 'sync') {
@ -195,7 +195,7 @@ class SignalRConnector extends Component {
this.props.dispatchFetchTagDetails();
return;
}
}
};
//
// Listeners
@ -210,7 +210,7 @@ class SignalRConnector extends Component {
isDisconnected: false,
isRestarting: false
});
}
};
onStart = () => {
console.debug('[signalR] connected');
@ -221,11 +221,11 @@ class SignalRConnector extends Component {
isDisconnected: false,
isRestarting: false
});
}
};
onReconnecting = () => {
this.props.dispatchSetAppValue({ isReconnecting: true });
}
};
onReconnected = () => {
@ -247,17 +247,17 @@ class SignalRConnector extends Component {
dispatchFetchIndexers();
dispatchFetchCommands();
repopulatePage();
}
};
onClose = () => {
console.debug('[signalR] connection closed');
}
};
onReceiveMessage = (message) => {
console.debug('[signalR] received', message.name, message.body);
this.handleMessage(message);
}
};
//
// Render

@ -38,7 +38,7 @@ class TableSelectCell extends Component {
} = this.props;
onSelectedChange({ id, value, shiftKey });
}
};
//
// Render

@ -35,7 +35,7 @@ class VirtualTableSelectCell extends Component {
} = this.props;
onSelectedChange({ id, value, shiftKey });
}
};
//
// Render

@ -21,7 +21,7 @@ class TableHeaderCell extends Component {
} else {
this.props.onSortPress(name);
}
}
};
//
// Render

@ -62,7 +62,7 @@ class TableOptionsModal extends Component {
pageSize: value,
pageSizeError
});
}
};
onVisibleChange = ({ name, value }) => {
const columns = _.cloneDeep(this.props.columns);
@ -71,7 +71,7 @@ class TableOptionsModal extends Component {
column.isVisible = value;
this.props.onTableOptionChange({ columns });
}
};
onColumnDragMove = (dragIndex, dropIndex) => {
if (this.state.dragIndex !== dragIndex || this.state.dropIndex !== dropIndex) {
@ -80,7 +80,7 @@ class TableOptionsModal extends Component {
dropIndex
});
}
}
};
onColumnDragEnd = ({ id }, didDrop) => {
const {
@ -100,7 +100,7 @@ class TableOptionsModal extends Component {
dragIndex: null,
dropIndex: null
});
}
};
//
// Render

@ -20,11 +20,11 @@ class TableOptionsModalWrapper extends Component {
onTableOptionsPress = () => {
this.setState({ isTableOptionsModalOpen: true });
}
};
onTableOptionsModalClose = () => {
this.setState({ isTableOptionsModalOpen: false });
}
};
//
// Render

@ -26,16 +26,16 @@ class TablePager extends Component {
onOpenPageSelectClick = () => {
this.setState({ isShowingPageSelect: true });
}
};
onPageSelect = ({ value: page }) => {
this.setState({ isShowingPageSelect: false });
this.props.onPageSelect(parseInt(page));
}
};
onPageSelectBlur = () => {
this.setState({ isShowingPageSelect: false });
}
};
//
// Render

@ -75,7 +75,7 @@ class VirtualTable extends Component {
setGridRef = (ref) => {
this._grid = ref;
}
};
//
// Listeners
@ -84,7 +84,7 @@ class VirtualTable extends Component {
this.setState({
width
});
}
};
//
// Render

@ -38,7 +38,7 @@ class VirtualTableHeaderCell extends Component {
} else {
this.props.onSortPress(name);
}
}
};
//
// Render

@ -80,20 +80,20 @@ class Tooltip extends Component {
}
return data;
}
};
//
// Listeners
onMeasure = ({ width }) => {
this.setState({ width });
}
};
onClick = () => {
if (isMobileUtil()) {
this.setState({ isOpen: !this.state.isOpen });
}
}
};
onMouseEnter = () => {
if (this._closeTimeout) {
@ -101,13 +101,13 @@ class Tooltip extends Component {
}
this.setState({ isOpen: true });
}
};
onMouseLeave = () => {
this._closeTimeout = setTimeout(() => {
this.setState({ isOpen: false });
}, 100);
}
};
//
// Render

@ -64,12 +64,12 @@ function keyboardShortcuts(WrappedComponent) {
bindShortcut = (key, callback, options = {}) => {
this._mousetrap.bind(key, callback);
this._mousetrapBindings[key] = options;
}
};
unbindShortcut = (key) => {
delete this._mousetrapBindings[key];
this._mousetrap.unbind(key);
}
};
unbindAllShortcuts = () => {
const keys = Object.keys(this._mousetrapBindings);
@ -83,7 +83,7 @@ function keyboardShortcuts(WrappedComponent) {
});
this._mousetrapBindings = {};
}
};
stopCallback = (event, element, combo) => {
const binding = this._mousetrapBindings[combo];
@ -98,7 +98,7 @@ function keyboardShortcuts(WrappedComponent) {
element.tagName === 'TEXTAREA' ||
(element.contentEditable && element.contentEditable === 'true')
);
}
};
//
// Render

@ -35,16 +35,16 @@ class History extends Component {
onClearHistoryPress = () => {
this.setState({ isClearHistoryModalOpen: true });
}
};
onClearHistoryModalClose = () => {
this.setState({ isClearHistoryModalOpen: false });
}
};
onConfirmClearHistory = () => {
this.setState({ isClearHistoryModalOpen: false });
this.props.onClearHistoryPress();
}
};
//
// Render

@ -69,42 +69,42 @@ 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 });
}
};
onClearHistoryPress = () => {
this.props.executeCommand({ name: commandNames.CLEAR_HISTORY });
}
};
onTableOptionChange = (payload) => {
this.props.setHistoryTableOption(payload);
@ -112,7 +112,7 @@ class HistoryConnector extends Component {
if (payload.pageSize) {
this.props.gotoHistoryFirstPage();
}
}
};
//
// Render

@ -43,7 +43,7 @@ class HistoryOptions extends Component {
this.setState(setting, () => {
dispatchSaveGeneralSettings(setting);
});
}
};
//
// Render

@ -52,15 +52,15 @@ class HistoryRow extends Component {
}
this.props.onSearchPress(data.query, indexer.id, categories);
}
};
onDetailsPress = () => {
this.setState({ isDetailsModalOpen: true });
}
};
onDetailsModalClose = () => {
this.setState({ isDetailsModalOpen: false });
}
};
//
// Render

@ -51,11 +51,11 @@ class HistoryRowConnector extends Component {
onSearchPress = (term, indexerId, categories) => {
this.props.setSearchDefault({ searchQuery: term, searchIndexerIds: [indexerId], searchCategories: categories });
this.props.push(`${window.Prowlarr.urlBase}/search`);
}
};
onMarkAsFailedPress = () => {
this.props.markAsFailed({ id: this.props.id });
}
};
//
// Render

@ -77,7 +77,7 @@ class AddIndexerModalContent extends Component {
onFilterChange = ({ value }) => {
this.setState({ filter: value });
}
};
//
// Render

@ -52,11 +52,11 @@ class AddIndexerModalContentConnector extends Component {
onIndexerSelect = ({ implementation, name }) => {
this.props.selectIndexerSchema({ implementation, name });
this.props.onModalClose({ indexerSelected: true });
}
};
onSortPress = (sortKey, sortDirection) => {
this.props.setIndexerSchemaSort({ sortKey, sortDirection });
}
};
//
// Render

@ -17,7 +17,7 @@ class AddIndexerPresetMenuItem extends Component {
name,
implementation
});
}
};
//
// Render

@ -17,7 +17,7 @@ class SelectIndexerRow extends Component {
} = this.props;
this.props.onIndexerSelect({ implementation, name });
}
};
//
// Render

@ -27,11 +27,11 @@ class DeleteIndexerModalContent extends Component {
onDeleteFilesChange = ({ value }) => {
this.setState({ deleteFiles: value });
}
};
onAddImportExclusionChange = ({ value }) => {
this.setState({ addImportExclusion: value });
}
};
onDeleteMovieConfirmed = () => {
const deleteFiles = this.state.deleteFiles;
@ -39,7 +39,7 @@ class DeleteIndexerModalContent extends Component {
this.setState({ deleteFiles: false, addImportExclusion: false });
this.props.onDeletePress(deleteFiles, addImportExclusion);
}
};
//
// Render

@ -32,7 +32,7 @@ class DeleteIndexerModalContentConnector extends Component {
});
this.props.onModalClose(true);
}
};
//
// Render

@ -33,7 +33,7 @@ class EditIndexerModalConnector extends Component {
this.props.dispatchCancelTestIndexer();
this.props.dispatchCancelSaveIndexer();
this.props.onModalClose();
}
};
//
// Render

@ -44,23 +44,23 @@ class EditIndexerModalContentConnector extends Component {
onInputChange = ({ name, value }) => {
this.props.setIndexerValue({ name, value });
}
};
onFieldChange = ({ name, value }) => {
this.props.setIndexerFieldValue({ name, value });
}
};
onSavePress = () => {
this.props.saveIndexer({ id: this.props.id });
}
};
onTestPress = () => {
this.props.testIndexer({ id: this.props.id });
}
};
onAdvancedSettingsPress = () => {
this.props.toggleAdvancedSettings();
}
};
//
// Render

@ -12,7 +12,7 @@ import styles from './DeleteIndexerModalContent.css';
class DeleteIndexerModalContent extends Component {
onDeleteMovieConfirmed = () => {
this.props.onDeleteSelectedPress();
}
};
//
// Render

@ -59,7 +59,7 @@ class IndexerEditorFooter extends Component {
default:
this.props.onSaveSelected({ [name]: value });
}
}
};
onApplyTagsPress = (tags, applyTags) => {
this.setState({
@ -71,23 +71,23 @@ class IndexerEditorFooter extends Component {
tags,
applyTags
});
}
};
onDeleteSelectedPress = () => {
this.setState({ isDeleteMovieModalOpen: true });
}
};
onDeleteMovieModalClose = () => {
this.setState({ isDeleteMovieModalOpen: false });
}
};
onTagsPress = () => {
this.setState({ isTagsModalOpen: true });
}
};
onTagsModalClose = () => {
this.setState({ isTagsModalOpen: false });
}
};
//
// Render

@ -34,7 +34,7 @@ class TagsModalContent extends Component {
onInputChange = ({ name, value }) => {
this.setState({ [name]: value });
}
};
onApplyTagsPress = () => {
const {
@ -43,7 +43,7 @@ class TagsModalContent extends Component {
} = this.state;
this.props.onApplyTagsPress(tags, applyTags);
}
};
//
// Render

@ -98,14 +98,14 @@ class IndexerIndex extends Component {
setScrollerRef = (ref) => {
this.setState({ scroller: ref });
}
};
getSelectedIds = () => {
if (this.state.allUnselected) {
return [];
}
return getSelectedIds(this.state.selectedState);
}
};
setSelectedState() {
const {
@ -191,18 +191,18 @@ class IndexerIndex extends Component {
onAddIndexerPress = () => {
this.setState({ isAddIndexerModalOpen: true });
}
};
onAddIndexerModalClose = ({ indexerSelected = false } = {}) => {
this.setState({
isAddIndexerModalOpen: false,
isEditIndexerModalOpen: indexerSelected
});
}
};
onEditIndexerModalClose = () => {
this.setState({ isEditIndexerModalOpen: false });
}
};
onMovieEditorTogglePress = () => {
if (this.state.isMovieEditorActive) {
@ -212,11 +212,11 @@ class IndexerIndex extends Component {
newState.isMovieEditorActive = true;
this.setState(newState);
}
}
};
onJumpBarItemPress = (jumpToCharacter) => {
this.setState({ jumpToCharacter });
}
};
onKeyUp = (event) => {
const jumpBarItems = this.state.jumpBarItems.order;
@ -228,28 +228,28 @@ class IndexerIndex extends Component {
this.setState({ jumpToCharacter: jumpBarItems[jumpBarItems.length - 1] });
}
}
}
};
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({
indexerIds: this.getSelectedIds(),
...changes
});
}
};
//
// Render

@ -57,11 +57,11 @@ class IndexerIndexConnector extends Component {
onSaveSelected = (payload) => {
this.props.dispatchSaveIndexerEditor(payload);
}
};
onScroll = ({ scrollTop }) => {
scrollPositions.movieIndex = scrollTop;
}
};
//
// Render

@ -27,22 +27,22 @@ class IndexerIndexActionsCell extends Component {
onEditMoviePress = () => {
this.setState({ isEditMovieModalOpen: true });
}
};
onEditMovieModalClose = () => {
this.setState({ isEditMovieModalOpen: false });
}
};
onDeleteMoviePress = () => {
this.setState({
isEditMovieModalOpen: false,
isDeleteMovieModalOpen: true
});
}
};
onDeleteMovieModalClose = () => {
this.setState({ isDeleteMovieModalOpen: false });
}
};
//
// Render

@ -27,11 +27,11 @@ class IndexerIndexHeader extends Component {
onTableOptionsPress = () => {
this.setState({ isTableOptionsModalOpen: true });
}
};
onTableOptionsModalClose = () => {
this.setState({ isTableOptionsModalOpen: false });
}
};
//
// Render

@ -34,35 +34,35 @@ class IndexerIndexRow extends Component {
onEditIndexerPress = () => {
this.setState({ isEditIndexerModalOpen: true });
}
};
onIndexerInfoPress = () => {
this.setState({ isIndexerInfoModalOpen: true });
}
};
onEditIndexerModalClose = () => {
this.setState({ isEditIndexerModalOpen: false });
}
};
onIndexerInfoModalClose = () => {
this.setState({ isIndexerInfoModalOpen: false });
}
};
onDeleteMoviePress = () => {
this.setState({
isEditIndexerModalOpen: false,
isDeleteMovieModalOpen: true
});
}
};
onDeleteMovieModalClose = () => {
this.setState({ isDeleteMovieModalOpen: false });
}
};
onUseSceneNumberingChange = () => {
// Mock handler to satisfy `onChange` being required for `CheckInput`.
//
}
};
//
// Render

@ -70,7 +70,7 @@ class IndexerIndexTable extends Component {
/>
</VirtualTableRow>
);
}
};
//
// Render

@ -43,7 +43,7 @@ class IndexerIndexTableOptions extends Component {
}
});
});
}
};
//
// Render

@ -68,7 +68,7 @@ class QueryParameterModal extends Component {
onInputSelectionChange = (selectionStart, selectionEnd) => {
this._selectionStart = selectionStart;
this._selectionEnd = selectionEnd;
}
};
onOptionPress = ({ isFullFilename, tokenValue }) => {
const {
@ -96,12 +96,12 @@ class QueryParameterModal extends Component {
this._selectionStart = newValue.length - 1;
this._selectionEnd = newValue.length - 1;
}
}
};
onInputChange = ({ name, value }) => {
this.props.onSearchInputChange({ value: '' });
this.props.onInputChange({ name, value });
}
};
//
// Render

@ -24,7 +24,7 @@ class QueryParameterOption extends Component {
tokenValue = tokenValue.replace(/ /g, tokenSeparator);
onPress({ isFullFilename, tokenValue });
}
};
//
// Render

@ -108,19 +108,19 @@ class SearchFooter extends Component {
},
isQueryParameterModalOpen: true
});
}
};
onQueryParameterModalClose = () => {
this.setState({ isQueryParameterModalOpen: false });
}
};
onSearchPress = () => {
this.props.onSearchPress(this.state.searchQuery, this.state.searchIndexerIds, this.state.searchCategories, this.state.searchType);
}
};
onSearchInputChange = ({ value }) => {
this.setState({ searchQuery: value });
}
};
//
// Render

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save