feat: change button color

depending on room state
pull/201/head
sualko 2022-03-17 14:36:26 +01:00
parent e63cbaaed1
commit 65b499d7a3
2 changed files with 11 additions and 1 deletions

View File

@ -102,6 +102,16 @@ pre {
margin-bottom: 1em; margin-bottom: 1em;
} }
.button.success {
background-color: var(--color-success);
border-color: var(--color-success-hover);
color: var(--color-primary-text);
&:hover {
background-color: var(--color-success-hover);
}
}
.icon { .icon {
display: inline-block; display: inline-block;
opacity: 0; opacity: 0;

View File

@ -188,7 +188,7 @@ const RoomRow: React.FC<Props> = (props) => {
<> <>
<tr className={showRecordings ? 'selected-row' : ''}> <tr className={showRecordings ? 'selected-row' : ''}>
<td className="start"> <td className="start">
<a href={api.getRoomUrl(room)} className="button primary" target="_blank" rel="noopener noreferrer" title={t('bbb', 'Open room')}> <a href={api.getRoomUrl(room)} className={`button ${room.running ? 'success' : 'primary'}`} target="_blank" rel="noopener noreferrer" title={t('bbb', 'Open room')}>
{room.running ? t('bbb', 'Join') : t('bbb', 'Start')} {room.running ? t('bbb', 'Join') : t('bbb', 'Start')}
</a> </a>
</td> </td>