Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
521 changes: 299 additions & 222 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bbb-playback",
"version": "5.3.5",
"version": "5.4.1",
"homepage": "/playback/presentation/2.3",
"dependencies": {
"@bigbluebutton/tldraw": "^2.0.0-alpha.29",
Expand Down
8 changes: 5 additions & 3 deletions src/components/chat/messages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const propTypes = {

const defaultProps = {
currentIndex: 0,
setRef: () => {},
setRef: () => { },
};

const Messages = ({
Expand All @@ -35,9 +35,9 @@ const Messages = ({
switch (type) {
case ID.USERS:

const indexOfMessageToBeReplied = (item.replyToMessageId)
const indexOfMessageToBeReplied = (item.replyToMessageId)
? storage.messages.findIndex((message) => message.id === item.replyToMessageId) : -1;
const messageToBeReplied = (indexOfMessageToBeReplied !== -1)
const messageToBeReplied = (indexOfMessageToBeReplied !== -1)
? storage.messages[indexOfMessageToBeReplied]
: null;
return (
Expand Down Expand Up @@ -73,6 +73,8 @@ const Messages = ({
responders={item.responders}
timestamp={timestamp}
type={item.type}
isQuiz={item.isQuiz}
showCorrectAnswer={item.showCorrectAnswer}
/>
</span>
);
Expand Down
57 changes: 57 additions & 0 deletions src/components/chat/messages/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
--gray-light-color: var(--gray-light);
--gray-lightest-color: var(--gray-lightest);
--highlight-color: var(--blue);
--color-text: #111;
--color-off-white: #F3F6F9;
--color-gray-lightest: #D4D9DF;
--color-danger-dark: #AE1010;
}

.reply-tag {
Expand All @@ -17,6 +21,59 @@
line-height: 1;
}

.text-vanilla {
color: var(--color-text);

img {
max-width: 100%;
max-height: 100%;
}

p {
margin: 0;
white-space: pre-wrap;
}

pre:has(code),
p code:not(pre > code) {
background-color: var(--color-off-white);
border: solid 1px var(--color-gray-lightest);
border-radius: 4px;
padding: 2px;
margin: 0;
font-size: 12px;
white-space: pre-wrap;
word-wrap: break-word;
overflow-wrap: anywhere;
}

p code:not(pre > code) {
color: var(--color-danger-dark);
}

h1 {
font-size: 1.5em;
margin: 0;
}

h2 {
font-size: 1.3em;
margin: 0;
}

h3 {
font-size: 1.1em;
margin: 0;
}

h4,
h5,
h6 {
margin: 0;
}
}


.user-message-wrapper {
transition: background-color .5s ease;
}
Expand Down
13 changes: 12 additions & 1 deletion src/components/chat/messages/system/poll/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ const intlMessages = defineMessages({
id: 'player.chat.message.poll.name',
description: 'Label for the poll message name',
},
quiz: {
id: 'player.chat.message.poll.quiz',
description: 'Label for the quiz message name',
},
});

const propTypes = {
Expand All @@ -25,6 +29,8 @@ const propTypes = {
responders: PropTypes.number,
timestamp: PropTypes.number,
type: PropTypes.string,
isQuiz: PropTypes.bool,
showCorrectAnswer: PropTypes.bool,
};

const defaultProps = {
Expand All @@ -34,6 +40,8 @@ const defaultProps = {
responders: 0,
timestamp: 0,
type: '',
isQuiz: false,
showCorrectAnswer: false,
};

const Poll = ({
Expand All @@ -43,14 +51,16 @@ const Poll = ({
responders,
timestamp,
type,
isQuiz,
showCorrectAnswer,
}) => {
const intl = useIntl();

return (
<SystemMessage
active={active}
icon={ID.POLLS}
name={intl.formatMessage(intlMessages.name)}
name={isQuiz ? intl.formatMessage(intlMessages.quiz) : intl.formatMessage(intlMessages.name)}
timestamp={timestamp}
>
<Question question={question} />
Expand All @@ -61,6 +71,7 @@ const Poll = ({
<Options
answers={answers}
type={type}
showCorrectAnswer={showCorrectAnswer}
/>
</SystemMessage>
);
Expand Down
8 changes: 6 additions & 2 deletions src/components/chat/messages/system/poll/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,19 @@ const intlMessages = defineMessages({
const propTypes = {
answers: PropTypes.array,
type: PropTypes.string,
showCorrectAnswer: PropTypes.bool,
};

const defaultProps = {
answers: [],
type: '',
showCorrectAnswer: false,
};

const Options = ({
answers,
type,
showCorrectAnswer,
}) => {
const intl = useIntl();

Expand All @@ -62,13 +65,14 @@ const Options = ({
const {
id,
key,
isCorrectAnswer
} = item;

const label = getPollLabel(key, type);

return(
return (
<div>
{id + 1}: {label ? intl.formatMessage(intlMessages[label]) : key}
{id + 1}: {label ? intl.formatMessage(intlMessages[label]) : key} {showCorrectAnswer && isCorrectAnswer && '✅'}
</div>
);
})}
Expand Down
22 changes: 6 additions & 16 deletions src/components/chat/messages/user/text.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import React from 'react';
import PropTypes from 'prop-types';
import Linkify from 'linkify-react';
import cx from 'classnames';

const propTypes = {
active: PropTypes.bool,
Expand All @@ -20,20 +18,12 @@ const Text = ({
hyperlink,
text,
}) => {
if (hyperlink) {
const options = {
className: cx('linkified', { inactive: !active }),
target: '_blank',
};

return (
<Linkify options={options}>
{text.replace(/(\S)(https?:\/\/)/g, '$1 $2')}
</Linkify>
);
}

return <>{text}</>;
return (
<div
className='text-vanilla'
dangerouslySetInnerHTML={{ __html: text }}
/>
);
};

Text.propTypes = propTypes;
Expand Down
5 changes: 4 additions & 1 deletion src/components/tldraw_v2/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import storage from 'utils/data/storage';
import './index.scss';
import {
getTldrawData, getViewBox, createTldrawImageAsset,
createTldrawBackgroundShape, createTldrawCursorShape
createTldrawBackgroundShape, createTldrawCursorShape,
setupColorThemePaletteOverrides
} from 'utils/tldraw';
import { buildFileURL } from 'utils/data';
import { isEmpty } from 'utils/data/validators';
Expand All @@ -27,6 +28,8 @@ import getCursor from './cursor';
const MAX_IMAGE_WIDTH = 1440;
const MAX_IMAGE_HEIGHT = 1080;

setupColorThemePaletteOverrides();

const intlMessages = defineMessages({
aria: {
id: 'player.presentation.wrapper.aria',
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/ar.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"player.about.modal.shortcuts.skip.previous": "الشريحة السابقة",
"player.about.modal.shortcuts.swap": "تبادل المحتوى",
"player.chat.message.poll.name": "نتيجة التصويت",
"player.chat.message.poll.quiz": "نتيجة الاختبار",
"player.chat.message.poll.question": "سؤال",
"player.chat.message.poll.options": "خيارات",
"player.chat.message.poll.option.yes": "نعم",
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"player.about.modal.shortcuts.skip.previous": "Diapositiva anterior",
"player.about.modal.shortcuts.swap": "Intercanviar continguts",
"player.chat.message.poll.name": "Resultat de l'enquesta",
"player.chat.message.poll.quiz": "Resultat del qüestionari",
"player.chat.message.poll.question": "Pregunta",
"player.chat.message.poll.options": "Opcions",
"player.chat.message.poll.option.yes": "Sí",
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/cs_CZ.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"loader.wrapper.aria": "Sekce Loader",
"player.wrapper.aria": "Sekce přehrávače",
"player.chat.message.poll.name": "Výsledky ankety",
"player.chat.message.poll.quiz": "Výsledek kvízu",
"player.chat.message.poll.question": "Otázka",
"player.chat.message.poll.options": "Možnosti",
"player.chat.message.poll.option.yes": "Ano",
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"player.about.modal.shortcuts.skip.previous": "Vorherige Folie",
"player.about.modal.shortcuts.swap": "Inhalt umschalten",
"player.chat.message.poll.name": "Umfrageergebnis",
"player.chat.message.poll.quiz": "Quizergebnis",
"player.chat.message.poll.question": "Frage",
"player.chat.message.poll.options": "Einstellungen",
"player.chat.message.poll.option.yes": "Ja",
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/el_GR.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"player.about.modal.shortcuts.skip.previous": "Προηγούμενη διαφάνεια",
"player.about.modal.shortcuts.swap": "Εναλλαγή περιεχομένου",
"player.chat.message.poll.name": "Αποτέλεσμα δημοσκόπησης",
"player.chat.message.poll.quiz": "Αποτέλεσμα κουίζ",
"player.chat.message.poll.question": "Ερώτηση",
"player.chat.message.poll.options": "Επιλογές",
"player.chat.message.poll.option.yes": "Ναι",
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"player.about.modal.shortcuts.skip.previous": "Previous Slide",
"player.about.modal.shortcuts.swap": "Swap content",
"player.chat.message.poll.name": "Poll result",
"player.chat.message.poll.quiz": "Quiz result",
"player.chat.message.poll.question": "Question",
"player.chat.message.poll.options": "Options",
"player.chat.message.poll.option.yes": "Yes",
Expand Down
2 changes: 2 additions & 0 deletions src/locales/messages/eo.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"button.about.aria": "Pri",
"player.chat.message.poll.name": "Rezulto de enketo",
"player.chat.message.poll.quiz": "Kvizrezulto",
"player.chat.message.poll.question": "Demando",
"player.chat.message.poll.option.yes": "Jes",
"player.chat.message.poll.option.no": "Ne"
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/et.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"player.about.modal.shortcuts.skip.previous": "Eelmine slaid",
"player.about.modal.shortcuts.swap": "Vaheta sisu",
"player.chat.message.poll.name": "Küsitluse tulemus",
"player.chat.message.poll.quiz": "Viktoriini tulemus",
"player.chat.message.poll.question": "Küsimus",
"player.chat.message.poll.options": "Valikud",
"player.chat.message.poll.option.yes": "Jah",
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/eu.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"player.about.modal.shortcuts.skip.previous": "Aurreko diapositiba",
"player.about.modal.shortcuts.swap": "Trukatu edukia",
"player.chat.message.poll.name": "Inkestaren emaitza",
"player.chat.message.poll.quiz": "Galdetegiaren emaitza",
"player.chat.message.poll.question": "Galdera",
"player.chat.message.poll.options": "Aukerak",
"player.chat.message.poll.option.yes": "Bai",
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/fa_IR.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"player.about.modal.shortcuts.skip.previous": "اسلاید قبلی",
"player.about.modal.shortcuts.swap": "تعویض محتوا",
"player.chat.message.poll.name": "نتیجه رأی‌گیری",
"player.chat.message.poll.quiz": "نتیجه آزمون",
"player.chat.message.poll.question": "پرسش",
"player.chat.message.poll.options": "گزینه‌ها",
"player.chat.message.poll.option.yes": "بله",
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"player.about.modal.shortcuts.skip.previous": "Diapositive précédente",
"player.about.modal.shortcuts.swap": "Permuter le contenu",
"player.chat.message.poll.name": "Résultat du sondage",
"player.chat.message.poll.quiz": "Résultat du quiz",
"player.chat.message.poll.question": "Question",
"player.chat.message.poll.options": "Options",
"player.chat.message.poll.option.yes": "Oui",
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/gl.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"player.about.modal.shortcuts.skip.previous": "Diapositiva anterior",
"player.about.modal.shortcuts.swap": "Intercambiar o contido",
"player.chat.message.poll.name": "Resultado da enquisa",
"player.chat.message.poll.quiz": "Resultado do cuestionario",
"player.chat.message.poll.question": "Pregunta",
"player.chat.message.poll.options": "Opcións",
"player.chat.message.poll.option.yes": "Si",
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/he.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{
"player.chat.message.poll.quiz": "תוצאות חידון",
"player.chat.wrapper.aria": "אזור רב־שיח"
}
1 change: 1 addition & 0 deletions src/locales/messages/hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"player.about.modal.shortcuts.seek.backward": "Traži unatrag",
"player.about.modal.shortcuts.seek.forward": "Traži unaprijed",
"player.chat.message.poll.name": "Rezultat ankete",
"player.chat.message.poll.quiz": "Rezultat kviza",
"player.chat.message.poll.question": "Pitanje",
"player.chat.message.poll.options": "Opcije",
"player.chat.message.poll.option.yes": "Da",
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/hu_HU.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"player.about.modal.shortcuts.skip.previous": "Előző dia",
"player.about.modal.shortcuts.swap": "Tartalom cseréje",
"player.chat.message.poll.name": "Szavazás eredménye",
"player.chat.message.poll.quiz": "Kvíz eredménye",
"player.chat.message.poll.question": "Kérdés",
"player.chat.message.poll.options": "Lehetőségek",
"player.chat.message.poll.option.yes": "Igen",
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/hy.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"player.about.modal.shortcuts.skip.previous": "Նախորդ սլայդը",
"player.about.modal.shortcuts.swap": "Փոխել պարունակությունը",
"player.chat.message.poll.name": "Հարցման արդյունքները",
"player.chat.message.poll.quiz": "Վիկտորինայի արդյունքները",
"player.chat.message.poll.question": "Հարց",
"player.chat.message.poll.options": "Տարբերակներ",
"player.chat.message.poll.option.yes": "Այո",
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/id.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"player.about.modal.shortcuts.skip.next": "Salindia selanjutnya",
"player.about.modal.shortcuts.skip.previous": "Salindia Sebelumnya",
"player.chat.message.poll.name": "Hasil jajak pendapat",
"player.chat.message.poll.quiz": "Hasil kuis",
"player.chat.message.poll.question": "Pertanyaan",
"player.chat.message.poll.options": "Opsi",
"player.chat.message.poll.option.yes": "Ya",
Expand Down
1 change: 1 addition & 0 deletions src/locales/messages/it_IT.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"player.about.modal.shortcuts.skip.next": "Prossima slide",
"player.about.modal.shortcuts.skip.previous": "Slide precedente",
"player.chat.message.poll.name": "Risultati sondaggio",
"player.chat.message.poll.quiz": "Risultati quiz",
"player.chat.message.poll.question": "Domanda",
"player.chat.message.poll.options": "Opzioni",
"player.chat.message.poll.option.yes": "Si",
Expand Down
Loading