Files
Nitro-V3/src/components/wired/views/actions/WiredActionUnfreezeView.tsx
T
Lorenzune f4ddf406ad feat(wired-ui): add freeze and furni movement action views
- add UI support for FREEZE, UNFREEZE, FURNI_TO_USER, USER_TO_FURNI and FURNI_TO_FURNI

- add secondary furni source 101 and dual furni-source labels for furni-to-furni targeting

- extend source selectors for custom source sets and titles

- add green primary and blue secondary wired highlights

- clear wired highlights globally on close, reopen and save to avoid stuck selections
2026-03-18 17:38:49 +01:00

27 lines
944 B
TypeScript

import { FC, useEffect, useState } from 'react';
import { WiredFurniType } from '../../../../api';
import { useWired } from '../../../../hooks';
import { WiredActionBaseView } from './WiredActionBaseView';
import { WiredSourcesSelector } from '../WiredSourcesSelector';
export const WiredActionUnfreezeView: FC<{}> = () =>
{
const [ userSource, setUserSource ] = useState(0);
const { trigger = null, setIntParams = null } = useWired();
const save = () => setIntParams([ userSource ]);
useEffect(() =>
{
setUserSource((trigger?.intData?.length > 0) ? trigger.intData[0] : 0);
}, [ trigger ]);
return (
<WiredActionBaseView
hasSpecialInput={ true }
requiresFurni={ WiredFurniType.STUFF_SELECTION_OPTION_NONE }
save={ save }
footer={ <WiredSourcesSelector showUsers={ true } userSource={ userSource } onChangeUsers={ setUserSource } /> } />
);
};