This commit is contained in:
@@ -178,7 +178,7 @@ export function SettingsHeader({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
{setSortBy !== undefined && (
|
{setSortBy !== undefined && !disabled && (
|
||||||
<Menu>
|
<Menu>
|
||||||
<Menu.Target>
|
<Menu.Target>
|
||||||
<ActionIcon>
|
<ActionIcon>
|
||||||
@@ -271,7 +271,7 @@ export function SettingsHeader({
|
|||||||
)}
|
)}
|
||||||
</Group>
|
</Group>
|
||||||
)}
|
)}
|
||||||
{setDragging && (
|
{setDragging && sortBy === 'Custom' && (
|
||||||
<Switch
|
<Switch
|
||||||
className={switchClasses.default}
|
className={switchClasses.default}
|
||||||
classNames={switchClasses}
|
classNames={switchClasses}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export function GuacamoleClients() {
|
|||||||
});
|
});
|
||||||
const guacamoleClients: GuacamoleClient[] =
|
const guacamoleClients: GuacamoleClient[] =
|
||||||
guacamoleClientsData
|
guacamoleClientsData
|
||||||
.filter(
|
?.filter(
|
||||||
(a: GuacamoleClient) =>
|
(a: GuacamoleClient) =>
|
||||||
a.clientName
|
a.clientName
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
@@ -57,7 +57,7 @@ export function GuacamoleClients() {
|
|||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.includes((debouncedSearch as string).toLowerCase()),
|
.includes((debouncedSearch as string).toLowerCase()),
|
||||||
)
|
)
|
||||||
.sort((a: GuacamoleClient, b: GuacamoleClient) => {
|
?.sort((a: GuacamoleClient, b: GuacamoleClient) => {
|
||||||
switch (settings.guacamoleClientsSettingsSort) {
|
switch (settings.guacamoleClientsSettingsSort) {
|
||||||
case 'A>Z':
|
case 'A>Z':
|
||||||
return a.clientName.toLocaleLowerCase() > b.clientName.toLocaleLowerCase()
|
return a.clientName.toLocaleLowerCase() > b.clientName.toLocaleLowerCase()
|
||||||
|
|||||||
@@ -63,13 +63,13 @@ export function SearchProviders() {
|
|||||||
const [debouncedSearch] = useDebouncedValue(searchValue, 500);
|
const [debouncedSearch] = useDebouncedValue(searchValue, 500);
|
||||||
const providers: Provider[] =
|
const providers: Provider[] =
|
||||||
providerData
|
providerData
|
||||||
.filter(
|
?.filter(
|
||||||
(a: Provider) =>
|
(a: Provider) =>
|
||||||
a.name.toLowerCase().includes((debouncedSearch as string).toLowerCase()) ||
|
a.name.toLowerCase().includes((debouncedSearch as string).toLowerCase()) ||
|
||||||
a.url.toLowerCase().includes((debouncedSearch as string).toLowerCase()) ||
|
a.url.toLowerCase().includes((debouncedSearch as string).toLowerCase()) ||
|
||||||
a.prefix.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) {
|
switch (settings.providerSettingsSort) {
|
||||||
case 'A>Z':
|
case 'A>Z':
|
||||||
return a.name.toLocaleLowerCase() > b.name.toLocaleLowerCase() ? 1 : -1;
|
return a.name.toLocaleLowerCase() > b.name.toLocaleLowerCase() ? 1 : -1;
|
||||||
|
|||||||
@@ -43,12 +43,12 @@ export function WolClients() {
|
|||||||
const [debouncedSearch] = useDebouncedValue(searchValue, 500);
|
const [debouncedSearch] = useDebouncedValue(searchValue, 500);
|
||||||
const wolClients: WolClient[] =
|
const wolClients: WolClient[] =
|
||||||
wolClientsData
|
wolClientsData
|
||||||
.filter(
|
?.filter(
|
||||||
(a: WolClient) =>
|
(a: WolClient) =>
|
||||||
a.hostname.toLowerCase().includes((debouncedSearch as string).toLowerCase()) ||
|
a.hostname.toLowerCase().includes((debouncedSearch as string).toLowerCase()) ||
|
||||||
a.macAddress.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) {
|
switch (settings.wolClientsSettingsSort) {
|
||||||
case 'A>Z':
|
case 'A>Z':
|
||||||
return a.hostname.toLocaleLowerCase() > b.hostname.toLocaleLowerCase()
|
return a.hostname.toLocaleLowerCase() > b.hostname.toLocaleLowerCase()
|
||||||
|
|||||||
Reference in New Issue
Block a user