mirror of
https://github.com/wanderer-industries/wanderer
synced 2025-12-12 10:45:54 +00:00
Merge branch 'refs/heads/main' into feat-windows-new
This commit is contained in:
@@ -6,7 +6,6 @@ import clsx from 'clsx';
|
|||||||
import { useMapRootState } from '@/hooks/Mapper/mapRootProvider';
|
import { useMapRootState } from '@/hooks/Mapper/mapRootProvider';
|
||||||
import { useMapGetOption } from '@/hooks/Mapper/mapRootProvider/hooks/api';
|
import { useMapGetOption } from '@/hooks/Mapper/mapRootProvider/hooks/api';
|
||||||
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
EFFECT_BACKGROUND_STYLES,
|
EFFECT_BACKGROUND_STYLES,
|
||||||
LABELS_INFO,
|
LABELS_INFO,
|
||||||
@@ -77,11 +76,9 @@ export const SolarSystemNode = memo(({ data, selected }: WrapNodeProps<MapSolarS
|
|||||||
|
|
||||||
const { locked, name, tag, status, labels, id, temporary_name: temporaryName } = data || {};
|
const { locked, name, tag, status, labels, id, temporary_name: temporaryName } = data || {};
|
||||||
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
data: {
|
data: {
|
||||||
characters,
|
characters,
|
||||||
presentCharacters,
|
|
||||||
wormholesData,
|
wormholesData,
|
||||||
hubs,
|
hubs,
|
||||||
kills,
|
kills,
|
||||||
@@ -98,10 +95,8 @@ export const SolarSystemNode = memo(({ data, selected }: WrapNodeProps<MapSolarS
|
|||||||
const visible = useMemo(() => visibleNodes.has(id), [id, visibleNodes]);
|
const visible = useMemo(() => visibleNodes.has(id), [id, visibleNodes]);
|
||||||
|
|
||||||
const charactersInSystem = useMemo(() => {
|
const charactersInSystem = useMemo(() => {
|
||||||
return characters
|
return characters.filter(c => c.location?.solar_system_id === solar_system_id).filter(c => c.online);
|
||||||
.filter(c => c.location?.solar_system_id === solar_system_id)
|
}, [characters, solar_system_id]);
|
||||||
.filter(c => c.online);
|
|
||||||
}, [characters, presentCharacters, solar_system_id]);
|
|
||||||
|
|
||||||
const isWormhole = isWormholeSpace(system_class);
|
const isWormhole = isWormholeSpace(system_class);
|
||||||
const classTitleColor = useMemo(
|
const classTitleColor = useMemo(
|
||||||
@@ -190,7 +185,6 @@ export const SolarSystemNode = memo(({ data, selected }: WrapNodeProps<MapSolarS
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div
|
<div
|
||||||
onMouseDownCapture={dbClick}
|
|
||||||
className={clsx(
|
className={clsx(
|
||||||
classes.RootCustomNode,
|
classes.RootCustomNode,
|
||||||
regionClass,
|
regionClass,
|
||||||
@@ -200,7 +194,7 @@ export const SolarSystemNode = memo(({ data, selected }: WrapNodeProps<MapSolarS
|
|||||||
'px-[6px] pt-[2px] pb-[3px] text-[10px]',
|
'px-[6px] pt-[2px] pb-[3px] text-[10px]',
|
||||||
'leading-[1] space-y-[1px]',
|
'leading-[1] space-y-[1px]',
|
||||||
'shadow-[0_0_5px_rgba(45,45,45,0.5)]',
|
'shadow-[0_0_5px_rgba(45,45,45,0.5)]',
|
||||||
'border border-[var(--pastel-blue-darken10)] rounded-[5px]'
|
'border border-[var(--pastel-blue-darken10)] rounded-[5px]',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{visible && (
|
{visible && (
|
||||||
@@ -211,9 +205,7 @@ export const SolarSystemNode = memo(({ data, selected }: WrapNodeProps<MapSolarS
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{tag != null && tag !== '' && (
|
{tag != null && tag !== '' && (
|
||||||
<div className={clsx(classes.TagTitle, "color: #38bdf8; font-weight: 500;")}>
|
<div className={clsx(classes.TagTitle, 'color: #38bdf8; font-weight: 500;')}>{tag}</div>
|
||||||
{tag}
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@@ -239,18 +231,12 @@ export const SolarSystemNode = memo(({ data, selected }: WrapNodeProps<MapSolarS
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={clsx(classes.BottomRow, 'flex items-center gap-[3px]')}>
|
<div className={clsx(classes.BottomRow, 'flex items-center gap-[3px]')}>
|
||||||
{customName && (
|
{customName && <div className={clsx('font-bold', classes.customName)}>{customName}</div>}
|
||||||
<div className={clsx('font-bold', classes.customName)}>
|
|
||||||
{customName}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{!isWormhole && !customName && <div className={clsx(classes.regionName)}>{region_name}</div>}
|
{!isWormhole && !customName && <div className={clsx(classes.regionName)}>{region_name}</div>}
|
||||||
{isWormhole && !customName && <div />}
|
{isWormhole && !customName && <div />}
|
||||||
|
|
||||||
<div className="flex items-center ml-auto gap-[2px]">
|
<div className="flex items-center ml-auto gap-[2px]">
|
||||||
{locked && (
|
{locked && <i className={clsx(PrimeIcons.LOCK, 'text-[0.45rem] font-bold')} />}
|
||||||
<i className={clsx(PrimeIcons.LOCK, 'text-[0.45rem] font-bold')} />
|
|
||||||
)}
|
|
||||||
{hubs.includes(solar_system_id.toString()) && (
|
{hubs.includes(solar_system_id.toString()) && (
|
||||||
<i className={clsx(PrimeIcons.MAP_MARKER, 'text-[0.45rem] font-bold')} />
|
<i className={clsx(PrimeIcons.MAP_MARKER, 'text-[0.45rem] font-bold')} />
|
||||||
)}
|
)}
|
||||||
@@ -259,7 +245,7 @@ export const SolarSystemNode = memo(({ data, selected }: WrapNodeProps<MapSolarS
|
|||||||
className={clsx(
|
className={clsx(
|
||||||
classes.localCounter,
|
classes.localCounter,
|
||||||
{ [classes.hasUserCharacters]: hasUserCharacters },
|
{ [classes.hasUserCharacters]: hasUserCharacters },
|
||||||
'flex gap-[2px]'
|
'flex gap-[2px]',
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<i className="pi pi-users text-[0.50rem]" />
|
<i className="pi pi-users text-[0.50rem]" />
|
||||||
@@ -287,7 +273,7 @@ export const SolarSystemNode = memo(({ data, selected }: WrapNodeProps<MapSolarS
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<div className={classes.Handlers}>
|
<div onMouseDownCapture={dbClick} className={classes.Handlers}>
|
||||||
<Handle
|
<Handle
|
||||||
type="source"
|
type="source"
|
||||||
className={clsx(classes.Handle, classes.HandleTop, {
|
className={clsx(classes.Handle, classes.HandleTop, {
|
||||||
|
|||||||
Reference in New Issue
Block a user