diff --git a/assets/js/hooks/Mapper/components/mapInterface/components/AddSystemDialog/AddSystemDialog.tsx b/assets/js/hooks/Mapper/components/mapInterface/components/AddSystemDialog/AddSystemDialog.tsx index 0497efb7..2096a1f4 100644 --- a/assets/js/hooks/Mapper/components/mapInterface/components/AddSystemDialog/AddSystemDialog.tsx +++ b/assets/js/hooks/Mapper/components/mapInterface/components/AddSystemDialog/AddSystemDialog.tsx @@ -1,15 +1,15 @@ -import { Dialog } from 'primereact/dialog'; -import { useMapRootState } from '@/hooks/Mapper/mapRootProvider'; -import { useCallback, useRef, useState } from 'react'; -import { IconField } from 'primereact/iconfield'; -import { AutoComplete } from 'primereact/autocomplete'; -import { OutCommand, SearchSystemItem } from '@/hooks/Mapper/types'; import { SystemViewStandalone, WdButton, WHClassView, WHEffectView } from '@/hooks/Mapper/components/ui-kit'; +import { useMapRootState } from '@/hooks/Mapper/mapRootProvider'; +import { OutCommand, SearchSystemItem } from '@/hooks/Mapper/types'; +import { AutoComplete } from 'primereact/autocomplete'; +import { Dialog } from 'primereact/dialog'; +import { IconField } from 'primereact/iconfield'; +import { useCallback, useRef, useState } from 'react'; import classes from './AddSystemDialog.module.scss'; -import clsx from 'clsx'; import { isWormholeSpace } from '@/hooks/Mapper/components/map/helpers/isWormholeSpace.ts'; import { sortWHClasses } from '@/hooks/Mapper/helpers'; +import clsx from 'clsx'; export type SearchOnSubmitCallback = (item: SearchSystemItem) => void; @@ -115,90 +115,93 @@ export const AddSystemDialog = ({ setVisible(false); }} > -
-
-
- - { - setSelectedItem(e.value.length < 2 ? e.value : [e.value[e.value.length - 1]]); - }} - emptyMessage="Not found any system..." - placeholder="Type here..." - field="label" - id="value" - className="w-full" - itemTemplate={(item: SearchSystemItem) => { - const { security, system_class, effect_power, effect_name, statics } = item.system_static_info; - const sortedStatics = sortWHClasses(wormholesData, statics); - const isWH = isWormholeSpace(system_class); +
+
+
+
+ + { + setSelectedItem(e.value.length < 2 ? e.value : [e.value[e.value.length - 1]]); + }} + emptyMessage="Not found any system..." + placeholder="Type here..." + field="label" + id="value" + className="w-full" + itemTemplate={(item: SearchSystemItem) => { + const { security, system_class, effect_power, effect_name, statics } = item.system_static_info; + const sortedStatics = sortWHClasses(wormholesData, statics); + const isWH = isWormholeSpace(system_class); - return ( -
- - - {effect_name && isWH && ( - + - )} - {isWH && ( -
-
-
- {sortedStatics.map(x => ( - - ))} + {effect_name && isWH && ( + + )} + + {isWH && ( +
+
+
+ {sortedStatics.map(x => ( + + ))} +
-
- )} -
- ); - }} - selectedItemTemplate={(item: SearchSystemItem) => ( - - )} - /> - + )} +
+ ); + }} + selectedItemTemplate={(item: SearchSystemItem) => ( + + )} + /> +
- *to search type at least 2 symbols. + *to search type at least 2 symbols. +
+
+ +
+
- -
- -
-
+ ); }; diff --git a/assets/js/hooks/Mapper/components/mapInterface/components/SystemCustomLabelDialog/SystemCustomLabelDialog.tsx b/assets/js/hooks/Mapper/components/mapInterface/components/SystemCustomLabelDialog/SystemCustomLabelDialog.tsx index bd206e9a..63f0bedc 100644 --- a/assets/js/hooks/Mapper/components/mapInterface/components/SystemCustomLabelDialog/SystemCustomLabelDialog.tsx +++ b/assets/js/hooks/Mapper/components/mapInterface/components/SystemCustomLabelDialog/SystemCustomLabelDialog.tsx @@ -1,12 +1,12 @@ -import { InputText } from 'primereact/inputtext'; -import { Dialog } from 'primereact/dialog'; +import { TooltipPosition, WdButton, WdImageSize, WdImgButton } from '@/hooks/Mapper/components/ui-kit'; import { getSystemById } from '@/hooks/Mapper/helpers'; import { useMapRootState } from '@/hooks/Mapper/mapRootProvider'; -import { useCallback, useEffect, useRef, useState } from 'react'; import { OutCommand } from '@/hooks/Mapper/types'; -import { IconField } from 'primereact/iconfield'; import { LabelsManager } from '@/hooks/Mapper/utils/labelsManager.ts'; -import { TooltipPosition, WdButton, WdImageSize, WdImgButton } from '@/hooks/Mapper/components/ui-kit'; +import { Dialog } from 'primereact/dialog'; +import { IconField } from 'primereact/iconfield'; +import { InputText } from 'primereact/inputtext'; +import { useCallback, useEffect, useRef, useState } from 'react'; interface SystemCustomLabelDialog { systemId: string; @@ -125,7 +125,7 @@ export const SystemCustomLabelDialog = ({ systemId, visible, setVisible }: Syste
- +
diff --git a/assets/js/hooks/Mapper/components/mapInterface/components/SystemPingDialog/SystemPingDialog.tsx b/assets/js/hooks/Mapper/components/mapInterface/components/SystemPingDialog/SystemPingDialog.tsx index 19d6fdea..91089bf3 100644 --- a/assets/js/hooks/Mapper/components/mapInterface/components/SystemPingDialog/SystemPingDialog.tsx +++ b/assets/js/hooks/Mapper/components/mapInterface/components/SystemPingDialog/SystemPingDialog.tsx @@ -1,11 +1,11 @@ -import { InputTextarea } from 'primereact/inputtextarea'; -import { Dialog } from 'primereact/dialog'; +import { SystemView, WdButton } from '@/hooks/Mapper/components/ui-kit'; import { useMapRootState } from '@/hooks/Mapper/mapRootProvider'; -import { useCallback, useRef, useState } from 'react'; import { OutCommand } from '@/hooks/Mapper/types'; import { PingType } from '@/hooks/Mapper/types/ping.ts'; -import { SystemView, WdButton } from '@/hooks/Mapper/components/ui-kit'; import clsx from 'clsx'; +import { Dialog } from 'primereact/dialog'; +import { InputTextarea } from 'primereact/inputtextarea'; +import { useCallback, useRef, useState } from 'react'; const PING_TITLES = { [PingType.Rally]: 'RALLY', @@ -62,7 +62,7 @@ export const SystemPingDialog = ({ systemId, type, visible, setVisible }: System } visible={visible} - draggable={false} + draggable={true} style={{ width: '450px' }} onShow={onShow} onHide={() => { @@ -91,7 +91,7 @@ export const SystemPingDialog = ({ systemId, type, visible, setVisible }: System
- +
diff --git a/assets/js/hooks/Mapper/components/mapInterface/widgets/RoutesWidget/RoutesSettingsDialog/RoutesSettingsDialog.tsx b/assets/js/hooks/Mapper/components/mapInterface/widgets/RoutesWidget/RoutesSettingsDialog/RoutesSettingsDialog.tsx index 2cd4ef2e..d2390940 100644 --- a/assets/js/hooks/Mapper/components/mapInterface/widgets/RoutesWidget/RoutesSettingsDialog/RoutesSettingsDialog.tsx +++ b/assets/js/hooks/Mapper/components/mapInterface/widgets/RoutesWidget/RoutesSettingsDialog/RoutesSettingsDialog.tsx @@ -1,9 +1,9 @@ -import { Dialog } from 'primereact/dialog'; -import { useCallback, useEffect, useRef, useState } from 'react'; import { useRouteProvider } from '@/hooks/Mapper/components/mapInterface/widgets/RoutesWidget/RoutesProvider.tsx'; import { PrettySwitchbox } from '@/hooks/Mapper/components/mapRootContent/components/MapSettings/components'; import { WdButton } from '@/hooks/Mapper/components/ui-kit'; import { RoutesType } from '@/hooks/Mapper/mapRootProvider/types.ts'; +import { Dialog } from 'primereact/dialog'; +import { useCallback, useEffect, useRef, useState } from 'react'; interface RoutesSettingsDialog { visible: boolean;