From ed4886a94ab212e90afada1372ea9cc3b2970200 Mon Sep 17 00:00:00 2001 From: Bill Date: Wed, 17 Aug 2022 13:10:28 -0400 Subject: [PATCH] Add configurable wired message lengths --- public/ui-config.json.example | 6 +++++- .../wired/views/actions/WiredActionBotTalkToAvatarView.tsx | 2 +- .../wired/views/actions/WiredActionBotTalkView.tsx | 2 +- src/components/wired/views/actions/WiredActionChatView.tsx | 2 +- .../wired/views/actions/WiredActionKickFromRoomView.tsx | 2 +- .../wired/views/actions/WiredActionMuteUserView.tsx | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) diff --git a/public/ui-config.json.example b/public/ui-config.json.example index 585a5319..def823b3 100644 --- a/public/ui-config.json.example +++ b/public/ui-config.json.example @@ -16,7 +16,11 @@ "badge.descriptions.enabled": true, "motto.max.length": 38, "bot.name.max.length": 15, - "wired.message.max.length": "31", + "wired.action.bot.talk.to.avatar.max.length": 64, + "wired.action.bot.talk.max.length": 64, + "wired.action.chat.max.length": 100, + "wired.action.kick.from.room.max.length": 100, + "wired.action.mute.user.max.length": 100, "navigator.room.models": [ { "clubLevel": 0, "tileSize": 104, "name": "a" }, { "clubLevel": 0, "tileSize": 94, "name": "b" }, diff --git a/src/components/wired/views/actions/WiredActionBotTalkToAvatarView.tsx b/src/components/wired/views/actions/WiredActionBotTalkToAvatarView.tsx index 178c1983..ebebe2d1 100644 --- a/src/components/wired/views/actions/WiredActionBotTalkToAvatarView.tsx +++ b/src/components/wired/views/actions/WiredActionBotTalkToAvatarView.tsx @@ -35,7 +35,7 @@ export const WiredActionBotTalkToAvatarView: FC<{}> = props => { LocalizeText('wiredfurni.params.message') } - ('wired.message.max.length') } value={ message } onChange={ event => setMessage(event.target.value) } /> + ('wired.action.bot.talk.to.avatar.max.length', 64) } value={ message } onChange={ event => setMessage(event.target.value) } /> diff --git a/src/components/wired/views/actions/WiredActionBotTalkView.tsx b/src/components/wired/views/actions/WiredActionBotTalkView.tsx index 6a4f1bb3..cd2d28ec 100644 --- a/src/components/wired/views/actions/WiredActionBotTalkView.tsx +++ b/src/components/wired/views/actions/WiredActionBotTalkView.tsx @@ -35,7 +35,7 @@ export const WiredActionBotTalkView: FC<{}> = props => { LocalizeText('wiredfurni.params.message') } - ('wired.message.max.length') } value={ message } onChange={ event => setMessage(event.target.value) } /> + ('wired.action.bot.talk.max.length', 64) } value={ message } onChange={ event => setMessage(event.target.value) } /> diff --git a/src/components/wired/views/actions/WiredActionChatView.tsx b/src/components/wired/views/actions/WiredActionChatView.tsx index 0a8d18ec..ed256dc5 100644 --- a/src/components/wired/views/actions/WiredActionChatView.tsx +++ b/src/components/wired/views/actions/WiredActionChatView.tsx @@ -20,7 +20,7 @@ export const WiredActionChatView: FC<{}> = props => { LocalizeText('wiredfurni.params.message') } - setMessage(event.target.value) } maxLength={ GetConfiguration('wired.message.max.length') } /> + setMessage(event.target.value) } maxLength={ GetConfiguration('wired.action.chat.max.length', 100) } /> ); diff --git a/src/components/wired/views/actions/WiredActionKickFromRoomView.tsx b/src/components/wired/views/actions/WiredActionKickFromRoomView.tsx index b41bd1b1..c9bd10c8 100644 --- a/src/components/wired/views/actions/WiredActionKickFromRoomView.tsx +++ b/src/components/wired/views/actions/WiredActionKickFromRoomView.tsx @@ -20,7 +20,7 @@ export const WiredActionKickFromRoomView: FC<{}> = props => { LocalizeText('wiredfurni.params.message') } - setMessage(event.target.value) } maxLength={ GetConfiguration('wired.message.max.length') } /> + setMessage(event.target.value) } maxLength={ GetConfiguration('wired.action.kick.from.room.max.length', 100) } /> ); diff --git a/src/components/wired/views/actions/WiredActionMuteUserView.tsx b/src/components/wired/views/actions/WiredActionMuteUserView.tsx index 4df2d4e4..1665036b 100644 --- a/src/components/wired/views/actions/WiredActionMuteUserView.tsx +++ b/src/components/wired/views/actions/WiredActionMuteUserView.tsx @@ -36,7 +36,7 @@ export const WiredActionMuteUserView: FC<{}> = props => { LocalizeText('wiredfurni.params.message') } - setMessage(event.target.value) } maxLength={ GetConfiguration('wired.message.max.length') } /> + setMessage(event.target.value) } maxLength={ GetConfiguration('wired.action.mute.user.max.length', 100) } /> );