mirror of https://github.com/sualko/cloud_bbb
fix: negative room quota
parent
0ae21e0f1a
commit
3b4ee9e6aa
|
@ -108,6 +108,7 @@ const App: React.FC<Props> = () => {
|
||||||
}
|
}
|
||||||
|
|
||||||
const maxRooms = restriction?.maxRooms || 0;
|
const maxRooms = restriction?.maxRooms || 0;
|
||||||
|
const quota = maxRooms < 0 ? t('bbb', 'unlimited') : rooms.filter(room => room.userId === OC.currentUser).length + ' / ' + maxRooms;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="bbb-react-root"
|
<div id="bbb-react-root"
|
||||||
|
@ -154,7 +155,7 @@ const App: React.FC<Props> = () => {
|
||||||
</td>
|
</td>
|
||||||
<td />
|
<td />
|
||||||
<td colSpan={3}>
|
<td colSpan={3}>
|
||||||
<p className="text-muted">{t('bbb', 'Room quota:')} {rooms.filter(room => room.userId === OC.currentUser).length} / {maxRooms}</p>
|
<p className="text-muted">{t('bbb', 'Room quota:')} {quota}</p>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tfoot>
|
</tfoot>
|
||||||
|
|
Loading…
Reference in New Issue