Fixed required changes

This commit is contained in:
oobjectt 2022-12-13 21:52:40 +01:00
parent e4a9b8a9ba
commit 0a28e69e19
3 changed files with 6 additions and 16 deletions

View File

@ -1,10 +0,0 @@
export class RoomSettingsErrorType
{
public static readonly PASSWORD_REQUIRED = 5;
public static readonly ROOM_NAME_MISSING = 7;
public static readonly ROOM_NAME_BADWORDS = 8;
public static readonly ROOM_DESCRIPTION_BADWORDS = 10;
public static readonly ROOM_TAGS_BADWWORDS = 11;
public static readonly RESTRICTED_TAGS = 12;
public static readonly TAGS_TOO_LONG = 13;
}

View File

@ -7,7 +7,6 @@ export * from './IRoomModel';
export * from './IRoomModerationSettings'; export * from './IRoomModerationSettings';
export * from './NavigatorSearchResultViewDisplayMode'; export * from './NavigatorSearchResultViewDisplayMode';
export * from './RoomInfoData'; export * from './RoomInfoData';
export * from './RoomSettingsErrorType';
export * from './RoomSettingsUtils'; export * from './RoomSettingsUtils';
export * from './SearchFilterOptions'; export * from './SearchFilterOptions';
export * from './TryVisitRoom'; export * from './TryVisitRoom';

View File

@ -1,7 +1,7 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import { RoomDeleteComposer, RoomSettingsSaveErrorEvent } from '@nitrots/nitro-renderer'; import { RoomDeleteComposer, RoomSettingsSaveErrorEvent, RoomSettingsSaveErrorParser } from '@nitrots/nitro-renderer';
import { FC, useEffect, useState } from 'react'; import { FC, useEffect, useState } from 'react';
import { CreateLinkEvent, GetMaxVisitorsList, IRoomData, LocalizeText, RoomSettingsErrorType, SendMessageComposer } from '../../../../api'; import { CreateLinkEvent, GetMaxVisitorsList, IRoomData, LocalizeText, SendMessageComposer } from '../../../../api';
import { Base, Column, Flex, Text } from '../../../../common'; import { Base, Column, Flex, Text } from '../../../../common';
import { useMessageEvent, useNavigator, useNotification } from '../../../../hooks'; import { useMessageEvent, useNavigator, useNotification } from '../../../../hooks';
@ -37,9 +37,10 @@ export const NavigatorRoomSettingsBasicTabView: FC<NavigatorRoomSettingsTabViewP
switch (parser.code) switch (parser.code)
{ {
case RoomSettingsErrorType.ROOM_TAGS_BADWWORDS: case RoomSettingsSaveErrorParser.ERROR_INVALID_TAG:
case RoomSettingsErrorType.RESTRICTED_TAGS: setTypeError('navigator.roomsettings.unacceptablewords');
setTypeError('trading.mode.not.allowed'); case RoomSettingsSaveErrorParser.ERROR_NON_USER_CHOOSABLE_TAG:
setTypeError('navigator.roomsettings.nonuserchoosabletag');
break; break;
default: default:
setTypeError(''); setTypeError('');