mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 23:16:21 +00:00
f4ddf406ad
- 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
27 lines
944 B
TypeScript
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 } /> } />
|
|
);
|
|
};
|