feat: sort quality profiles ASC in request and service configuration (#1805)
This commit is contained in:
@@ -367,24 +367,31 @@ const AdvancedRequester = ({
|
|||||||
)}
|
)}
|
||||||
{!isValidating &&
|
{!isValidating &&
|
||||||
serverData &&
|
serverData &&
|
||||||
serverData.profiles.map((profile) => (
|
serverData.profiles
|
||||||
<option
|
.toSorted((a, b) =>
|
||||||
key={`profile-list${profile.id}`}
|
a.name.localeCompare(b.name, intl.locale, {
|
||||||
value={profile.id}
|
numeric: true,
|
||||||
>
|
sensitivity: 'base',
|
||||||
{isAnime &&
|
})
|
||||||
serverData.server.activeAnimeProfileId === profile.id
|
)
|
||||||
? intl.formatMessage(messages.default, {
|
.map((profile) => (
|
||||||
name: profile.name,
|
<option
|
||||||
})
|
key={`profile-list${profile.id}`}
|
||||||
: !isAnime &&
|
value={profile.id}
|
||||||
serverData.server.activeProfileId === profile.id
|
>
|
||||||
|
{isAnime &&
|
||||||
|
serverData.server.activeAnimeProfileId === profile.id
|
||||||
? intl.formatMessage(messages.default, {
|
? intl.formatMessage(messages.default, {
|
||||||
name: profile.name,
|
name: profile.name,
|
||||||
})
|
})
|
||||||
: profile.name}
|
: !isAnime &&
|
||||||
</option>
|
serverData.server.activeProfileId === profile.id
|
||||||
))}
|
? intl.formatMessage(messages.default, {
|
||||||
|
name: profile.name,
|
||||||
|
})
|
||||||
|
: profile.name}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -526,14 +526,21 @@ const RadarrModal = ({ onClose, radarr, onSave }: RadarrModalProps) => {
|
|||||||
)}
|
)}
|
||||||
</option>
|
</option>
|
||||||
{testResponse.profiles.length > 0 &&
|
{testResponse.profiles.length > 0 &&
|
||||||
testResponse.profiles.map((profile) => (
|
testResponse.profiles
|
||||||
<option
|
.toSorted((a, b) =>
|
||||||
key={`loaded-profile-${profile.id}`}
|
a.name.localeCompare(b.name, intl.locale, {
|
||||||
value={profile.id}
|
numeric: true,
|
||||||
>
|
sensitivity: 'base',
|
||||||
{profile.name}
|
})
|
||||||
</option>
|
)
|
||||||
))}
|
.map((profile) => (
|
||||||
|
<option
|
||||||
|
key={`loaded-profile-${profile.id}`}
|
||||||
|
value={profile.id}
|
||||||
|
>
|
||||||
|
{profile.name}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
{errors.activeProfileId &&
|
{errors.activeProfileId &&
|
||||||
|
|||||||
@@ -583,14 +583,21 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => {
|
|||||||
)}
|
)}
|
||||||
</option>
|
</option>
|
||||||
{testResponse.profiles.length > 0 &&
|
{testResponse.profiles.length > 0 &&
|
||||||
testResponse.profiles.map((profile) => (
|
testResponse.profiles
|
||||||
<option
|
.toSorted((a, b) =>
|
||||||
key={`loaded-profile-${profile.id}`}
|
a.name.localeCompare(b.name, intl.locale, {
|
||||||
value={profile.id}
|
numeric: true,
|
||||||
>
|
sensitivity: 'base',
|
||||||
{profile.name}
|
})
|
||||||
</option>
|
)
|
||||||
))}
|
.map((profile) => (
|
||||||
|
<option
|
||||||
|
key={`loaded-profile-${profile.id}`}
|
||||||
|
value={profile.id}
|
||||||
|
>
|
||||||
|
{profile.name}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
{errors.activeProfileId &&
|
{errors.activeProfileId &&
|
||||||
@@ -795,14 +802,21 @@ const SonarrModal = ({ onClose, sonarr, onSave }: SonarrModalProps) => {
|
|||||||
)}
|
)}
|
||||||
</option>
|
</option>
|
||||||
{testResponse.profiles.length > 0 &&
|
{testResponse.profiles.length > 0 &&
|
||||||
testResponse.profiles.map((profile) => (
|
testResponse.profiles
|
||||||
<option
|
.toSorted((a, b) =>
|
||||||
key={`loaded-profile-${profile.id}`}
|
a.name.localeCompare(b.name, intl.locale, {
|
||||||
value={profile.id}
|
numeric: true,
|
||||||
>
|
sensitivity: 'base',
|
||||||
{profile.name}
|
})
|
||||||
</option>
|
)
|
||||||
))}
|
.map((profile) => (
|
||||||
|
<option
|
||||||
|
key={`loaded-profile-anime-${profile.id}`}
|
||||||
|
value={profile.id}
|
||||||
|
>
|
||||||
|
{profile.name}
|
||||||
|
</option>
|
||||||
|
))}
|
||||||
</Field>
|
</Field>
|
||||||
</div>
|
</div>
|
||||||
{errors.activeAnimeProfileId &&
|
{errors.activeAnimeProfileId &&
|
||||||
|
|||||||
Reference in New Issue
Block a user