New: (UI) Show indexer id as hint in IndexerSelect

pull/1787/head
Bogdan 1 year ago
parent a5d83459e9
commit a26aa4bd1e

@ -37,7 +37,7 @@ function HintedSelectInputOption(props) {
{
hint != null &&
<div className={styles.hintText}>
<div className={styles.hintText} title={hint}>
{hint}
</div>
}

@ -1,4 +1,4 @@
import _ from 'lodash';
import { groupBy, map } from 'lodash';
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { connect } from 'react-redux';
@ -12,7 +12,7 @@ function createMapStateToProps() {
(state) => state.indexers,
(value, indexers) => {
const values = [];
const groupedIndexers = _.map(_.groupBy(indexers.items, 'protocol'), (val, key) => ({ protocol: key, indexers: val }));
const groupedIndexers = map(groupBy(indexers.items, 'protocol'), (val, key) => ({ protocol: key, indexers: val }));
groupedIndexers.forEach((element) => {
values.push({
@ -25,6 +25,7 @@ function createMapStateToProps() {
values.push({
key: indexer.id,
value: indexer.name,
hint: `(${indexer.id})`,
isDisabled: !indexer.enable,
parentKey: element.protocol === 'usenet' ? -1 : -2
});
@ -50,7 +51,6 @@ class IndexersSelectInputConnector extends Component {
// Render
render() {
return (
<EnhancedSelectInput
{...this.props}

Loading…
Cancel
Save