This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user