Sort fixes
All checks were successful
Deploy to production / build (push) Successful in 18s

This commit is contained in:
2026-10-20 19:19:27 -05:00
parent 2f8d3ad58e
commit e6c5f02a50
4 changed files with 8 additions and 8 deletions

View File

@@ -178,7 +178,7 @@ export function SettingsHeader({
)
}
/>
{setSortBy !== undefined && (
{setSortBy !== undefined && !disabled && (
<Menu>
<Menu.Target>
<ActionIcon>
@@ -271,7 +271,7 @@ export function SettingsHeader({
)}
</Group>
)}
{setDragging && (
{setDragging && sortBy === 'Custom' && (
<Switch
className={switchClasses.default}
classNames={switchClasses}

View File

@@ -48,7 +48,7 @@ export function GuacamoleClients() {
});
const guacamoleClients: GuacamoleClient[] =
guacamoleClientsData
.filter(
?.filter(
(a: GuacamoleClient) =>
a.clientName
.toLowerCase()
@@ -57,7 +57,7 @@ export function GuacamoleClients() {
.toLowerCase()
.includes((debouncedSearch as string).toLowerCase()),
)
.sort((a: GuacamoleClient, b: GuacamoleClient) => {
?.sort((a: GuacamoleClient, b: GuacamoleClient) => {
switch (settings.guacamoleClientsSettingsSort) {
case 'A>Z':
return a.clientName.toLocaleLowerCase() > b.clientName.toLocaleLowerCase()

View File

@@ -63,13 +63,13 @@ export function SearchProviders() {
const [debouncedSearch] = useDebouncedValue(searchValue, 500);
const providers: Provider[] =
providerData
.filter(
?.filter(
(a: Provider) =>
a.name.toLowerCase().includes((debouncedSearch as string).toLowerCase()) ||
a.url.toLowerCase().includes((debouncedSearch as string).toLowerCase()) ||
a.prefix.toLowerCase().includes((debouncedSearch as string).toLowerCase()),
)
.sort((a: Provider, b: Provider) => {
?.sort((a: Provider, b: Provider) => {
switch (settings.providerSettingsSort) {
case 'A>Z':
return a.name.toLocaleLowerCase() > b.name.toLocaleLowerCase() ? 1 : -1;

View File

@@ -43,12 +43,12 @@ export function WolClients() {
const [debouncedSearch] = useDebouncedValue(searchValue, 500);
const wolClients: WolClient[] =
wolClientsData
.filter(
?.filter(
(a: WolClient) =>
a.hostname.toLowerCase().includes((debouncedSearch as string).toLowerCase()) ||
a.macAddress.toLowerCase().includes((debouncedSearch as string).toLowerCase()),
)
.sort((a: WolClient, b: WolClient) => {
?.sort((a: WolClient, b: WolClient) => {
switch (settings.wolClientsSettingsSort) {
case 'A>Z':
return a.hostname.toLocaleLowerCase() > b.hostname.toLocaleLowerCase()