mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
Merge pull request #7 from simoleo89/pr/underpass-room-setting
feat(room-settings): add underpass walk-under-furniture checkbox
This commit is contained in:
@@ -11,6 +11,7 @@ export interface IRoomData
|
|||||||
tags: string[];
|
tags: string[];
|
||||||
tradeState: number;
|
tradeState: number;
|
||||||
allowWalkthrough: boolean;
|
allowWalkthrough: boolean;
|
||||||
|
allowUnderpass: boolean;
|
||||||
lockState: number;
|
lockState: number;
|
||||||
password: string;
|
password: string;
|
||||||
allowPets: boolean;
|
allowPets: boolean;
|
||||||
|
|||||||
@@ -162,6 +162,11 @@ export const NavigatorRoomSettingsBasicTabView: FC<NavigatorRoomSettingsTabViewP
|
|||||||
<input className="form-check-input" type="checkbox" checked={ roomData.allowWalkthrough } onChange={ event => handleChange('allow_walkthrough', event.target.checked) } />
|
<input className="form-check-input" type="checkbox" checked={ roomData.allowWalkthrough } onChange={ event => handleChange('allow_walkthrough', event.target.checked) } />
|
||||||
<Text>{ LocalizeText('navigator.roomsettings.allow_walk_through') }</Text>
|
<Text>{ LocalizeText('navigator.roomsettings.allow_walk_through') }</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
<Flex alignItems="center" gap={ 1 }>
|
||||||
|
<Base className="col-3" />
|
||||||
|
<input className="form-check-input" type="checkbox" checked={ roomData.allowUnderpass } onChange={ event => handleChange('allow_underpass', event.target.checked) } />
|
||||||
|
<Text>{ LocalizeText('navigator.roomsettings.allow_underpass') }</Text>
|
||||||
|
</Flex>
|
||||||
<Text variant="danger" underline bold pointer className="d-flex justify-content-center align-items-center gap-1" onClick={ deleteRoom }>
|
<Text variant="danger" underline bold pointer className="d-flex justify-content-center align-items-center gap-1" onClick={ deleteRoom }>
|
||||||
<FaTimes className="fa-icon" /> { LocalizeText('navigator.roomsettings.delete') }
|
<FaTimes className="fa-icon" /> { LocalizeText('navigator.roomsettings.delete') }
|
||||||
</Text>
|
</Text>
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ export const NavigatorRoomSettingsView: FC<{}> = props =>
|
|||||||
tags: data.tags,
|
tags: data.tags,
|
||||||
tradeState: data.tradeMode,
|
tradeState: data.tradeMode,
|
||||||
allowWalkthrough: data.allowWalkThrough,
|
allowWalkthrough: data.allowWalkThrough,
|
||||||
|
allowUnderpass: data.allowUnderpass,
|
||||||
lockState: data.doorMode,
|
lockState: data.doorMode,
|
||||||
password: null,
|
password: null,
|
||||||
allowPets: data.allowPets,
|
allowPets: data.allowPets,
|
||||||
@@ -98,6 +99,9 @@ export const NavigatorRoomSettingsView: FC<{}> = props =>
|
|||||||
case 'allow_walkthrough':
|
case 'allow_walkthrough':
|
||||||
newValue.allowWalkthrough = Boolean(value);
|
newValue.allowWalkthrough = Boolean(value);
|
||||||
break;
|
break;
|
||||||
|
case 'allow_underpass':
|
||||||
|
newValue.allowUnderpass = Boolean(value);
|
||||||
|
break;
|
||||||
case 'allow_pets':
|
case 'allow_pets':
|
||||||
newValue.allowPets = Boolean(value);
|
newValue.allowPets = Boolean(value);
|
||||||
break;
|
break;
|
||||||
@@ -171,7 +175,8 @@ export const NavigatorRoomSettingsView: FC<{}> = props =>
|
|||||||
newValue.chatSettings.weight,
|
newValue.chatSettings.weight,
|
||||||
newValue.chatSettings.speed,
|
newValue.chatSettings.speed,
|
||||||
newValue.chatSettings.distance,
|
newValue.chatSettings.distance,
|
||||||
newValue.chatSettings.protection
|
newValue.chatSettings.protection,
|
||||||
|
newValue.allowUnderpass
|
||||||
));
|
));
|
||||||
|
|
||||||
return newValue;
|
return newValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user