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