|
@@ -393,18 +393,18 @@ const handleRoomValidTime = (data: RoomValidTimeType) => {
|
|
|
appStore.setRoomValidTime(data.ttl);
|
|
|
if (rtcStore.isLeader) {
|
|
|
const seconds = data.ttl;
|
|
|
- if (seconds > 5) {
|
|
|
+ if (seconds > 3) {
|
|
|
setTimeout(() => {
|
|
|
- const time = dayjs.duration(seconds - 1, 'seconds').format('mm:ss');
|
|
|
- console.log('time', time);
|
|
|
- const timeString = time == '00:00' ? '60:00' : time;
|
|
|
- const msg = String(t('base.roomTimeOut')).replace(new RegExp('%time%', 'g'), timeString);
|
|
|
+ // const time = dayjs.duration(seconds - 1, 'seconds').format('mm:ss');
|
|
|
+ // console.log('time', time);
|
|
|
+ // const timeString = time == '00:00' ? '60:00' : time;
|
|
|
+ // const msg = String(t('base.roomTimeOut')).replace(new RegExp('%time%', 'g'), timeString);
|
|
|
const chat: ChatContentType = {
|
|
|
role: 'leader',
|
|
|
mode: '',
|
|
|
Nickname: t('base.tips'),
|
|
|
UserId: rtcStore.userId,
|
|
|
- text: msg,
|
|
|
+ text: t('base.roomTimeOut'),
|
|
|
};
|
|
|
rtcStore.addToChatList(chat);
|
|
|
}, 500);
|