From c1a43cf840c709ee4dc8f336364db47a70684d5f Mon Sep 17 00:00:00 2001 From: "faten.rakrouki" Date: Tue, 6 Jun 2023 18:21:54 +0100 Subject: [PATCH 1/5] Display the avatar in profile page --- .../app/src/Actions/Account/Edit.php | 8 +++-- bbbeasy-frontend/src/components/Profile.tsx | 31 ++++++++++++------- .../src/components/layout/AppHeader.tsx | 1 - 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/bbbeasy-backend/app/src/Actions/Account/Edit.php b/bbbeasy-backend/app/src/Actions/Account/Edit.php index 55b66960..81922180 100644 --- a/bbbeasy-backend/app/src/Actions/Account/Edit.php +++ b/bbbeasy-backend/app/src/Actions/Account/Edit.php @@ -53,7 +53,7 @@ public function save($f3): void $current_password = $form['current_password']; $new_password = $form['new_password']; $confirm_new_password = $form['confirm_new_password']; - $avatar = $form['avatar']; + $avatar = trim($form['avatar']); $updatePassword = null !== $new_password && null !== $confirm_new_password; $updateAvatar = null !== $avatar; @@ -82,7 +82,11 @@ public function save($f3): void } $user->username = $username; $user->email = $email; - $user->avatar = $avatar; + $avatar = strtolower($avatar); + + $avatar = preg_replace('/[^a-z0-9 .-]+/', '', $avatar); + $avatar = str_replace(' ', '-', $avatar); + $user->avatar = trim($avatar, '-');; if ($updatePassword) { $user->password = $new_password; } diff --git a/bbbeasy-frontend/src/components/Profile.tsx b/bbbeasy-frontend/src/components/Profile.tsx index fbf9858e..8034f4dd 100644 --- a/bbbeasy-frontend/src/components/Profile.tsx +++ b/bbbeasy-frontend/src/components/Profile.tsx @@ -77,7 +77,7 @@ const Profile = () => { formValues.avatar = images[0].file.name; } - + //edit account AuthService.edit_account(formValues) .then((response) => { @@ -173,22 +173,31 @@ const Profile = () => { > + + +
+
+ onImageRemove(0)} /> +
+
+ ) + : (
-
-
- onImageRemove(0)} /> -
-
-
- ) : null - } + + )} icon={imageList[0] == null ? : null} size={{ xs: 32, sm: 40, md: 64, lg: 80, xl: 125, xxl: 135 }} className="bbbeasy-btn" diff --git a/bbbeasy-frontend/src/components/layout/AppHeader.tsx b/bbbeasy-frontend/src/components/layout/AppHeader.tsx index c530e591..31e4a90b 100644 --- a/bbbeasy-frontend/src/components/layout/AppHeader.tsx +++ b/bbbeasy-frontend/src/components/layout/AppHeader.tsx @@ -63,7 +63,6 @@ import notificationService from "../../services/notification.service"; import settingsService from 'services/settings.service'; import { SettingsType } from 'types/SettingsType'; -import { apiRoutes } from 'routing/backend-config'; const { Header } = Layout; const { Title, Text, Paragraph } = Typography; From 0e6cdba16632109cf452c10872a2edc8ab29bb54 Mon Sep 17 00:00:00 2001 From: "faten.rakrouki" Date: Mon, 12 Jun 2023 20:51:39 +0100 Subject: [PATCH 2/5] fix avatar image type and avatar name in the data base --- bbbeasy-backend/app/config/access.ini | 19 +++--- bbbeasy-backend/app/config/routes.ini | 15 +++-- .../app/src/Actions/Account/Edit.php | 8 +-- .../app/src/Actions/Account/RemoveLogo.php | 60 +++++++++++++++++ bbbeasy-frontend/src/components/Profile.tsx | 64 +++++++++++-------- .../src/routing/backend-config.tsx | 1 + bbbeasy-frontend/src/services/auth.service.ts | 4 ++ 7 files changed, 123 insertions(+), 48 deletions(-) create mode 100644 bbbeasy-backend/app/src/Actions/Account/RemoveLogo.php diff --git a/bbbeasy-backend/app/config/access.ini b/bbbeasy-backend/app/config/access.ini index 43945fd6..b397ab7a 100644 --- a/bbbeasy-backend/app/config/access.ini +++ b/bbbeasy-backend/app/config/access.ini @@ -33,20 +33,21 @@ allow @locale = * allow @set_locale = * ; account routes -allow POST @register = * -allow POST @login = * -allow GET @logout = * -allow POST @reset = * -allow POST @change_password = * -allow GET @get_reset_token = * +allow POST @register = * +allow POST @login = * +allow GET @logout = * +allow POST @reset = * +allow POST @change_password = * +allow GET @get_reset_token = * +allow PUT @account_remove_avatar = * ; roles permissions routes allow GET @roles_permissions_collect = * ; settings routes -allow GET @settings_collect = * -allow POST @settings_save_logo = * -allow GET @file = * +allow GET @settings_collect = * +allow POST @settings_save_logo = * +allow GET @file = * ; notification routes allow GET @warning_notification = * diff --git a/bbbeasy-backend/app/config/routes.ini b/bbbeasy-backend/app/config/routes.ini index bd859aae..0cd256fe 100644 --- a/bbbeasy-backend/app/config/routes.ini +++ b/bbbeasy-backend/app/config/routes.ini @@ -26,13 +26,14 @@ GET @locale : /api/locale/json/@locale.json = Actions\Core\GetLocale->e PUT @set_locale : /api/set-locale/@locale [ajax] = Actions\Account\SetLocale->execute ; account routes -POST @register : /api/account/register = Actions\Account\Register->signup -POST @login : /api/account/login = Actions\Account\Login->authorise -GET @logout : /api/account/logout = Actions\Account\Logout->execute -POST @reset : /api/account/reset-password = Actions\Account\ResetPassword->execute -POST @change_password : /api/account/change-password = Actions\Account\ChangePassword->execute -GET @get_reset_token : /api/account/reset-token/@token = Actions\Account\GetResetPasswordToken->execute -PUT @account_edit : /api/account/edit = Actions\Account\Edit->save +POST @register : /api/account/register = Actions\Account\Register->signup +POST @login : /api/account/login = Actions\Account\Login->authorise +GET @logout : /api/account/logout = Actions\Account\Logout->execute +POST @reset : /api/account/reset-password = Actions\Account\ResetPassword->execute +POST @change_password : /api/account/change-password = Actions\Account\ChangePassword->execute +GET @get_reset_token : /api/account/reset-token/@token = Actions\Account\GetResetPasswordToken->execute +PUT @account_edit : /api/account/edit = Actions\Account\Edit->save +PUT @account_remove_avatar : /api/account/remove = Actions\Account\RemoveLogo->execute ; settings routes POST @settings_save_logo : /api/settings = Actions\Settings\SaveLogo->execute diff --git a/bbbeasy-backend/app/src/Actions/Account/Edit.php b/bbbeasy-backend/app/src/Actions/Account/Edit.php index 81922180..55b66960 100644 --- a/bbbeasy-backend/app/src/Actions/Account/Edit.php +++ b/bbbeasy-backend/app/src/Actions/Account/Edit.php @@ -53,7 +53,7 @@ public function save($f3): void $current_password = $form['current_password']; $new_password = $form['new_password']; $confirm_new_password = $form['confirm_new_password']; - $avatar = trim($form['avatar']); + $avatar = $form['avatar']; $updatePassword = null !== $new_password && null !== $confirm_new_password; $updateAvatar = null !== $avatar; @@ -82,11 +82,7 @@ public function save($f3): void } $user->username = $username; $user->email = $email; - $avatar = strtolower($avatar); - - $avatar = preg_replace('/[^a-z0-9 .-]+/', '', $avatar); - $avatar = str_replace(' ', '-', $avatar); - $user->avatar = trim($avatar, '-');; + $user->avatar = $avatar; if ($updatePassword) { $user->password = $new_password; } diff --git a/bbbeasy-backend/app/src/Actions/Account/RemoveLogo.php b/bbbeasy-backend/app/src/Actions/Account/RemoveLogo.php new file mode 100644 index 00000000..457602bb --- /dev/null +++ b/bbbeasy-backend/app/src/Actions/Account/RemoveLogo.php @@ -0,0 +1,60 @@ +. + */ + +namespace Actions\Account; + +use Actions\Base as BaseAction; +use Enum\ResponseCode; +use Models\User; + + +/** + * Class SaveLogo. + */ +class RemoveLogo extends BaseAction +{ + /** + * @param mixed $f3 + * @param mixed $params + * + * @throws \JsonException + */ + public function execute($f3, $params): void + { + $user = new User(); + $id = $this->session->get('user.id'); + $user = $user->findone(['id = ?', [$id]]); + if ($user->dry()) { + $this->renderJson([], ResponseCode::HTTP_NOT_FOUND); + } else { + // Update the avatar to null + $user->avatar = null; + + // Save the changes to the user record + $user->save(); + + // Return a success response + $this->logger->info('Avatar successfully updated', ['user' => $user->toArray()]); + $this->renderJson(['result' => 'success', 'user' => $user->toArray(['avatar'])]); + } + } +} diff --git a/bbbeasy-frontend/src/components/Profile.tsx b/bbbeasy-frontend/src/components/Profile.tsx index 8034f4dd..cfe0fe61 100644 --- a/bbbeasy-frontend/src/components/Profile.tsx +++ b/bbbeasy-frontend/src/components/Profile.tsx @@ -40,6 +40,11 @@ import { apiRoutes } from '../routing/backend-config'; import { FormInstance } from 'antd/lib/form'; import { UserType } from '../types/UserType'; +import { UploadFile } from 'antd/lib/upload/interface'; + +import authService from "../services/auth.service"; + + type formType = { username?: string; @@ -59,26 +64,43 @@ const Profile = () => { email: currentUser.email, avatar: currentUser.avatar, }; - const [images, setImages] = React.useState([]); + const [images, setImages] = React.useState(null); const [errors, setErrors] = React.useState(''); + const handleFileName = (imageList) => { + + imageList[0].name = 'avatar1-' + Date.now()+"."+imageList[0].file.type.substring(6); + + setImages(imageList); + } + + const handleRemoveAvatar = () => { + authService.remove_avatar(currentUser.avatar) + .then(response => { + setImages(response.data); + console.log(response.data); + }) + .catch(error => { + console.error(error); + }); + } + const handleUpdate = (formValues: formType) => { setErrors(''); - // save avatar - if (images.length != 0 && images[0].file != null) { + if (images[0] != null && images) { const formData: FormData = new FormData(); - formData.append('logo', images[0].file, images[0].file.name); - formData.append('logo_name', images[0].file.name); + formData.append('logo', images[0]['file'], images[0].name); + formData.append('logo_name', images[0].name); axios.post(apiRoutes.SAVE_FILE_URL, formData).catch((error) => { console.log(error); }); - - formValues.avatar = images[0].file.name; + formValues.avatar = images[0].name; + }else{ + formValues.avatar = null; } - - //edit account + //edit account; AuthService.edit_account(formValues) .then((response) => { const user = response.data.user; @@ -146,10 +168,11 @@ const Profile = () => { setImages(imageList as never[])} + onChange={(imageList: ImageListType) => handleFileName(imageList)} maxNumber={1} + acceptType={["jpg", "jpeg", "png"]} > - {({ imageList, onImageUpload, onImageUpdate, onImageRemove }) => ( + {({ imageList, onImageUpload, onImageUpdate }) => ( { > -
-
- onImageRemove(0)} /> +
+ handleRemoveAvatar()} />
-
) - : ( -
-
- )} + } icon={imageList[0] == null ? : null} size={{ xs: 32, sm: 40, md: 64, lg: 80, xl: 125, xxl: 135 }} className="bbbeasy-btn" diff --git a/bbbeasy-frontend/src/routing/backend-config.tsx b/bbbeasy-frontend/src/routing/backend-config.tsx index d1714c14..e1a42bd1 100644 --- a/bbbeasy-frontend/src/routing/backend-config.tsx +++ b/bbbeasy-frontend/src/routing/backend-config.tsx @@ -26,6 +26,7 @@ export const apiRoutes = { CHANGE_PASSWORD_URL: API_URL + '/account/change-password', RESET_TOKEN_URL: API_URL + '/account/reset-token/', EDIT_ACCOUNT_URL: API_URL + '/account/edit', + REMOVE_AVATAR_URL: API_URL + '/account/remove', LOGS_URL: API_URL + '/logs', diff --git a/bbbeasy-frontend/src/services/auth.service.ts b/bbbeasy-frontend/src/services/auth.service.ts index 9b85de53..97c1d648 100644 --- a/bbbeasy-frontend/src/services/auth.service.ts +++ b/bbbeasy-frontend/src/services/auth.service.ts @@ -60,6 +60,10 @@ class AuthService { return axiosInstance.put(apiRoutes.EDIT_ACCOUNT_URL, { data }); } + remove_avatar(avatar: string) { + return axiosInstance.put(apiRoutes.REMOVE_AVATAR_URL, { avatar }); + } + addCurrentUser(user: UserType) { localStorage.setItem('user', JSON.stringify(user)); } From 00ec379df5bd3f342513914d064a4581f3a6e19e Mon Sep 17 00:00:00 2001 From: Hana Zaraa Date: Tue, 8 Aug 2023 16:57:22 +0100 Subject: [PATCH 3/5] merge develop & display avatar in header && fix issues & remove useless code --- README.markdown | 11 +- bbbeasy-backend/app/config/access.ini | 1 + bbbeasy-backend/app/config/client.ini | 1 + bbbeasy-backend/app/config/routes.ini | 3 +- .../src/Actions/Account/ChangePassword.php | 2 +- .../app/src/Actions/Account/RemoveLogo.php | 3 +- bbbeasy-backend/app/src/Actions/Base.php | 2 +- .../app/src/Actions/Core/Install.php | 5 +- .../app/src/Actions/Labels/Add.php | 2 +- .../app/src/Actions/Labels/Edit.php | 2 +- .../app/src/Actions/Labels/Index.php | 6 +- .../app/src/Actions/PresetSettings/Edit.php | 7 +- .../app/src/Actions/Presets/Index.php | 6 +- .../app/src/Actions/Recordings/Collect.php | 6 +- .../app/src/Actions/Recordings/Index.php | 6 +- .../app/src/Actions/Roles/Collect.php | 6 +- .../app/src/Actions/Roles/Index.php | 6 +- .../app/src/Actions/Rooms/Edit.php | 22 +- .../app/src/Actions/Rooms/Start.php | 112 ++++--- .../app/src/Actions/Rooms/View.php | 22 +- .../app/src/Actions/Settings/Collect.php | 6 +- .../app/src/Application/Bootstrap.php | 3 +- bbbeasy-backend/app/src/Data/PresetData.php | 45 +++ bbbeasy-backend/app/src/Enum/GuestPolicy.php | 30 ++ .../app/src/Enum/Presets/Audio.php | 2 + .../app/src/Enum/Presets/Branding.php | 2 + .../app/src/Enum/Presets/BreakoutRooms.php | 2 + .../app/src/Enum/Presets/General.php | 1 + .../app/src/Enum/Presets/GuestPolicy.php | 3 +- .../app/src/Enum/Presets/Language.php | 3 +- .../app/src/Enum/Presets/Layout.php | 1 + .../src/Enum/Presets/LearningDashboard.php | 1 + .../app/src/Enum/Presets/LockSettings.php | 1 + .../app/src/Enum/Presets/Presentation.php | 1 + .../app/src/Enum/Presets/Recording.php | 7 +- .../app/src/Enum/Presets/Screenshare.php | 3 +- .../app/src/Enum/Presets/Security.php | 1 + .../app/src/Enum/Presets/UserExperience.php | 1 + .../app/src/Enum/Presets/Webcams.php | 3 +- .../app/src/Enum/Presets/Whiteboard.php | 1 + .../app/src/Enum/Presets/ZcaleRight.php | 3 +- bbbeasy-backend/app/src/Models/Preset.php | 26 +- .../app/src/Models/PresetSetting.php | 49 ++- bbbeasy-backend/app/src/Models/Role.php | 2 +- bbbeasy-backend/app/src/Models/Setting.php | 2 +- .../app/src/Utils/PresetProcessor.php | 144 ++++++-- bbbeasy-backend/composer.lock | 205 +++++++----- .../20220720114045_create_labels_table.php | 2 +- bbbeasy-backend/tests/src/Models/UserTest.php | 44 +-- bbbeasy-docs/yarn.lock | 12 +- bbbeasy-frontend/package.json | 8 +- bbbeasy-frontend/src/App-installer.css | 12 +- bbbeasy-frontend/src/App-webapp.css | 28 +- .../src/components/GuestPolicy.tsx | 25 ++ bbbeasy-frontend/src/components/Install.tsx | 25 +- bbbeasy-frontend/src/components/Labels.tsx | 1 - .../src/components/LanguagesBBB.tsx | 84 +++++ .../src/components/PresetSettings.tsx | 1 + bbbeasy-frontend/src/components/Presets.tsx | 212 ++++++++---- bbbeasy-frontend/src/components/Profile.tsx | 92 ++++-- .../src/components/Recordings.tsx | 4 +- .../src/components/RoomDetails.tsx | 176 +++++----- .../src/components/RoomPresentations.tsx | 44 +-- .../src/components/RoomRecordings.tsx | 291 ++++++++-------- bbbeasy-frontend/src/components/Rooms.tsx | 4 +- bbbeasy-frontend/src/components/Step2Form.tsx | 2 +- bbbeasy-frontend/src/components/Step3Form.tsx | 78 ++++- bbbeasy-frontend/src/components/Users.tsx | 23 +- .../src/components/layout/AppHeader.tsx | 27 +- bbbeasy-frontend/src/locale/ar-TN.json | 310 +++++++++--------- bbbeasy-frontend/src/locale/en-US.json | 87 +++-- bbbeasy-frontend/src/locale/fr-FR.json | 222 +++++++------ bbbeasy-frontend/src/routing/config.tsx | 2 +- .../src/services/rooms.service.ts | 6 +- bbbeasy-frontend/src/types/GuestPolicyType.ts | 23 ++ bbbeasy-frontend/yarn.lock | 140 +++++--- install.sh | 21 +- 77 files changed, 1806 insertions(+), 979 deletions(-) create mode 100644 bbbeasy-backend/app/src/Data/PresetData.php create mode 100644 bbbeasy-backend/app/src/Enum/GuestPolicy.php create mode 100644 bbbeasy-frontend/src/components/GuestPolicy.tsx create mode 100644 bbbeasy-frontend/src/components/LanguagesBBB.tsx create mode 100644 bbbeasy-frontend/src/types/GuestPolicyType.ts diff --git a/README.markdown b/README.markdown index 7aaaad8a..6eaa3fb6 100644 --- a/README.markdown +++ b/README.markdown @@ -2,13 +2,18 @@ BBBEasy Logo

+

+GitHub forks +GitHub stars +

+ # BBBEasy BBBEasy is an open-source multipurpose meeting rooms manager for BigBlueButton. ## Features -- Smooth install experience. +- Smooth installation experience. - User friendly UI. @@ -26,6 +31,10 @@ The web-application is split in two parts: - A modern front-end. +## 🪴 Project Activity + +![Alt](https://repobeats.axiom.co/api/embed/22737fcd7e97f3c37ff740f195ece60264185796.svg "Repobeats analytics image") + ## Development - To launch the backend in the development mode, follow these steps : diff --git a/bbbeasy-backend/app/config/access.ini b/bbbeasy-backend/app/config/access.ini index 845c38e0..4be900c7 100644 --- a/bbbeasy-backend/app/config/access.ini +++ b/bbbeasy-backend/app/config/access.ini @@ -55,4 +55,5 @@ allow GET @warning_notification = * + diff --git a/bbbeasy-backend/app/config/client.ini b/bbbeasy-backend/app/config/client.ini index b5cef19c..86c5fadc 100644 --- a/bbbeasy-backend/app/config/client.ini +++ b/bbbeasy-backend/app/config/client.ini @@ -17,3 +17,4 @@ [client] ; Send default front logs to server side logs_target = server +room_url_prefix = /r/ \ No newline at end of file diff --git a/bbbeasy-backend/app/config/routes.ini b/bbbeasy-backend/app/config/routes.ini index bc32063d..2560a804 100644 --- a/bbbeasy-backend/app/config/routes.ini +++ b/bbbeasy-backend/app/config/routes.ini @@ -93,4 +93,5 @@ PUT @recordings_edit : /api/recordings/@id = Action DELETE @recording_delete : /api/recordings/@id = Actions\Recordings\Delete->execute ; notification routes -GET @warning_notification : /api/notification = Actions\Notification\WarningNotification->execute \ No newline at end of file +GET @warning_notification : /api/notification = Actions\Notification\WarningNotification->execute +PUT @account_remove_avatar : /api/account/remove = Actions\Account\RemoveLogo->execute \ No newline at end of file diff --git a/bbbeasy-backend/app/src/Actions/Account/ChangePassword.php b/bbbeasy-backend/app/src/Actions/Account/ChangePassword.php index 9c99fdce..e9198c4e 100644 --- a/bbbeasy-backend/app/src/Actions/Account/ChangePassword.php +++ b/bbbeasy-backend/app/src/Actions/Account/ChangePassword.php @@ -71,7 +71,7 @@ public function execute($f3): void $this->logger->error($errorMessage, ['error' => $common]); $this->renderJson(['message' => $common], $responseCode); } elseif ($user->verifyPassword($password)) { - $message = 'New password cannot be the same as your old password'; + $message = 'New password old password must be different'; $this->logger->error($errorMessage, ['error' => $message]); $this->renderJson(['message' => $message], $responseCode); } else { diff --git a/bbbeasy-backend/app/src/Actions/Account/RemoveLogo.php b/bbbeasy-backend/app/src/Actions/Account/RemoveLogo.php index 457602bb..ed574baa 100644 --- a/bbbeasy-backend/app/src/Actions/Account/RemoveLogo.php +++ b/bbbeasy-backend/app/src/Actions/Account/RemoveLogo.php @@ -26,7 +26,6 @@ use Enum\ResponseCode; use Models\User; - /** * Class SaveLogo. */ @@ -54,7 +53,7 @@ public function execute($f3, $params): void // Return a success response $this->logger->info('Avatar successfully updated', ['user' => $user->toArray()]); - $this->renderJson(['result' => 'success', 'user' => $user->toArray(['avatar'])]); + $this->renderJson(['result' => 'success', 'user' => $user->toArray()]); } } } diff --git a/bbbeasy-backend/app/src/Actions/Base.php b/bbbeasy-backend/app/src/Actions/Base.php index 693bd686..c86c99c3 100644 --- a/bbbeasy-backend/app/src/Actions/Base.php +++ b/bbbeasy-backend/app/src/Actions/Base.php @@ -207,7 +207,7 @@ public function renderXmlString($xml = null): void /** * @return mixed */ - public function getDecodedBody(): array + public function getDecodedBody() { return json_decode($this->f3->get('BODY'), true); } diff --git a/bbbeasy-backend/app/src/Actions/Core/Install.php b/bbbeasy-backend/app/src/Actions/Core/Install.php index 57bc168d..7a2d0222 100644 --- a/bbbeasy-backend/app/src/Actions/Core/Install.php +++ b/bbbeasy-backend/app/src/Actions/Core/Install.php @@ -54,9 +54,6 @@ public function execute($f3, $params): void $setting = new Setting(); $dataChecker = new DataChecker(); - $dataChecker->verify($form['username'], Validator::length(4)->setName('username')); - $dataChecker->verify($form['email'], Validator::email()->setName('email')); - $dataChecker->verify($form['password'], Validator::length(8)->setName('password')); $dataChecker = $setting->checkSettingsData($dataChecker, $form); $dataChecker->verify($form['presetsConfig'], Validator::notEmpty()->setName('presetsConfig')); @@ -126,9 +123,11 @@ public function execute($f3, $params): void // add configured presets $presets = $form['presetsConfig']; + if ($presets) { $presetSettings = new PresetSetting(); $result = $presetSettings->savePresetSettings($presets); + if ('string' === \gettype($result)) { $this->renderJson(['errors' => $result], ResponseCode::HTTP_INTERNAL_SERVER_ERROR); } diff --git a/bbbeasy-backend/app/src/Actions/Labels/Add.php b/bbbeasy-backend/app/src/Actions/Labels/Add.php index 9500fb51..69d78261 100644 --- a/bbbeasy-backend/app/src/Actions/Labels/Add.php +++ b/bbbeasy-backend/app/src/Actions/Labels/Add.php @@ -49,7 +49,7 @@ public function save($f3, $params): void $dataChecker = new DataChecker(); $dataChecker->verify($form['name'], Validator::notEmpty()->setName('name')); $dataChecker->verify($form['name'], Validator::length(1, 32)->setName('name')); - $dataChecker->verify($form['color'], Validator::hexRgbColor()->setName('color')); + $dataChecker->verify($form['color'], Validator::notEmpty()->setName('color')); if ($dataChecker->allValid()) { $label = new Label(); diff --git a/bbbeasy-backend/app/src/Actions/Labels/Edit.php b/bbbeasy-backend/app/src/Actions/Labels/Edit.php index fb7919e9..85fee0b9 100644 --- a/bbbeasy-backend/app/src/Actions/Labels/Edit.php +++ b/bbbeasy-backend/app/src/Actions/Labels/Edit.php @@ -55,7 +55,7 @@ public function save($f3, $params): void if ($label->valid()) { $dataChecker = new DataChecker(); $dataChecker->verify($form['name'], Validator::notEmpty()->setName('name')); - $dataChecker->verify($form['color'], Validator::hexRgbColor()->setName('color')); + $dataChecker->verify($form['color'], Validator::notEmpty()->setName('color')); if ($dataChecker->allValid()) { $checkLabel = new Label(); diff --git a/bbbeasy-backend/app/src/Actions/Labels/Index.php b/bbbeasy-backend/app/src/Actions/Labels/Index.php index 35711e72..016bf73d 100644 --- a/bbbeasy-backend/app/src/Actions/Labels/Index.php +++ b/bbbeasy-backend/app/src/Actions/Labels/Index.php @@ -34,8 +34,10 @@ class Index extends BaseAction use RequirePrivilegeTrait; /** - * @param \Base $f3 - * @param array $params + * @param mixed $f3 + * @param mixed $params + * + * @throws \JsonException */ public function show($f3, $params): void { diff --git a/bbbeasy-backend/app/src/Actions/PresetSettings/Edit.php b/bbbeasy-backend/app/src/Actions/PresetSettings/Edit.php index 8b6b82ad..501b5a2c 100644 --- a/bbbeasy-backend/app/src/Actions/PresetSettings/Edit.php +++ b/bbbeasy-backend/app/src/Actions/PresetSettings/Edit.php @@ -24,6 +24,7 @@ use Actions\Base as BaseAction; use Actions\RequirePrivilegeTrait; +use Enum\GuestPolicy; use Enum\ResponseCode; use Models\Preset; use Models\PresetSetting; @@ -75,7 +76,11 @@ public function save($f3, $params): void } // add enabled category from userSubCategories if ($editedSubCategory['enabled'] && !property_exists($userSubCategories, $subCategoryName)) { - $userSubCategories->{$subCategoryName} = ''; + if (\Enum\Presets\GuestPolicy::POLICY === $subCategoryName) { + $userSubCategories->{$subCategoryName} = GuestPolicy::ALWAYS_ACCEPT; + } else { + $userSubCategories->{$subCategoryName} = ''; + } } } } diff --git a/bbbeasy-backend/app/src/Actions/Presets/Index.php b/bbbeasy-backend/app/src/Actions/Presets/Index.php index 56c6fc1e..5de4837f 100644 --- a/bbbeasy-backend/app/src/Actions/Presets/Index.php +++ b/bbbeasy-backend/app/src/Actions/Presets/Index.php @@ -34,8 +34,10 @@ class Index extends BaseAction use RequirePrivilegeTrait; /** - * @param \Base $f3 - * @param array $params + * @param mixed $f3 + * @param mixed $params + * + * @throws \JsonException */ public function show($f3, $params): void { diff --git a/bbbeasy-backend/app/src/Actions/Recordings/Collect.php b/bbbeasy-backend/app/src/Actions/Recordings/Collect.php index 64d2bfff..2c2d784c 100644 --- a/bbbeasy-backend/app/src/Actions/Recordings/Collect.php +++ b/bbbeasy-backend/app/src/Actions/Recordings/Collect.php @@ -40,11 +40,7 @@ class Collect extends BaseAction public function execute($f3, $params): void { $data = []; - $recordingStates = [ - 'publishing', 'published', - 'processing', 'processed', - 'unpublishing', 'unpublished', - 'deleting', 'deleted', + $recordingStates = ['published', 'unpublished', 'deleted', ]; $room = new Room(); $rooms = $room->find(); diff --git a/bbbeasy-backend/app/src/Actions/Recordings/Index.php b/bbbeasy-backend/app/src/Actions/Recordings/Index.php index ae8eb08b..9685b00b 100644 --- a/bbbeasy-backend/app/src/Actions/Recordings/Index.php +++ b/bbbeasy-backend/app/src/Actions/Recordings/Index.php @@ -35,8 +35,10 @@ class Index extends BaseAction use RequirePrivilegeTrait; /** - * @param \Base $f3 - * @param array $params + * @param mixed $f3 + * @param mixed $params + * + * @throws \JsonException */ public function show($f3, $params): void { diff --git a/bbbeasy-backend/app/src/Actions/Roles/Collect.php b/bbbeasy-backend/app/src/Actions/Roles/Collect.php index 39b2f941..9213e6c0 100644 --- a/bbbeasy-backend/app/src/Actions/Roles/Collect.php +++ b/bbbeasy-backend/app/src/Actions/Roles/Collect.php @@ -34,8 +34,10 @@ class Collect extends BaseAction use RequirePrivilegeTrait; /** - * @param \Base $f3 - * @param array $params + * @param mixed $f3 + * @param mixed $params + * + * @throws \JsonException */ public function execute($f3, $params): void { diff --git a/bbbeasy-backend/app/src/Actions/Roles/Index.php b/bbbeasy-backend/app/src/Actions/Roles/Index.php index 3c7b37b3..01dc0445 100644 --- a/bbbeasy-backend/app/src/Actions/Roles/Index.php +++ b/bbbeasy-backend/app/src/Actions/Roles/Index.php @@ -34,8 +34,10 @@ class Index extends BaseAction use RequirePrivilegeTrait; /** - * @param \Base $f3 - * @param array $params + * @param mixed $f3 + * @param mixed $params + * + * @throws \JsonException */ public function show($f3, $params): void { diff --git a/bbbeasy-backend/app/src/Actions/Rooms/Edit.php b/bbbeasy-backend/app/src/Actions/Rooms/Edit.php index 02f3fc84..ba7738af 100644 --- a/bbbeasy-backend/app/src/Actions/Rooms/Edit.php +++ b/bbbeasy-backend/app/src/Actions/Rooms/Edit.php @@ -36,8 +36,10 @@ class Edit extends BaseAction use RequirePrivilegeTrait; /** - * @param \Base $f3 - * @param array $params + * @param mixed $f3 + * @param mixed $params + * + * @throws \JsonException */ public function rename($f3, $params): void { @@ -62,21 +64,21 @@ public function rename($f3, $params): void $room->preset_id = $form['preset_id']; $nameExist = $checkRoom->nameExists($room->name, $room->user_id); - $shortlinkExist = $checkRoom->shortlinkExists($room->short_link); + $shortLinkExist = $checkRoom->shortlinkExists($room->short_link); $presetExist = $checkRoom->presetExists($form['preset_id'], $form['name']); $labelUpdated = $this->labelUpdated($room->getLabels($room->id), $form['labels']); if ($form['labels']) { - foreach ($form['labels'] as $label) { + foreach ($form['labels'] as $labelForm) { // test if element has been added to room labels list - $l = new Label(); - $l = $l->getByColor($label); + $label = new Label(); + $label = $label->getByColor($labelForm); - if (!$l->dry()) { + if (!$label->dry()) { $room_label = new RoomLabel(); - if (!$room_label->roomAndLabelExists($room->id, $l->id)) { - $room_label->label_id = $l->id; + if (!$room_label->roomAndLabelExists($room->id, $label->id)) { + $room_label->label_id = $label->id; $room_label->room_id = $room->id; $room_label->save(); @@ -97,7 +99,7 @@ public function rename($f3, $params): void } try { - if (!$labelUpdated && $nameExist && $shortlinkExist && $presetExist) { + if (!$labelUpdated && $nameExist && $shortLinkExist && $presetExist) { $this->logger->info('The room is not updated', ['room' => $room->toArray()]); $this->renderJson(['result' => 'FAILED', 'room' => $room->getRoomInfos($room)]); diff --git a/bbbeasy-backend/app/src/Actions/Rooms/Start.php b/bbbeasy-backend/app/src/Actions/Rooms/Start.php index cf22f0aa..94d26132 100644 --- a/bbbeasy-backend/app/src/Actions/Rooms/Start.php +++ b/bbbeasy-backend/app/src/Actions/Rooms/Start.php @@ -28,6 +28,7 @@ use BigBlueButton\Parameters\CreateMeetingParameters; use BigBlueButton\Parameters\GetMeetingInfoParameters; use BigBlueButton\Parameters\JoinMeetingParameters; +use Enum\Presets\General; use Enum\ResponseCode; use Models\Preset; use Models\Room; @@ -43,71 +44,98 @@ class Start extends BaseAction use RequirePrivilegeTrait; /** - * @param \Base $f3 - * @param array $params - * * @throws \Exception */ + public function beforeroute(): void + { + $id = $this->f3->get('PARAMS.id'); + + $room = new Room(); + $room = $room->getById($id); + $preset = new Preset(); + $p = $preset->findById($room->getPresetID($room->id)['preset_id']); + + $presetProcessor = new PresetProcessor(); + $presetData = $presetProcessor->preparePresetData($p->getMyPresetInfos($p)); + + if (!$presetData[General::GROUP_NAME][General::OPEN_FOR_EVERYONE] && null === $this->session->get('user')) { + $this->logger->warning('Access denied to route '); + $this->f3->error(404); + } + } + public function execute($f3, $params): void { $id = $params['id']; $errorMessage = 'Room Meeting could not be started'; + $form = $this->getDecodedBody(); - $room = new Room(); - $room = $room->getById($id); - if ($room->valid()) { - $bbbRequester = new BigBlueButtonRequester(); + $fullname = (null !== $this->session->get('user') ? $this->session->get('user.username') : $form['fullname']); + if (null !== $fullname) { + $room = new Room(); + $room = $room->getById($id); + if ($room->valid()) { + $bbbRequester = new BigBlueButtonRequester(); - // get room meeting id - $meetingId = $room->meeting_id; + // get room meeting id + $meetingId = $room->meeting_id; - // call meeting info to check if meeting is running - $getMeetingInfoResponse = $this->getMeetingInfo($meetingId, $bbbRequester); + // call meeting info to check if meeting is running + $getMeetingInfoResponse = $this->getMeetingInfo($meetingId, $bbbRequester); - if (null === $getMeetingInfoResponse) { - return; - } - $preset = new Preset(); - $p = $preset->findById($room->getPresetID($room->id)['preset_id']); + if (null === $getMeetingInfoResponse) { + return; + } + $preset = new Preset(); + $p = $preset->findById($room->getPresetID($room->id)['preset_id']); + + if (!$getMeetingInfoResponse->success()) { + // meeting not found + if ('notFound' === $getMeetingInfoResponse->getMessageKey()) { + // create new meeting with the same meetingId - if (!$getMeetingInfoResponse->success()) { - // meeting not found - if ('notFound' === $getMeetingInfoResponse->getMessageKey()) { - // create new meeting with the same meetingId + $presetprocessor = new PresetProcessor(); + $presetData = $presetprocessor->preparePresetData($p->getMyPresetInfos($p)); - $presetprocessor = new PresetProcessor(); - $presetData = $presetprocessor->preparePresetData($p->getMyPresetInfos($p)); + if ($room->getRoomInfos($room)['user_id'] === $this->session->get('user.id') || $presetData[General::GROUP_NAME][General::ANYONE_CAN_START]) { + $createResult = $this->createMeeting($meetingId, $bbbRequester, $room->short_link, $p->getMyPresetInfos($p), $presetprocessor); - if ($room->getRoomInfos($room)['user_id'] === $this->session->get('user.id') || $presetData['General']['anyone_can_start']) { - $createResult = $this->createMeeting($meetingId, $bbbRequester, $room->short_link, $p->getMyPresetInfos($p), $presetprocessor); + if (null === $createResult) { + return; + } + } else { + $this->renderJson(['meeting' => 'Meeting has not started yet'], ResponseCode::HTTP_NOT_FOUND); - if (null === $createResult) { return; } } else { - $this->renderJson(['meeting' => 'Meeting has not started yet'], ResponseCode::HTTP_NOT_FOUND); + $this->logger->error('Could not fetch a meeting due to an error.'); + $this->renderJson(['meeting' => 'Could not start or join the meeting'], ResponseCode::HTTP_INTERNAL_SERVER_ERROR); return; } - } else { - $this->logger->error('Could not fetch a meeting due to an error.'); - $this->renderJson(['meeting' => 'Could not start or join the meeting'], ResponseCode::HTTP_INTERNAL_SERVER_ERROR); - - return; } - } - if ($room->getRoomInfos($room)['user_id'] === $this->session->get('user.id') || $presetData['General']['all_join_as_moderator']) { - $this->joinMeeting($meetingId, Role::MODERATOR, $bbbRequester, $p->getMyPresetInfos($p)); + if ($room->getRoomInfos($room)['user_id'] === $this->session->get('user.id') || $presetData[General::GROUP_NAME][General::ALL_JOIN_AS_MODERATOR]) { + $this->joinMeeting($meetingId, Role::MODERATOR, $bbbRequester, $p->getMyPresetInfos($p), $fullname); + } else { + $this->joinMeeting($meetingId, Role::VIEWER, $bbbRequester, $p->getMyPresetInfos($p), $fullname); + } } else { - $this->joinMeeting($meetingId, Role::VIEWER, $bbbRequester, $p->getMyPresetInfos($p)); + $this->logger->error($errorMessage); + $this->renderJson([], ResponseCode::HTTP_NOT_FOUND); } } else { - $this->logger->error($errorMessage); - $this->renderJson([], ResponseCode::HTTP_NOT_FOUND); + $this->logger->error('Fullname should not be empty'); + $this->renderJson(['meeting' => 'Could not join a meeting with an empty fullname'], ResponseCode::HTTP_INTERNAL_SERVER_ERROR); + + return; } } + /** + * @return \BigBlueButton\Responses\GetMeetingInfoResponse + */ public function getMeetingInfo(string $meetingId, BigBlueButtonRequester $bbbRequester) { $getInfosParams = new GetMeetingInfoParameters($meetingId); @@ -129,13 +157,14 @@ public function createMeeting(string $meetingId, BigBlueButtonRequester $bbbRequ $createParams->setAttendeePassword(DataUtils::generateRandomString()); // @todo : set later via presets - $createParams->setModeratorOnlyMessage('to invite someone you can use this link http://bbbeasy.test:3300/bbbeasy/' . $link); + $createParams->setModeratorOnlyMessage('to invite someone you can use this link ' . $this->f3->get('SERVER.HTTP_ORIGIN') . $this->f3->get('client.room_url_prefix') . $link); // @fixme: delete after fixing the PHP library $createParams->setAllowRequestsWithoutSession(true); $this->logger->info('Received request to create a new meeting.', ['meetingID' => $meetingId]); $createMeetingResponse = $bbbRequester->createMeeting($createParams); + if ($createMeetingResponse->failed()) { $this->logger->warning('Meeting could not be created.'); $this->renderXmlString($createMeetingResponse->getRawXml()); @@ -150,11 +179,12 @@ public function createMeeting(string $meetingId, BigBlueButtonRequester $bbbRequ return $createParams->getModeratorPassword(); } - public function joinMeeting(string $meetingId, string $role, BigBlueButtonRequester $bbbRequester, $p): void + public function joinMeeting(string $meetingId, string $role, BigBlueButtonRequester $bbbRequester, $p, $fullname): void { - $joinParams = new JoinMeetingParameters($meetingId, $this->session->get('user.username'), $role); + $joinParams = new JoinMeetingParameters($meetingId, $fullname, $role); $presetProcessor = new PresetProcessor(); - $joinParams = $presetProcessor->toJoinParameters($p, $joinParams); + + $joinParams = $presetProcessor->toJoinParameters($p, $joinParams); $this->logger->info( 'Meeting join request is going to redirect to the web client.', diff --git a/bbbeasy-backend/app/src/Actions/Rooms/View.php b/bbbeasy-backend/app/src/Actions/Rooms/View.php index a924be0a..644a3b05 100644 --- a/bbbeasy-backend/app/src/Actions/Rooms/View.php +++ b/bbbeasy-backend/app/src/Actions/Rooms/View.php @@ -25,6 +25,7 @@ use Actions\Base as BaseAction; use Actions\RequirePrivilegeTrait; use BigBlueButton\Parameters\GetMeetingInfoParameters; +use Enum\Presets\General; use Enum\ResponseCode; use Models\Preset; use Models\Room; @@ -38,6 +39,23 @@ class View extends BaseAction { use RequirePrivilegeTrait; + public function beforeroute(): void + { + $link = $this->f3->get('PARAMS.link'); + + $room = new Room(); + $room = $room->getByLink($link); + $preset = new Preset(); + $p = $preset->findById($room->getPresetID($room->id)['preset_id']); + $presetProcessor = new PresetProcessor(); + $presetData = $presetProcessor->preparePresetData($p->getMyPresetInfos($p)); + + if (!$presetData[General::GROUP_NAME][General::OPEN_FOR_EVERYONE] && null === $this->session->get('user')) { + $this->logger->warning('Access denied to route '); + $this->f3->error(404); + } + } + /** * @param \Base $f3 * @param array $params @@ -63,7 +81,7 @@ public function show($f3, $params): void if ('notFound' === $meetingInfoResponse->getMessageKey()) { $anyonestart = false; - if ($room->getRoomInfos($room)['user_id'] === $this->session->get('user.id') || $presetData['General']['anyone_can_start']) { + if ($room->getRoomInfos($room)['user_id'] === $this->session->get('user.id') || $presetData[General::GROUP_NAME][General::ANYONE_CAN_START]) { $canStart = true; } } @@ -72,8 +90,6 @@ public function show($f3, $params): void $meeting = (array) $meetingInfoResponse->getRawXml(); $meeting['canStart'] = $canStart; - $meeting['auto_join'] = $presetData['Audio']['auto_join']; - $this->renderJson(['room' => $room->getRoomInfos($room), 'meeting' => $meeting]); } else { $this->logger->error('Link not found'); diff --git a/bbbeasy-backend/app/src/Actions/Settings/Collect.php b/bbbeasy-backend/app/src/Actions/Settings/Collect.php index d6744ffe..8812ba60 100644 --- a/bbbeasy-backend/app/src/Actions/Settings/Collect.php +++ b/bbbeasy-backend/app/src/Actions/Settings/Collect.php @@ -34,8 +34,10 @@ class Collect extends BaseAction use RequirePrivilegeTrait; /** - * @param \Base $f3 - * @param array $params + * @param mixed $f3 + * @param mixed $params + * + * @throws \JsonException */ public function execute($f3, $params): void { diff --git a/bbbeasy-backend/app/src/Application/Bootstrap.php b/bbbeasy-backend/app/src/Application/Bootstrap.php index 5c00f823..c617feaf 100644 --- a/bbbeasy-backend/app/src/Application/Bootstrap.php +++ b/bbbeasy-backend/app/src/Application/Bootstrap.php @@ -106,8 +106,7 @@ protected function loadAppSetting(): void if (!$this->f3->get(CacheKey::CONFIG_LOADED)) { $this->f3->set(CacheKey::CONFIG_LOADED, true, 3590); // Load global settings - foreach ([] - as $entry => $cacheKey) { + foreach ([] as $entry => $cacheKey) { $exists = 'locale' === $entry ? $this->session->get($entry) : $this->f3->exists($entry); if (!$exists) { $setting = new Setting(); diff --git a/bbbeasy-backend/app/src/Data/PresetData.php b/bbbeasy-backend/app/src/Data/PresetData.php new file mode 100644 index 00000000..351354fb --- /dev/null +++ b/bbbeasy-backend/app/src/Data/PresetData.php @@ -0,0 +1,45 @@ +. + */ + +namespace Data; + +class PresetData +{ + private array $data = []; + + public function setData($category, $subCategory, $value): void + { + if (null !== $value || (\is_string($value) && !empty($value))) { + $this->data[$category][$subCategory] = $value; + } + } + + public function getData($category, $subCategory) + { + // @fixme: should return null if not found + // if (\array_key_exists($category, $this->data) && \array_key_exists($category, $this->data[$category])) { + return $this->data[$category][$subCategory]; + // } + + // return null; + } +} diff --git a/bbbeasy-backend/app/src/Enum/GuestPolicy.php b/bbbeasy-backend/app/src/Enum/GuestPolicy.php new file mode 100644 index 00000000..9d24e807 --- /dev/null +++ b/bbbeasy-backend/app/src/Enum/GuestPolicy.php @@ -0,0 +1,30 @@ +. + */ + +namespace Enum; + +class GuestPolicy extends Enum +{ + public const ALWAYS_ACCEPT = 'ALWAYS_ACCEPT'; + public const ALWAYS_DENY = 'ALWAYS_DENY'; + public const ASK_MODERATOR = 'ASK_MODERATOR'; +} diff --git a/bbbeasy-backend/app/src/Enum/Presets/Audio.php b/bbbeasy-backend/app/src/Enum/Presets/Audio.php index 2f59a10f..94dfa504 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/Audio.php +++ b/bbbeasy-backend/app/src/Enum/Presets/Audio.php @@ -26,6 +26,8 @@ class Audio extends Enum { + public const GROUP_NAME = 'Audio'; + public const USERS_JOIN_MUTED = 'users_join_muted'; public const MODERATORS_ALLOWED_TO_UNMUTE_USERS = 'moderators_allowed_to_unmute_users'; public const AUTO_JOIN = 'auto_join'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/Branding.php b/bbbeasy-backend/app/src/Enum/Presets/Branding.php index a8e7298e..05c5abea 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/Branding.php +++ b/bbbeasy-backend/app/src/Enum/Presets/Branding.php @@ -26,6 +26,8 @@ class Branding extends Enum { + public const GROUP_NAME = 'Branding'; + public const TITLE = 'title'; public const LOGO = 'logo'; public const BANNER_TEXT = 'banner_text'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/BreakoutRooms.php b/bbbeasy-backend/app/src/Enum/Presets/BreakoutRooms.php index 216b722c..0d431865 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/BreakoutRooms.php +++ b/bbbeasy-backend/app/src/Enum/Presets/BreakoutRooms.php @@ -26,6 +26,8 @@ class BreakoutRooms extends Enum { + public const GROUP_NAME = 'BreakoutRooms'; + public const CONFIGURABLE = 'configurable'; public const PRIVATE_CHAT = 'private_chat'; public const RECORDING = 'recording'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/General.php b/bbbeasy-backend/app/src/Enum/Presets/General.php index e2ea2445..49040473 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/General.php +++ b/bbbeasy-backend/app/src/Enum/Presets/General.php @@ -26,6 +26,7 @@ class General extends Enum { + public const GROUP_NAME = 'General'; public const DURATION = 'duration'; public const MAXIMUM_PARTICIPANTS = 'maximum_participants'; public const ANYONE_CAN_START = 'anyone_can_start'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/GuestPolicy.php b/bbbeasy-backend/app/src/Enum/Presets/GuestPolicy.php index 81988af2..3fc7ec34 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/GuestPolicy.php +++ b/bbbeasy-backend/app/src/Enum/Presets/GuestPolicy.php @@ -26,9 +26,10 @@ class GuestPolicy extends Enum { + public const GROUP_NAME = 'Guest Policy'; public const CONFIGURABLE = 'configurable'; public const POLICY = 'policy'; public const CONFIGURABLE_TYPE = 'bool'; - public const POLICY_TYPE = 'string'; + public const POLICY_TYPE = 'select'; } diff --git a/bbbeasy-backend/app/src/Enum/Presets/Language.php b/bbbeasy-backend/app/src/Enum/Presets/Language.php index f77ca1b9..a145cfdc 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/Language.php +++ b/bbbeasy-backend/app/src/Enum/Presets/Language.php @@ -26,7 +26,8 @@ class Language extends Enum { + public const GROUP_NAME = 'Language'; public const DEFAULT_LANGUAGE = 'default_language'; - public const DEFAULT_LANGUAGE_TYPE = 'string'; + public const DEFAULT_LANGUAGE_TYPE = 'select'; } diff --git a/bbbeasy-backend/app/src/Enum/Presets/Layout.php b/bbbeasy-backend/app/src/Enum/Presets/Layout.php index 415af05b..783fbe7b 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/Layout.php +++ b/bbbeasy-backend/app/src/Enum/Presets/Layout.php @@ -26,6 +26,7 @@ class Layout extends Enum { + public const GROUP_NAME = 'Layout'; public const PRESENTATION = 'presentation'; public const PARTICIPANTS = 'participants'; public const CHAT = 'chat'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/LearningDashboard.php b/bbbeasy-backend/app/src/Enum/Presets/LearningDashboard.php index 3b0851cf..b5985146 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/LearningDashboard.php +++ b/bbbeasy-backend/app/src/Enum/Presets/LearningDashboard.php @@ -26,6 +26,7 @@ class LearningDashboard extends Enum { + public const GROUP_NAME = 'LearningDashboard'; public const CONFIGURABLE = 'configurable'; public const CLEANUP_DELAY = 'cleanup_delay'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/LockSettings.php b/bbbeasy-backend/app/src/Enum/Presets/LockSettings.php index 3a8f5d67..77de4f42 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/LockSettings.php +++ b/bbbeasy-backend/app/src/Enum/Presets/LockSettings.php @@ -26,6 +26,7 @@ class LockSettings extends Enum { + public const GROUP_NAME = 'LockSettings'; public const WEBCAMS = 'webcams'; public const MICROPHONES = 'microphones'; public const PRIVATE_CHAT = 'private_chat'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/Presentation.php b/bbbeasy-backend/app/src/Enum/Presets/Presentation.php index cbe618b5..3258d4b1 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/Presentation.php +++ b/bbbeasy-backend/app/src/Enum/Presets/Presentation.php @@ -26,6 +26,7 @@ class Presentation extends Enum { + public const GROUP_NAME = 'Presentation'; public const PRE_UPLOAD = 'pre_upload'; public const PRE_UPLOAD_TYPE = 'bool'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/Recording.php b/bbbeasy-backend/app/src/Enum/Presets/Recording.php index 929272a4..f2747365 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/Recording.php +++ b/bbbeasy-backend/app/src/Enum/Presets/Recording.php @@ -26,11 +26,12 @@ class Recording extends Enum { - public const CONFIGURABLE = 'configurable'; - public const AUTO_START = 'auto_start'; + public const GROUP_NAME = 'Recording'; + public const RECORD = 'record'; public const ALLOW_START_STOP = 'allow_start_stop'; + public const AUTO_START = 'auto_start'; - public const CONFIGURABLE_TYPE = 'bool'; + public const RECORD_TYPE = 'bool'; public const AUTO_START_TYPE = 'bool'; public const ALLOW_START_STOP_TYPE = 'bool'; } diff --git a/bbbeasy-backend/app/src/Enum/Presets/Screenshare.php b/bbbeasy-backend/app/src/Enum/Presets/Screenshare.php index b3a4eaf9..245739ae 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/Screenshare.php +++ b/bbbeasy-backend/app/src/Enum/Presets/Screenshare.php @@ -26,7 +26,8 @@ class Screenshare extends Enum { - public const CONFIGURABLE = 'configurable'; + public const GROUP_NAME = 'Screenshare'; + public const CONFIGURABLE = 'availability'; public const CONFIGURABLE_TYPE = 'bool'; } diff --git a/bbbeasy-backend/app/src/Enum/Presets/Security.php b/bbbeasy-backend/app/src/Enum/Presets/Security.php index d58d2123..3d699d48 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/Security.php +++ b/bbbeasy-backend/app/src/Enum/Presets/Security.php @@ -26,6 +26,7 @@ class Security extends Enum { + public const GROUP_NAME = 'Security'; public const PASSWORD_FOR_MODERATOR = 'password_for_moderator'; public const PASSWORD_FOR_ATTENDEE = 'password_for_attendee'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/UserExperience.php b/bbbeasy-backend/app/src/Enum/Presets/UserExperience.php index 6658ba3c..185b7128 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/UserExperience.php +++ b/bbbeasy-backend/app/src/Enum/Presets/UserExperience.php @@ -26,6 +26,7 @@ class UserExperience extends Enum { + public const GROUP_NAME = 'UserExperience'; public const KEYBOARD_SHORTCUTS = 'keyboard_shortcuts'; public const ASK_FOR_FEEDBACK = 'ask_for_feedback'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/Webcams.php b/bbbeasy-backend/app/src/Enum/Presets/Webcams.php index 0940dc06..8dcc7e85 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/Webcams.php +++ b/bbbeasy-backend/app/src/Enum/Presets/Webcams.php @@ -26,7 +26,8 @@ class Webcams extends Enum { - public const CONFIGURABLE = 'configurable'; + public const GROUP_NAME = 'Webcams'; + public const CONFIGURABLE = 'availability'; public const VISIBLE_FOR_MODERATOR_ONLY = 'visible_for_moderator_only'; public const MODERATOR_ALLOWED_CAMERA_EJECT = 'moderator_allowed_camera_eject'; public const AUTO_SHARE = 'auto_share'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/Whiteboard.php b/bbbeasy-backend/app/src/Enum/Presets/Whiteboard.php index 83858070..efdac772 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/Whiteboard.php +++ b/bbbeasy-backend/app/src/Enum/Presets/Whiteboard.php @@ -26,6 +26,7 @@ class Whiteboard extends Enum { + public const GROUP_NAME = 'Whiteboard'; public const MULTI_USER_PEN = 'multi_user_pen_only'; public const PRESENTER_TOOLS = 'presenter_tools'; public const MULTI_USER_TOOLS = 'multi_user_tools'; diff --git a/bbbeasy-backend/app/src/Enum/Presets/ZcaleRight.php b/bbbeasy-backend/app/src/Enum/Presets/ZcaleRight.php index a62c24b1..ab564087 100644 --- a/bbbeasy-backend/app/src/Enum/Presets/ZcaleRight.php +++ b/bbbeasy-backend/app/src/Enum/Presets/ZcaleRight.php @@ -26,7 +26,8 @@ class ZcaleRight extends Enum { - public const POOL_NAME = 'pool_name'; + public const GROUP_NAME = 'ZcaleRight'; + public const POOL_NAME = 'pool_name'; public const POOL_NAME_TYPE = 'string'; } diff --git a/bbbeasy-backend/app/src/Models/Preset.php b/bbbeasy-backend/app/src/Models/Preset.php index cfb628a2..69d447a4 100644 --- a/bbbeasy-backend/app/src/Models/Preset.php +++ b/bbbeasy-backend/app/src/Models/Preset.php @@ -22,6 +22,8 @@ namespace Models; +use Enum\Presets\GuestPolicy; +use Enum\Presets\Layout; use Models\Base as BaseModel; /** @@ -183,7 +185,8 @@ public function getByName($name): self public function addDefaultSettings($successMessage, $errorMessage): bool|string { try { - $settings = $this->getPresetSettings(); + $settings = $this->getPresetSettings(); + $this->settings = json_encode($settings); $this->save(); } catch (\Exception $e) { @@ -206,6 +209,7 @@ public function getPresetSettings(): array $categories = $preset->getPresetCategories(); $presetSettings = []; $settings = []; + if ($categories) { foreach ($categories as $category) { // get category name @@ -217,15 +221,29 @@ public function getPresetSettings(): array $presetSett = new PresetSetting(); foreach ($attributes as $attribute) { - $presetSettings = $presetSett->getByName($attribute); + $presetSettings = $presetSett->getByNameAndGroup($attribute, $categoryName); + if (!$presetSettings->dry() && $presetSettings->enabled) { if (!$settings[$categoryName]) { - $settings += [$categoryName => [$presetSettings->name => '']]; + if (GuestPolicy::GROUP_NAME === $categoryName && GuestPolicy::POLICY === $presetSettings->name) { + $settings += [$categoryName => [$presetSettings->name => \Enum\GuestPolicy::ALWAYS_ACCEPT]]; + } elseif (Layout::GROUP_NAME === $categoryName) { + $settings += [$categoryName => [$presetSettings->name => true]]; + } else { + $settings += [$categoryName => [$presetSettings->name => '']]; + } } else { - $settings[$categoryName] += [$presetSettings->name => '']; + if (GuestPolicy::GROUP_NAME === $categoryName && GuestPolicy::POLICY === $presetSettings->name) { + $settings[$categoryName] += [$presetSettings->name => \Enum\GuestPolicy::ALWAYS_ACCEPT]; + } elseif (Layout::GROUP_NAME === $categoryName) { + $settings[$categoryName] += [$presetSettings->name => true]; + } else { + $settings[$categoryName] += [$presetSettings->name => '']; + } } } } + $settings[$categoryName] = json_encode($settings[$categoryName]); } } diff --git a/bbbeasy-backend/app/src/Models/PresetSetting.php b/bbbeasy-backend/app/src/Models/PresetSetting.php index db78a204..d20fbe0f 100644 --- a/bbbeasy-backend/app/src/Models/PresetSetting.php +++ b/bbbeasy-backend/app/src/Models/PresetSetting.php @@ -36,7 +36,8 @@ */ class PresetSetting extends BaseModel { - protected $table = 'preset_settings'; + protected const GROUP_NAME = 'GROUP_NAME'; + protected $table = 'preset_settings'; public function getDefaultPresetSettings($enabled = false): array { @@ -55,11 +56,12 @@ public function getDefaultPresetSettings($enabled = false): array $attributes = $class->getReflectionConstants(); foreach ($attributes as $attribute) { $attributeName = $attribute->name; - if (!str_ends_with($attributeName, '_TYPE')) { + + if (self::GROUP_NAME !== $attributeName && !str_ends_with($attributeName, '_TYPE')) { $subCategory = $class->getConstant($attributeName); $subCategoryData = [ 'name' => $subCategory, - 'enabled' => $enabled, + 'enabled' => 'Layout' === $categoryName ? true : $enabled, ]; $categoryData['subcategories'][] = $subCategoryData; } @@ -125,26 +127,39 @@ public function getByName(string $name): self return $this; } + public function getByNameAndGroup(string $name, string $group): self + { + $this->load(['name = ? and group = ? ', $name, $group]); + + return $this; + } + public function savePresetSettings(array $presets): bool|string { foreach ($presets as $preset) { + // var_dump($preset['name']); + $subcategories = $preset['subcategories']; + foreach ($subcategories as $subcategory) { - $presetSetting = new self(); - $presetSetting->group = $preset['name']; - $presetSetting->name = $subcategory['name']; - $presetSetting->enabled = $subcategory['enabled']; - - // @fixme: should not have embedded try/catch here - try { - $presetSetting->save(); - } catch (\Exception $e) { - $message = $e->getMessage(); - $this->logger->error('Initial application setup : Preset setting could not be added', ['error' => $message]); - - return $message; + if ($subcategory['name'] !== str_replace(' ', '', $preset['name'])) { + $presetSetting = new self(); + $presetSetting->group = $preset['name']; + $presetSetting->name = $subcategory['name']; + $presetSetting->enabled = $subcategory['enabled']; + + // @fixme: should not have embedded try/catch here + try { + $presetSetting->save(); + } catch (\Exception $e) { + $message = $e->getMessage(); + $this->logger->error('Initial application setup : Preset setting could not be added', ['error' => $message]); + + return $message; + } + + $this->logger->info('Initial application setup : Add preset setting', ['preset' => $presetSetting->toArray()]); } - $this->logger->info('Initial application setup : Add preset setting', ['preset' => $presetSetting->toArray()]); } } diff --git a/bbbeasy-backend/app/src/Models/Role.php b/bbbeasy-backend/app/src/Models/Role.php index 721dd932..6dd3520a 100644 --- a/bbbeasy-backend/app/src/Models/Role.php +++ b/bbbeasy-backend/app/src/Models/Role.php @@ -146,7 +146,7 @@ public function getRolePermissions(): array|object return $permissionsRole; } - public function saveRoleAndPermissions($name, $permissions): bool|Role + public function saveRoleAndPermissions($name, $permissions): bool|self { $this->logger->info('Starting save role and permissions transaction.'); $this->db->begin(); diff --git a/bbbeasy-backend/app/src/Models/Setting.php b/bbbeasy-backend/app/src/Models/Setting.php index bad326e3..6f31e7cf 100644 --- a/bbbeasy-backend/app/src/Models/Setting.php +++ b/bbbeasy-backend/app/src/Models/Setting.php @@ -109,7 +109,7 @@ public function checkSettingsData(DataChecker $dataChecker, array $form): DataCh } $dataChecker->verify($form['theme'], Validator::notEmpty()->setName('color')); - $dataChecker->verify($form['theme']['brand_color'], Validator::hexRgbColor()->setName('brand_color')); + $dataChecker->verify($form['theme']['brand_color'], Validator::notEmpty()->setName('brand_color')); $dataChecker->verify($form['theme']['default_font_size'], Validator::notEmpty()->setName('default_font_size')); $dataChecker->verify($form['theme']['border_radius'], Validator::notEmpty()->setName('border_radius')); diff --git a/bbbeasy-backend/app/src/Utils/PresetProcessor.php b/bbbeasy-backend/app/src/Utils/PresetProcessor.php index 2f0c1308..1aeb210b 100644 --- a/bbbeasy-backend/app/src/Utils/PresetProcessor.php +++ b/bbbeasy-backend/app/src/Utils/PresetProcessor.php @@ -22,12 +22,21 @@ namespace Utils; +use Data\PresetData; +use Enum\Presets\Audio; +use Enum\Presets\Branding; +use Enum\Presets\BreakoutRooms; +use Enum\Presets\General; +use Enum\Presets\GuestPolicy; +use Enum\Presets\Layout; +use Enum\Presets\LearningDashboard; +use Enum\Presets\LockSettings; +use Enum\Presets\Presentation; +use Enum\Presets\Recording; +use Enum\Presets\Webcams; + class PresetProcessor { - public function __construct() - { - } - public function preparePresetData($preset) { $data = []; @@ -47,62 +56,131 @@ public function preparePresetData($preset) public function toCreateMeetingParams($preset, $createParams) { - $presetData = $this->preparePresetData($preset); + $presetsData = new PresetData(); + $preparePresetData = $this->preparePresetData($preset); + + // Set the preset data + $presetsData->setData(Audio::GROUP_NAME, Audio::USERS_JOIN_MUTED, $preparePresetData[Audio::GROUP_NAME][Audio::USERS_JOIN_MUTED]); + $presetsData->setData(Audio::GROUP_NAME, Audio::MODERATORS_ALLOWED_TO_UNMUTE_USERS, $preparePresetData[Audio::GROUP_NAME][Audio::MODERATORS_ALLOWED_TO_UNMUTE_USERS]); + + $presetsData->setData(Branding::GROUP_NAME, Branding::LOGO, $preparePresetData[Branding::GROUP_NAME][Branding::LOGO]); + $presetsData->setData(Branding::GROUP_NAME, Branding::BANNER_COLOR, $preparePresetData[Branding::GROUP_NAME][Branding::BANNER_COLOR]); + $presetsData->setData(Branding::GROUP_NAME, Branding::BANNER_TEXT, $preparePresetData[Branding::GROUP_NAME][Branding::BANNER_TEXT]); + + $presetsData->setData(BreakoutRooms::GROUP_NAME, BreakoutRooms::CONFIGURABLE, $preparePresetData[BreakoutRooms::GROUP_NAME][BreakoutRooms::CONFIGURABLE]); + $presetsData->setData(BreakoutRooms::GROUP_NAME, BreakoutRooms::RECORDING, $preparePresetData[BreakoutRooms::GROUP_NAME][BreakoutRooms::RECORDING]); + $presetsData->setData(BreakoutRooms::GROUP_NAME, BreakoutRooms::PRIVATE_CHAT, $preparePresetData[BreakoutRooms::GROUP_NAME][BreakoutRooms::PRIVATE_CHAT]); + + $presetsData->setData(General::GROUP_NAME, General::DURATION, $preparePresetData[General::GROUP_NAME][General::DURATION]); + + $presetsData->setData(General::GROUP_NAME, General::MAXIMUM_PARTICIPANTS, $preparePresetData[General::GROUP_NAME][General::MAXIMUM_PARTICIPANTS]); + + $presetsData->setData(GuestPolicy::GROUP_NAME, GuestPolicy::POLICY, $preparePresetData[GuestPolicy::GROUP_NAME][GuestPolicy::POLICY]); + + $presetsData->setData(LearningDashboard::GROUP_NAME, LearningDashboard::CONFIGURABLE, $preparePresetData[LearningDashboard::GROUP_NAME][LearningDashboard::CONFIGURABLE]); + $presetsData->setData(LearningDashboard::GROUP_NAME, LearningDashboard::CLEANUP_DELAY, $preparePresetData[LearningDashboard::GROUP_NAME][LearningDashboard::CLEANUP_DELAY]); + + $presetsData->setData(LockSettings::GROUP_NAME, LockSettings::WEBCAMS, $preparePresetData[LockSettings::GROUP_NAME][LockSettings::WEBCAMS]); + $presetsData->setData(LockSettings::GROUP_NAME, LockSettings::MICROPHONES, $preparePresetData[LockSettings::GROUP_NAME][LockSettings::MICROPHONES]); + $presetsData->setData(LockSettings::GROUP_NAME, LockSettings::PRIVATE_CHAT, $preparePresetData[LockSettings::GROUP_NAME][LockSettings::PRIVATE_CHAT]); + $presetsData->setData(LockSettings::GROUP_NAME, LockSettings::PUBLIC_CHAT, $preparePresetData[LockSettings::GROUP_NAME][LockSettings::PUBLIC_CHAT]); + $presetsData->setData(LockSettings::GROUP_NAME, LockSettings::SHARED_NOTES, $preparePresetData[LockSettings::GROUP_NAME][LockSettings::SHARED_NOTES]); + $presetsData->setData(LockSettings::GROUP_NAME, LockSettings::LAYOUT, $preparePresetData[LockSettings::GROUP_NAME][LockSettings::LAYOUT]); - $createParams->setMuteOnStart($presetData['Audio'] ? ($presetData['Audio']['users_join_muted'] ? true : false) : false); - $createParams->setAllowModsToUnmuteUsers($presetData['Audio'] ? ($presetData['Audio']['moderators_allowed_to_unmute_users'] ? true : false) : false); + $presetsData->setData(Presentation::GROUP_NAME, Presentation::PRE_UPLOAD, $preparePresetData[Presentation::GROUP_NAME][Presentation::PRE_UPLOAD]); - $createParams->setLogo($presetData['Branding'] ? $presetData['Branding']['logo'] : null); - $createParams->setBannerText($presetData['Branding'] ? $presetData['Branding']['banner_text'] : null); - $createParams->setBannerColor($presetData['Branding'] ? $presetData['Branding']['banner_color'] : null); + $presetsData->setData(Recording::GROUP_NAME, Recording::AUTO_START, $preparePresetData[Recording::GROUP_NAME][Recording::AUTO_START]); + $presetsData->setData(Recording::GROUP_NAME, Recording::ALLOW_START_STOP, $preparePresetData[Recording::GROUP_NAME][Recording::ALLOW_START_STOP]); + $presetsData->setData(Recording::GROUP_NAME, Recording::RECORD, $preparePresetData[Recording::GROUP_NAME][Recording::RECORD]); - $createParams->setBreakoutRoomsEnabled($presetData['Breakout Rooms'] ? ($presetData['Breakout Rooms']['configurable'] ? true : false) : false); - $createParams->setBreakoutRoomsRecord($presetData['Breakout Rooms'] ? ($presetData['Breakout Rooms']['recording'] ? true : false) : false); - $createParams->setBreakoutRoomsPrivateChatEnabled($presetData['Breakout Rooms'] ? ($presetData['Breakout Rooms']['private_chat'] ? true : false) : false); + $presetsData->setData(Webcams::GROUP_NAME, Webcams::VISIBLE_FOR_MODERATOR_ONLY, $preparePresetData[Webcams::GROUP_NAME][Webcams::VISIBLE_FOR_MODERATOR_ONLY]); + $presetsData->setData(Webcams::GROUP_NAME, Webcams::MODERATOR_ALLOWED_CAMERA_EJECT, $preparePresetData[Webcams::GROUP_NAME][Webcams::MODERATOR_ALLOWED_CAMERA_EJECT]); - $createParams->setDuration($presetData['General'] ? $presetData['General']['duration'] : null); - $createParams->setMaxParticipants($presetData['General'] ? $presetData['General']['maximum_participants'] : null); + // Get preset data to create meeting parameters + $createParams->setMuteOnStart($presetsData->getData(Audio::GROUP_NAME, Audio::USERS_JOIN_MUTED)); + + $createParams->setAllowModsToUnmuteUsers($presetsData->getData(Audio::GROUP_NAME, Audio::MODERATORS_ALLOWED_TO_UNMUTE_USERS)); + // $createParams->setListenOnlyEnabled($presetData->getData(Audio::GROUP_NAME, Audio::LISTEN_ONLY_ENABLED)); + // $createParams->setSkipEchoTest($presetData->getData(Audio::GROUP_NAME, Audio::SKIP_ECHO_TEST)); + + $createParams->setLogo($presetsData->getData(Branding::GROUP_NAME, Branding::LOGO)); + $createParams->setBannerText($presetsData->getData(Branding::GROUP_NAME, Branding::BANNER_TEXT)); + $createParams->setBannerColor($presetsData->getData(Branding::GROUP_NAME, Branding::BANNER_COLOR)); + // $createParams->setUseAvatars($presetsData->getData(Branding::GROUP_NAME, Branding::USE_AVATARS)); + + $createParams->setBreakoutRoomsEnabled($presetsData->getData(BreakoutRooms::GROUP_NAME, BreakoutRooms::CONFIGURABLE)); + $createParams->setBreakoutRoomsRecord($presetsData->getData(BreakoutRooms::GROUP_NAME, BreakoutRooms::RECORDING)); + + $createParams->setBreakoutRoomsPrivateChatEnabled(null !== $presetsData->getData(BreakoutRooms::GROUP_NAME, BreakoutRooms::PRIVATE_CHAT) ? $presetsData->getData(BreakoutRooms::GROUP_NAME, BreakoutRooms::PRIVATE_CHAT) : true); + + $createParams->setDuration($presetsData->getData(General::GROUP_NAME, General::DURATION)); + $createParams->setMaxParticipants($presetsData->getData(General::GROUP_NAME, General::MAXIMUM_PARTICIPANTS)); + // $createParams->setOpenForEveryone($presetData->getData(General::GROUP_NAME, General::OPEN_FOR_EVERYONE)); // anyone_can_start,open_for_everyone,logged_in_users_only - $createParams->setGuestPolicy($presetData['Guest Policy'] ? $presetData['Guest Policy']['policy'] : null); + $createParams->setGuestPolicy($presetsData->getData(GuestPolicy::GROUP_NAME, GuestPolicy::POLICY)); // configurable // language:default_language // layout: presentation,participants,chat,navigation_bar,actions_bar - $createParams->setLearningDashboardEnabled($presetData['Learning_dashboard'] ? ($presetData['Learning_dashboard']['configurable'] ? true : false) : false); - $createParams->setLearningDashboardCleanupDelayInMinutes($presetData['Learning_dashboard'] ? $presetData['Learning_dashboard']['cleanup_delay'] : null); + $createParams->setLearningDashboardEnabled($presetsData->getData(LearningDashboard::GROUP_NAME, LearningDashboard::CONFIGURABLE)); + $createParams->setLearningDashboardCleanupDelayInMinutes($presetsData->getData(LearningDashboard::GROUP_NAME, LearningDashboard::CLEANUP_DELAY)); - $createParams->setLockSettingsDisableCam($presetData['Lock Settings'] ? ($presetData['Lock Settings']['webcams'] ? true : false) : false); - $createParams->setLockSettingsDisableMic($presetData['Lock Settings'] ? ($presetData['Lock Settings']['microphones'] ? true : false) : false); - $createParams->setLockSettingsDisablePrivateChat($presetData['Lock Settings'] ? ($presetData['Lock Settings']['private_chat'] ? true : false) : false); - $createParams->setLockSettingsDisablePublicChat($presetData['Lock Settings'] ? ($presetData['Lock Settings']['public_chat'] ? true : false) : false); - $createParams->setLockSettingsDisableNote($presetData['Lock Settings'] ? ($presetData['Lock Settings']['shared_notes'] ? true : false) : false); - $createParams->setLockSettingsLockedLayout($presetData['Lock Settings'] ? ($presetData['Lock Settings']['layout'] ? true : false) : false); + $createParams->setLockSettingsDisableCam($presetsData->getData(LockSettings::GROUP_NAME, LockSettings::WEBCAMS)); + $createParams->setLockSettingsDisableMic($presetsData->getData(LockSettings::GROUP_NAME, LockSettings::MICROPHONES)); + $createParams->setLockSettingsDisablePrivateChat($presetsData->getData(LockSettings::GROUP_NAME, LockSettings::PRIVATE_CHAT)); + $createParams->setLockSettingsDisablePublicChat($presetsData->getData(LockSettings::GROUP_NAME, LockSettings::PUBLIC_CHAT)); + $createParams->setLockSettingsDisableNote($presetsData->getData(LockSettings::GROUP_NAME, LockSettings::SHARED_NOTES)); + $createParams->setLockSettingsLockedLayout($presetsData->getData(LockSettings::GROUP_NAME, LockSettings::LAYOUT)); - $createParams->setPreUploadedPresentationOverrideDefault($presetData['presentation'] ? ($presetData['presentation']['pre_upload'] ? true : false) : false); + // $createParams->setPreUploadedPresentationOverrideDefault($presetsData->getData(Presentation::GROUP_NAME, Presentation::PRE_UPLOAD)); - $createParams->setAutoStartRecording($presetData['Recording'] ? ($presetData['Recording']['auto_start'] ? true : false) : false); - $createParams->setAllowStartStopRecording($presetData['Recording'] ? ($presetData['Recording']['allow_start_stop'] ? true : false) : false); - $createParams->setRecord($presetData['Recording'] ? ($presetData['Recording']['configurable'] ? true : false) : null); + $createParams->setAutoStartRecording($presetsData->getData(Recording::GROUP_NAME, Recording::AUTO_START)); + $createParams->setAllowStartStopRecording($presetsData->getData(Recording::GROUP_NAME, Recording::ALLOW_START_STOP)); + $createParams->setRecord($presetsData->getData(Recording::GROUP_NAME, Recording::RECORD)); // Screenshare:configurable // UserExperience: keyboard_shortcuts,ask_for_feedback - $createParams->setWebcamsOnlyForModerator($presetData['Webcams'] ? ($presetData['Webcams']['visible_for_moderator_only'] ? true : false) : false); - $createParams->setAllowModsToEjectCameras($presetData['Webcams'] ? ($presetData['Webcams']['moderator_allowed_camera_eject'] ? true : false) : false); + $createParams->setWebcamsOnlyForModerator($presetsData->getData(Webcams::GROUP_NAME, Webcams::VISIBLE_FOR_MODERATOR_ONLY)); + // $createParams->setAllowModsToEjectCameras($presetsData->getData(Webcams::GROUP_NAME, Webcams::MODERATOR_ALLOWED_CAMERA_EJECT)); // configurable,auto_share,skip_preview // Whiteboard:multi_user_pen_only,presenter_tools,multi_user_tools - // Zcaleright: poolname + // Zcaleright: poolname*/ return $createParams; } public function toJoinParameters($preset, $joinParams) { - $presetData = $this->preparePresetData($preset); - $joinParams->setRedirect($presetData['Audio'] ? ($presetData['Audio']['auto_join'] ? true : false) : false); + $presetsData = new PresetData(); + $preparePresetData = $this->preparePresetData($preset); + + // Set the preset data + $presetsData->setData(Audio::GROUP_NAME, Audio::AUTO_JOIN, $preparePresetData[Audio::GROUP_NAME][Audio::AUTO_JOIN]); + $presetsData->setData(Audio::GROUP_NAME, Audio::LISTEN_ONLY_ENABLED, $preparePresetData[Audio::GROUP_NAME][Audio::LISTEN_ONLY_ENABLED]); + $presetsData->setData(Audio::GROUP_NAME, Audio::SKIP_ECHO_TEST, $preparePresetData[Audio::GROUP_NAME][Audio::SKIP_ECHO_TEST]); + + $presetsData->setData(Layout::GROUP_NAME, Layout::PRESENTATION, $preparePresetData[Layout::GROUP_NAME][Layout::PRESENTATION]); + $presetsData->setData(Layout::GROUP_NAME, Layout::PARTICIPANTS, $preparePresetData[Layout::GROUP_NAME][Layout::PARTICIPANTS]); + $presetsData->setData(Layout::GROUP_NAME, Layout::CHAT, $preparePresetData[Layout::GROUP_NAME][Layout::CHAT]); + $presetsData->setData(Layout::GROUP_NAME, Layout::NAVIGATION_BAR, $preparePresetData[Layout::GROUP_NAME][Layout::NAVIGATION_BAR]); + $presetsData->setData(Layout::GROUP_NAME, Layout::ACTIONS_BAR, $preparePresetData[Layout::GROUP_NAME][Layout::ACTIONS_BAR]); + + $joinParams->addUserData('bbb_listen_only_mode', !$presetsData->getData(Audio::GROUP_NAME, Audio::AUTO_JOIN)); + $joinParams->addUserData('bbb_force_listen_only', $presetsData->getData(Audio::GROUP_NAME, Audio::LISTEN_ONLY_ENABLED)); + + $joinParams->addUserData('bbb_skip_check_audio', $presetsData->getData(Audio::GROUP_NAME, Audio::SKIP_ECHO_TEST) || $presetsData->getData(Audio::GROUP_NAME, Audio::AUTO_JOIN)); + + $joinParams->addUserData('bbb_hide_presentation_on_join', !$presetsData->getData(Layout::GROUP_NAME, Layout::PRESENTATION)); + $joinParams->addUserData('bbb_show_participants_on_login', $presetsData->getData(Layout::GROUP_NAME, Layout::PARTICIPANTS)); + $joinParams->addUserData('bbb_show_public_chat_on_login', $presetsData->getData(Layout::GROUP_NAME, Layout::CHAT)); + $joinParams->addUserData('bbb_hide_nav_bar', !$presetsData->getData(Layout::GROUP_NAME, Layout::NAVIGATION_BAR)); + $joinParams->addUserData('bbb_hide_actions_bar', !$presetsData->getData(Layout::GROUP_NAME, Layout::ACTIONS_BAR)); + + $joinParams->setRedirect(false); return $joinParams; } diff --git a/bbbeasy-backend/composer.lock b/bbbeasy-backend/composer.lock index 816fca84..a612c9af 100644 --- a/bbbeasy-backend/composer.lock +++ b/bbbeasy-backend/composer.lock @@ -48,12 +48,12 @@ "source": { "type": "git", "url": "https://github.com/bigbluebutton/bigbluebutton-api-php.git", - "reference": "8a68b2e72cbcf2a194f90b44c28faf7e6911629f" + "reference": "4d731c27cc34252f0a39c768c99415862ebb5329" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bigbluebutton/bigbluebutton-api-php/zipball/8a68b2e72cbcf2a194f90b44c28faf7e6911629f", - "reference": "8a68b2e72cbcf2a194f90b44c28faf7e6911629f", + "url": "https://api.github.com/repos/bigbluebutton/bigbluebutton-api-php/zipball/4d731c27cc34252f0a39c768c99415862ebb5329", + "reference": "4d731c27cc34252f0a39c768c99415862ebb5329", "shasum": "" }, "require": { @@ -103,11 +103,11 @@ "issues": "https://github.com/bigbluebutton/bigbluebutton-api-php/issues", "source": "https://github.com/bigbluebutton/bigbluebutton-api-php/tree/master" }, - "time": "2023-05-24T18:19:49+00:00" + "time": "2023-07-05T09:46:40+00:00" }, { "name": "cakephp/core", - "version": "4.4.14", + "version": "4.4.15", "source": { "type": "git", "url": "https://github.com/cakephp/core.git", @@ -167,7 +167,7 @@ }, { "name": "cakephp/database", - "version": "4.4.14", + "version": "4.4.15", "source": { "type": "git", "url": "https://github.com/cakephp/database.git", @@ -223,7 +223,7 @@ }, { "name": "cakephp/datasource", - "version": "4.4.14", + "version": "4.4.15", "source": { "type": "git", "url": "https://github.com/cakephp/datasource.git", @@ -281,7 +281,7 @@ }, { "name": "cakephp/utility", - "version": "4.4.14", + "version": "4.4.15", "source": { "type": "git", "url": "https://github.com/cakephp/utility.git", @@ -340,16 +340,16 @@ }, { "name": "haydenpierce/class-finder", - "version": "0.5.2", + "version": "0.5.3", "source": { "type": "git", "url": "git@gitlab.com:hpierce1102/ClassFinder.git", - "reference": "04496c25657923afe928483d3a18c1b80ea6438b" + "reference": "40703445c18784edcc6411703e7c3869af11ec8c" }, "dist": { "type": "zip", - "url": "https://gitlab.com/api/v4/projects/hpierce1102%2FClassFinder/repository/archive.zip?sha=04496c25657923afe928483d3a18c1b80ea6438b", - "reference": "04496c25657923afe928483d3a18c1b80ea6438b", + "url": "https://gitlab.com/api/v4/projects/hpierce1102%2FClassFinder/repository/archive.zip?sha=40703445c18784edcc6411703e7c3869af11ec8c", + "reference": "40703445c18784edcc6411703e7c3869af11ec8c", "shasum": "" }, "require": { @@ -378,7 +378,7 @@ } ], "description": "A library that can provide of a list of classes in a given namespace", - "time": "2023-05-01T21:31:20+00:00" + "time": "2023-06-18T17:43:01+00:00" }, { "name": "ikkez/f3-cortex", @@ -419,7 +419,7 @@ ], "support": { "issues": "https://github.com/ikkez/f3-cortex/issues", - "source": "https://github.com/ikkez/f3-cortex/tree/master" + "source": "https://github.com/ikkez/f3-cortex/tree/v1.7.6" }, "time": "2023-01-23T22:28:35+00:00" }, @@ -733,16 +733,16 @@ }, { "name": "monolog/monolog", - "version": "3.3.1", + "version": "3.4.0", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "9b5daeaffce5b926cac47923798bba91059e60e2" + "reference": "e2392369686d420ca32df3803de28b5d6f76867d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/9b5daeaffce5b926cac47923798bba91059e60e2", - "reference": "9b5daeaffce5b926cac47923798bba91059e60e2", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/e2392369686d420ca32df3803de28b5d6f76867d", + "reference": "e2392369686d420ca32df3803de28b5d6f76867d", "shasum": "" }, "require": { @@ -757,7 +757,7 @@ "doctrine/couchdb": "~1.0@dev", "elasticsearch/elasticsearch": "^7 || ^8", "ext-json": "*", - "graylog2/gelf-php": "^1.4.2 || ^2@dev", + "graylog2/gelf-php": "^1.4.2 || ^2.0", "guzzlehttp/guzzle": "^7.4.5", "guzzlehttp/psr7": "^2.2", "mongodb/mongodb": "^1.8", @@ -765,7 +765,7 @@ "phpstan/phpstan": "^1.9", "phpstan/phpstan-deprecation-rules": "^1.0", "phpstan/phpstan-strict-rules": "^1.4", - "phpunit/phpunit": "^9.5.26", + "phpunit/phpunit": "^10.1", "predis/predis": "^1.1 || ^2", "ruflin/elastica": "^7", "symfony/mailer": "^5.4 || ^6", @@ -818,7 +818,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.3.1" + "source": "https://github.com/Seldaek/monolog/tree/3.4.0" }, "funding": [ { @@ -830,7 +830,7 @@ "type": "tidelift" } ], - "time": "2023-02-06T13:46:10+00:00" + "time": "2023-06-21T08:46:11+00:00" }, { "name": "nette/utils", @@ -921,16 +921,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.15.5", + "version": "v4.16.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e" + "reference": "19526a33fb561ef417e822e85f08a00db4059c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/11e2663a5bc9db5d714eedb4277ee300403b4a9e", - "reference": "11e2663a5bc9db5d714eedb4277ee300403b4a9e", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17", "shasum": "" }, "require": { @@ -971,22 +971,22 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.5" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" }, - "time": "2023-05-19T20:20:00+00:00" + "time": "2023-06-25T14:52:30+00:00" }, { "name": "phpstan/phpstan", - "version": "1.10.18", + "version": "1.10.25", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "52b6416c579663eebdd2f1d97df21971daf3b43f" + "reference": "578f4e70d117f9a90699324c555922800ac38d8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/52b6416c579663eebdd2f1d97df21971daf3b43f", - "reference": "52b6416c579663eebdd2f1d97df21971daf3b43f", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/578f4e70d117f9a90699324c555922800ac38d8c", + "reference": "578f4e70d117f9a90699324c555922800ac38d8c", "shasum": "" }, "require": { @@ -1035,7 +1035,7 @@ "type": "tidelift" } ], - "time": "2023-06-07T22:00:43+00:00" + "time": "2023-07-06T12:11:37+00:00" }, { "name": "psr/container", @@ -1952,16 +1952,16 @@ }, { "name": "symfony/filesystem", - "version": "v6.3.0", + "version": "v6.3.1", "source": { "type": "git", "url": "https://github.com/symfony/filesystem.git", - "reference": "97b698e1d77d356304def77a8d0cd73090b359ea" + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/filesystem/zipball/97b698e1d77d356304def77a8d0cd73090b359ea", - "reference": "97b698e1d77d356304def77a8d0cd73090b359ea", + "url": "https://api.github.com/repos/symfony/filesystem/zipball/edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", + "reference": "edd36776956f2a6fcf577edb5b05eb0e3bdc52ae", "shasum": "" }, "require": { @@ -1995,7 +1995,7 @@ "description": "Provides basic utilities for the filesystem", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/filesystem/tree/v6.3.0" + "source": "https://github.com/symfony/filesystem/tree/v6.3.1" }, "funding": [ { @@ -2011,7 +2011,7 @@ "type": "tidelift" } ], - "time": "2023-05-30T17:12:32+00:00" + "time": "2023-06-01T08:30:39+00:00" }, { "name": "symfony/options-resolver", @@ -3455,16 +3455,16 @@ }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.17.0", + "version": "v3.22.0", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "3f0ed862f22386c55a767461ef5083bddceeed79" + "reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/3f0ed862f22386c55a767461ef5083bddceeed79", - "reference": "3f0ed862f22386c55a767461ef5083bddceeed79", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/92b019f6c8d79aa26349d0db7671d37440dc0ff3", + "reference": "92b019f6c8d79aa26349d0db7671d37440dc0ff3", "shasum": "" }, "require": { @@ -3488,6 +3488,7 @@ "symfony/stopwatch": "^5.4 || ^6.0" }, "require-dev": { + "facile-it/paraunit": "^1.3 || ^2.0", "justinrainbow/json-schema": "^5.2", "keradus/cli-executor": "^2.0", "mikey179/vfsstream": "^1.6.11", @@ -3539,7 +3540,7 @@ ], "support": { "issues": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/issues", - "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.17.0" + "source": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/tree/v3.22.0" }, "funding": [ { @@ -3547,7 +3548,7 @@ "type": "github" } ], - "time": "2023-05-22T19:59:32+00:00" + "time": "2023-07-16T23:08:06+00:00" }, { "name": "gabrielelana/byte-units", @@ -3662,16 +3663,16 @@ }, { "name": "kint-php/kint", - "version": "5.0.5", + "version": "5.0.7", "source": { "type": "git", "url": "https://github.com/kint-php/kint.git", - "reference": "1033fc4a5075e15b9b46be20c246069ab44bc243" + "reference": "a700653a77250b122920799b10c94e904c9b78c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kint-php/kint/zipball/1033fc4a5075e15b9b46be20c246069ab44bc243", - "reference": "1033fc4a5075e15b9b46be20c246069ab44bc243", + "url": "https://api.github.com/repos/kint-php/kint/zipball/a700653a77250b122920799b10c94e904c9b78c7", + "reference": "a700653a77250b122920799b10c94e904c9b78c7", "shasum": "" }, "require": { @@ -3721,9 +3722,9 @@ ], "support": { "issues": "https://github.com/kint-php/kint/issues", - "source": "https://github.com/kint-php/kint/tree/5.0.5" + "source": "https://github.com/kint-php/kint/tree/5.0.7" }, - "time": "2023-03-08T14:50:41+00:00" + "time": "2023-06-26T19:25:00+00:00" }, { "name": "phpmetrics/phpmetrics", @@ -4107,19 +4108,20 @@ "source": { "type": "git", "url": "https://github.com/Roave/SecurityAdvisories.git", - "reference": "22b763b5abdc69572b66c462cd85c2b2135f56aa" + "reference": "7521cb38a353696d8c0f8eca07527d51096f6730" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/22b763b5abdc69572b66c462cd85c2b2135f56aa", - "reference": "22b763b5abdc69572b66c462cd85c2b2135f56aa", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/7521cb38a353696d8c0f8eca07527d51096f6730", + "reference": "7521cb38a353696d8c0f8eca07527d51096f6730", "shasum": "" }, "conflict": { "3f/pygmentize": "<1.2", - "admidio/admidio": "<4.1.9", + "admidio/admidio": "<4.2.10", "adodb/adodb-php": "<=5.20.20|>=5.21,<=5.21.3", "aheinze/cockpit": "<=2.2.1", + "aimeos/aimeos-typo3": "<19.10.12|>=20,<20.10.5", "akaunting/akaunting": "<2.1.13", "akeneo/pim-community-dev": "<5.0.119|>=6,<6.0.53", "alextselegidis/easyappointments": "<1.5", @@ -4130,13 +4132,16 @@ "amphp/http-client": ">=4,<4.4", "anchorcms/anchor-cms": "<=0.12.7", "andreapollastri/cipi": "<=3.1.15", - "andrewhaine/silverstripe-form-capture": ">=0.2,<=0.2.3|>=1,<=1.0.1|>=2,<=2.2.4", + "andrewhaine/silverstripe-form-capture": ">=0.2,<=0.2.3|>=1,<1.0.2|>=2,<2.2.5", "apereo/phpcas": "<1.6", "api-platform/core": ">=2.2,<2.2.10|>=2.3,<2.3.6|>=2.6,<2.7.10|>=3,<3.0.12|>=3.1,<3.1.3", "appwrite/server-ce": "<=1.2.1", "arc/web": "<3", "area17/twill": "<1.2.5|>=2,<2.5.3", + "artesaos/seotools": "<0.17.2", "asymmetricrypt/asymmetricrypt": ">=0,<9.9.99", + "athlon1600/php-proxy": "<=5.1", + "athlon1600/php-proxy-app": "<=3", "automad/automad": "<1.8", "awesome-support/awesome-support": "<=6.0.7", "aws/aws-sdk-php": ">=3,<3.2.1", @@ -4150,8 +4155,8 @@ "barzahlen/barzahlen-php": "<2.0.1", "baserproject/basercms": "<4.7.5", "bassjobsen/bootstrap-3-typeahead": ">4.0.2", - "bigfork/silverstripe-form-capture": ">=3,<=3.1", - "billz/raspap-webgui": "<=2.6.6", + "bigfork/silverstripe-form-capture": ">=3,<3.1.1", + "billz/raspap-webgui": "<2.8.9", "bk2k/bootstrap-package": ">=7.1,<7.1.2|>=8,<8.0.8|>=9,<9.0.4|>=9.1,<9.1.3|>=10,<10.0.10|>=11,<11.0.3", "bmarshall511/wordpress_zero_spam": "<5.2.13", "bolt/bolt": "<3.7.2", @@ -4168,6 +4173,7 @@ "cakephp/cakephp": "<3.10.3|>=4,<4.0.10|>=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10|= 1.3.7|>=4.1,<4.1.4", "cakephp/database": ">=4.2,<4.2.12|>=4.3,<4.3.11|>=4.4,<4.4.10", "cardgate/magento2": "<2.0.33", + "cardgate/woocommerce": "<=3.1.15", "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", "cartalyst/sentry": "<=2.1.6", "catfan/medoo": "<1.7.5", @@ -4188,7 +4194,8 @@ "contao/core-bundle": "<4.9.40|>=4.10,<4.11.7|>=4.13,<4.13.21|>=5.1,<5.1.4|= 4.10.0", "contao/listing-bundle": ">=4,<4.4.8", "contao/managed-edition": "<=1.5", - "craftcms/cms": ">= 4.0.0-RC1, < 4.4.12|>= 4.0.0-RC1, <= 4.4.5|>= 4.0.0-RC1, <= 4.4.6|<=3.8.5|>=4,<4.4.6|>= 4.0.0-RC1, < 4.4.6|>= 4.0.0-RC1, < 4.3.7|>= 4.0.0-RC1, < 4.2.1", + "cosenary/instagram": "<=2.3", + "craftcms/cms": "<=4.4.9|>= 4.0.0-RC1, < 4.4.12|>= 4.0.0-RC1, <= 4.4.5|>= 4.0.0-RC1, <= 4.4.6|>= 4.0.0-RC1, < 4.4.6|>= 4.0.0-RC1, < 4.3.7|>= 4.0.0-RC1, < 4.2.1", "croogo/croogo": "<3.0.7", "cuyz/valinor": "<0.12", "czproject/git-php": "<4.0.3", @@ -4199,6 +4206,7 @@ "dcat/laravel-admin": "<=2.1.3-beta", "derhansen/fe_change_pwd": "<2.0.5|>=3,<3.0.3", "derhansen/sf_event_mgt": "<4.3.1|>=5,<5.1.1", + "desperado/xml-bundle": "<=0.1.7", "directmailteam/direct-mail": "<5.2.4", "doctrine/annotations": ">=1,<1.2.7", "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2", @@ -4268,17 +4276,18 @@ "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", "friendsoftypo3/mediace": ">=7.6.2,<7.6.5", "froala/wysiwyg-editor": "<3.2.7", - "froxlor/froxlor": "<2.0.20", + "froxlor/froxlor": "<2.1", "fuel/core": "<1.8.1", - "funadmin/funadmin": "<=3.2", + "funadmin/funadmin": "<=3.2|>=3.3.2,<=3.3.3", "gaoming13/wechat-php-sdk": "<=1.10.2", "genix/cms": "<=1.1.11", - "getgrav/grav": "<1.7.34", + "getgrav/grav": "<1.7.42", "getkirby/cms": "= 3.8.0|<3.5.8.2|>=3.6,<3.6.6.2|>=3.7,<3.7.5.1", "getkirby/panel": "<2.5.14", "getkirby/starterkit": "<=3.7.0.2", "gilacms/gila": "<=1.11.4", "globalpayments/php-sdk": "<2", + "gogentooss/samlbase": "<1.2.7", "google/protobuf": "<3.15", "gos/web-socket-bundle": "<1.10.4|>=2,<2.6.1|>=3,<3.3", "gree/jose": "<2.2.1", @@ -4286,8 +4295,10 @@ "grumpydictator/firefly-iii": "<6", "guzzlehttp/guzzle": "<6.5.8|>=7,<7.4.5", "guzzlehttp/psr7": "<1.9.1|>=2,<2.4.5", + "haffner/jh_captcha": "<=2.1.3|>=3,<=3.0.2", "harvesthq/chosen": "<1.8.7", "helloxz/imgurl": "= 2.31|<=2.31", + "hhxsv5/laravel-s": "<3.7.36", "hillelcoren/invoice-ninja": "<5.3.35", "himiklab/yii2-jqgrid-widget": "<1.0.8", "hjue/justwriting": "<=1", @@ -4306,8 +4317,9 @@ "illuminate/database": "<6.20.26|>=7,<7.30.5|>=8,<8.40", "illuminate/encryption": ">=4,<=4.0.11|>=4.1,<=4.1.31|>=4.2,<=4.2.22|>=5,<=5.0.35|>=5.1,<=5.1.46|>=5.2,<=5.2.45|>=5.3,<=5.3.31|>=5.4,<=5.4.36|>=5.5,<5.5.40|>=5.6,<5.6.15", "illuminate/view": "<6.20.42|>=7,<7.30.6|>=8,<8.75", - "impresscms/impresscms": "<=1.4.3", + "impresscms/impresscms": "<=1.4.5", "in2code/femanager": "<5.5.3|>=6,<6.3.4|>=7,<7.1", + "in2code/ipandlanguageredirect": "<5.1.2", "in2code/lux": "<17.6.1|>=18,<24.0.2", "innologi/typo3-appointments": "<2.0.6", "intelliants/subrion": "<=4.2.1", @@ -4320,6 +4332,7 @@ "joomla/filesystem": "<1.6.2|>=2,<2.0.1", "joomla/filter": "<1.4.4|>=2,<2.0.1", "joomla/input": ">=2,<2.0.2", + "joomla/joomla-cms": ">=3,<3.9.12", "joomla/session": "<1.3.1", "joyqi/hyper-down": "<=2.4.27", "jsdecena/laracom": "<2.0.9", @@ -4327,8 +4340,9 @@ "kazist/phpwhois": "<=4.2.6", "kelvinmo/simplexrd": "<3.1.1", "kevinpapst/kimai2": "<1.16.7", + "khodakhah/nodcms": "<=3", "kimai/kimai": "<1.1", - "kitodo/presentation": "<3.1.2", + "kitodo/presentation": "<3.2.3|>=3.3,<3.3.4", "klaviyo/magento2-extension": ">=1,<3", "knplabs/knp-snappy": "<1.4.2", "krayin/laravel-crm": "<1.2.2", @@ -4341,10 +4355,11 @@ "laravel/framework": "<6.20.42|>=7,<7.30.6|>=8,<8.75", "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", "latte/latte": "<2.10.8", - "lavalite/cms": "<=9", + "lavalite/cms": "= 9.0.0|<=9", "lcobucci/jwt": ">=3.4,<3.4.6|>=4,<4.0.4|>=4.1,<4.1.5", "league/commonmark": "<0.18.3", "league/flysystem": "<1.1.4|>=2,<2.1.1", + "league/oauth2-server": ">=8.3.2,<8.5.3", "lexik/jwt-authentication-bundle": "<2.10.7|>=2.11,<2.11.3", "librenms/librenms": "<22.10", "liftkit/database": "<2.13.2", @@ -4354,7 +4369,7 @@ "lms/routes": "<2.1.1", "localizationteam/l10nmgr": "<7.4|>=8,<8.7|>=9,<9.2", "luyadev/yii-helpers": "<1.2.1", - "magento/community-edition": ">=2,<2.2.10|>=2.3,<2.3.3", + "magento/community-edition": "<=2.4", "magento/magento1ce": "<1.9.4.3", "magento/magento1ee": ">=1,<1.14.4.3", "magento/product-community-edition": ">=2,<2.2.10|>=2.3,<2.3.2-p.2", @@ -4370,14 +4385,15 @@ "melisplatform/melis-front": "<5.0.1", "mezzio/mezzio-swoole": "<3.7|>=4,<4.3", "mgallegos/laravel-jqgrid": "<=1.3", - "microweber/microweber": "<=1.3.4", + "microweber/microweber": "= 1.1.18|<=1.3.4", "miniorange/miniorange-saml": "<1.4.3", "mittwald/typo3_forum": "<1.2.1", "mobiledetect/mobiledetectlib": "<2.8.32", "modx/revolution": "<= 2.8.3-pl|<2.8", "mojo42/jirafeau": "<4.4", "monolog/monolog": ">=1.8,<1.12", - "moodle/moodle": "<4.2-rc.2|= 3.11", + "moodle/moodle": "<4.2-rc.2|= 3.7|= 3.9|= 3.8|= 4.2.0|= 3.11", + "movim/moxl": ">=0.8,<=0.10", "mustache/mustache": ">=2,<2.14.1", "namshi/jose": "<2.2", "neoan3-apps/template": "<1.1.1", @@ -4389,7 +4405,7 @@ "netgen/tagsbundle": ">=3.4,<3.4.11|>=4,<4.0.15", "nette/application": ">=2,<2.0.19|>=2.1,<2.1.13|>=2.2,<2.2.10|>=2.3,<2.3.14|>=2.4,<2.4.16|>=3,<3.0.6", "nette/nette": ">=2,<2.0.19|>=2.1,<2.1.13", - "nilsteampassnet/teampass": "<3.0.9", + "nilsteampassnet/teampass": "<3.0.10", "notrinos/notrinos-erp": "<=0.7", "noumo/easyii": "<=0.9", "nukeviet/nukeviet": "<4.5.2", @@ -4407,7 +4423,8 @@ "opencart/opencart": "<=3.0.3.7", "openid/php-openid": "<2.3", "openmage/magento-lts": "<19.4.22|>=20,<20.0.19", - "orchid/platform": ">=9,<9.4.4", + "opensource-workshop/connect-cms": "<1.7.2|>=2,<2.3.2", + "orchid/platform": ">=9,<9.4.4|>=14-alpha.4,<14.5", "oro/commerce": ">=4.1,<5.0.6", "oro/crm": ">=1.7,<1.7.4|>=3.1,<4.1.17|>=4.2,<4.2.7", "oro/platform": ">=1.7,<1.7.4|>=3.1,<3.1.29|>=4.1,<4.1.17|>=4.2,<4.2.8", @@ -4420,11 +4437,12 @@ "paypal/merchant-sdk-php": "<3.12", "pear/archive_tar": "<1.4.14", "pear/crypt_gpg": "<1.6.7", + "pear/pear": "<=1.10.1", "pegasus/google-for-jobs": "<1.5.1|>=2,<2.1.1", "personnummer/personnummer": "<3.0.2", "phanan/koel": "<5.1.4", "php-mod/curl": "<2.3.2", - "phpbb/phpbb": ">=3.2,<3.2.10|>=3.3,<3.3.1", + "phpbb/phpbb": "<3.2.10|>=3.3,<3.3.1", "phpfastcache/phpfastcache": "<6.1.5|>=7,<7.1.2|>=8,<8.0.7", "phpmailer/phpmailer": "<6.5", "phpmussel/phpmussel": ">=1,<1.6", @@ -4433,19 +4451,21 @@ "phpoffice/phpexcel": "<1.8", "phpoffice/phpspreadsheet": "<1.16", "phpseclib/phpseclib": "<2.0.31|>=3,<3.0.19", - "phpservermon/phpservermon": "<=3.5.2", + "phpservermon/phpservermon": "<3.6", "phpsysinfo/phpsysinfo": "<3.2.5", "phpunit/phpunit": ">=4.8.19,<4.8.28|>=5,<5.6.3", "phpwhois/phpwhois": "<=4.2.5", "phpxmlrpc/extras": "<0.6.1", "phpxmlrpc/phpxmlrpc": "<4.9.2", - "pimcore/customer-management-framework-bundle": "<3.3.10", + "pi/pi": "<=2.5", + "pimcore/admin-ui-classic-bundle": "<1.0.3", + "pimcore/customer-management-framework-bundle": "<3.4.1", "pimcore/data-hub": "<1.2.4", "pimcore/perspective-editor": "<1.5.1", - "pimcore/pimcore": "<10.5.23", + "pimcore/pimcore": "<10.5.24", "pixelfed/pixelfed": "<=0.11.4", "pocketmine/bedrock-protocol": "<8.0.2", - "pocketmine/pocketmine-mp": "<4.20.5|>=4.21,<4.21.1|< 4.18.0-ALPHA2|>= 4.0.0-BETA5, < 4.4.2", + "pocketmine/pocketmine-mp": "<4.22.3|>=5,<5.2.1|< 4.18.0-ALPHA2|>= 4.0.0-BETA5, < 4.4.2", "pressbooks/pressbooks": "<5.18", "prestashop/autoupgrade": ">=4,<4.10.1", "prestashop/blockwishlist": ">=2,<2.1.1", @@ -4467,6 +4487,7 @@ "pyrocms/pyrocms": "<=3.9.1", "rainlab/debugbar-plugin": "<3.1", "rankmath/seo-by-rank-math": "<=1.0.95", + "rap2hpoutre/laravel-log-viewer": "<0.13", "react/http": ">=0.7,<1.9", "really-simple-plugins/complianz-gdpr": "<6.4.2", "remdex/livehelperchat": "<3.99", @@ -4477,18 +4498,21 @@ "s-cart/core": "<6.9", "s-cart/s-cart": "<6.9", "sabberworm/php-css-parser": ">=1,<1.0.1|>=2,<2.0.1|>=3,<3.0.1|>=4,<4.0.1|>=5,<5.0.9|>=5.1,<5.1.3|>=5.2,<5.2.1|>=6,<6.0.2|>=7,<7.0.4|>=8,<8.0.1|>=8.1,<8.1.1|>=8.2,<8.2.1|>=8.3,<8.3.1", - "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", + "sabre/dav": "<1.7.11|>=1.8,<1.8.9", "scheb/two-factor-bundle": ">=0,<3.26|>=4,<4.11", "sensiolabs/connect": "<4.2.3", "serluck/phpwhois": "<=4.2.6", + "sfroemken/url_redirect": "<=1.2.1", + "sheng/yiicms": "<=1.2", "shopware/core": "<=6.4.20", "shopware/platform": "<=6.4.20", "shopware/production": "<=6.3.5.2", - "shopware/shopware": "<=5.7.14", + "shopware/shopware": "<=5.7.17", "shopware/storefront": "<=6.4.8.1", "shopxo/shopxo": "<2.2.6", "showdoc/showdoc": "<2.10.4", - "silverstripe/admin": "<1.12.7", + "silverstripe-australia/advancedreports": ">=1,<=2", + "silverstripe/admin": "<=3", "silverstripe/assets": ">=1,<1.11.1", "silverstripe/cms": "<4.11.3", "silverstripe/comments": ">=1.3,<1.9.99|>=2,<2.9.99|>=3,<3.1.1", @@ -4511,6 +4535,7 @@ "simplesamlphp/simplesamlphp-module-openidprovider": "<0.9", "simplito/elliptic-php": "<1.0.6", "sitegeist/fluid-components": "<3.5", + "sjbr/sr-freecap": "<=2.5.2", "slim/psr7": "<1.4.1|>=1.5,<1.5.1|>=1.6,<1.6.1", "slim/slim": "<2.6", "smarty/smarty": "<3.1.48|>=4,<4.3.1", @@ -4519,12 +4544,14 @@ "socialiteproviders/steam": "<1.1", "spatie/browsershot": "<3.57.4", "spipu/html2pdf": "<5.2.4", + "spoon/library": "<1.4.1", "spoonity/tcpdf": "<6.2.22", "squizlabs/php_codesniffer": ">=1,<2.8.1|>=3,<3.0.1", "ssddanbrown/bookstack": "<22.2.3", - "statamic/cms": "<3.2.39|>=3.3,<3.3.2", + "statamic/cms": "<4.10", "stormpath/sdk": ">=0,<9.9.99", - "studio-42/elfinder": "<2.1.59", + "studio-42/elfinder": "<2.1.62", + "subhh/libconnect": "<7.0.8|>=8,<8.1", "subrion/cms": "<=4.2.1", "sukohi/surpass": "<1", "sulu/sulu": "= 2.4.0-RC1|<1.6.44|>=2,<2.2.18|>=2.3,<2.3.8", @@ -4580,7 +4607,7 @@ "thelia/thelia": ">=2.1-beta.1,<2.1.3", "theonedemon/phpwhois": "<=4.2.5", "thinkcmf/thinkcmf": "<=5.1.7", - "thorsten/phpmyfaq": "<3.2-beta", + "thorsten/phpmyfaq": "<3.2-beta.2", "tinymce/tinymce": "<5.10.7|>=6,<6.3.1", "tinymighty/wiki-seo": "<1.2.2", "titon/framework": ">=0,<9.9.99", @@ -4588,11 +4615,12 @@ "topthink/framework": "<6.0.14", "topthink/think": "<=6.1.1", "topthink/thinkphp": "<=3.2.3", + "tpwd/ke_search": "<4.0.3|>=4.1,<4.6.6|>=5,<5.0.2", "tribalsystems/zenario": "<=9.3.57595", "truckersmp/phpwhois": "<=4.3.1", "ttskch/pagination-service-provider": "<1", "twig/twig": "<1.44.7|>=2,<2.15.3|>=3,<3.4.3", - "typo3/cms": "<2.0.5|>=3,<3.0.3|>=6.2,<6.2.30|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2", + "typo3/cms": "<2.0.5|>=3,<3.0.3|>=6.2,<=6.2.38|>=7,<7.6.32|>=8,<8.7.38|>=9,<9.5.29|>=10,<10.4.35|>=11,<11.5.23|>=12,<12.2", "typo3/cms-backend": ">=7,<=7.6.50|>=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", "typo3/cms-core": "<8.7.51|>=9,<9.5.40|>=10,<10.4.36|>=11,<11.5.23|>=12,<12.2", "typo3/cms-form": ">=8,<=8.7.39|>=9,<=9.5.24|>=10,<=10.4.13|>=11,<=11.1", @@ -4612,18 +4640,21 @@ "vova07/yii2-fileapi-widget": "<0.1.9", "vrana/adminer": "<4.8.1", "wallabag/tcpdf": "<6.2.22", - "wallabag/wallabag": "<2.5.4", + "wallabag/wallabag": "<=2.5.4", "wanglelecc/laracms": "<=1.0.3", "web-auth/webauthn-framework": ">=3.3,<3.3.4", "webbuilders-group/silverstripe-kapost-bridge": "<0.4", "webcoast/deferred-image-processing": "<1.0.2", + "webklex/laravel-imap": "<5.3", + "webklex/php-imap": "<5.3", "webpa/webpa": "<3.1.2", + "wikibase/wikibase": "<=1.39.3", "wikimedia/parsoid": "<0.12.2", "willdurand/js-translation-bundle": "<2.1.1", - "wintercms/winter": "<1.0.475|>=1.1,<1.1.10|>=1.2,<1.2.1", + "wintercms/winter": "<1.2.3", "woocommerce/woocommerce": "<6.6", "wp-cli/wp-cli": "<2.5", - "wp-graphql/wp-graphql": "<0.3.5", + "wp-graphql/wp-graphql": "<=1.14.5", "wpanel/wpanel4-cms": "<=4.3.1", "wpcloud/wp-stateless": "<3.2", "wwbn/avideo": "<=12.4", @@ -4644,6 +4675,7 @@ "yikesinc/yikes-inc-easy-mailchimp-extender": "<6.8.6", "yoast-seo-for-typo3/yoast_seo": "<7.2.3", "yourls/yourls": "<=1.8.2", + "zencart/zencart": "<1.5.8", "zendesk/zendesk_api_client_php": "<2.2.11", "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", @@ -4666,6 +4698,7 @@ "zendframework/zendframework1": "<1.12.20", "zendframework/zendopenid": ">=2,<2.0.2", "zendframework/zendxml": ">=1,<1.0.1", + "zenstruck/collection": "<0.2.1", "zetacomponents/mail": "<1.8.2", "zf-commons/zfc-user": "<1.2.2", "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3", @@ -4708,7 +4741,7 @@ "type": "tidelift" } ], - "time": "2023-06-09T23:04:09+00:00" + "time": "2023-07-18T20:04:29+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", diff --git a/bbbeasy-backend/db/migrations/20220720114045_create_labels_table.php b/bbbeasy-backend/db/migrations/20220720114045_create_labels_table.php index 8831897d..b80cf0a5 100644 --- a/bbbeasy-backend/db/migrations/20220720114045_create_labels_table.php +++ b/bbbeasy-backend/db/migrations/20220720114045_create_labels_table.php @@ -30,7 +30,7 @@ public function up(): void $table ->addColumn('name', 'string', ['limit' => 32, 'null' => false]) ->addColumn('description', 'text', ['null' => true]) - ->addColumn('color', 'string', ['limit' => 7, 'default' => '#fbbc0b']) + ->addColumn('color', 'string', ['limit' => 10, 'default' => '#fbbc0b']) ->addColumn('created_on', 'datetime', ['default' => '0001-01-01 00:00:00', 'timezone' => true]) ->addColumn('updated_on', 'datetime', ['default' => '0001-01-01 00:00:00', 'timezone' => true]) ->save() diff --git a/bbbeasy-backend/tests/src/Models/UserTest.php b/bbbeasy-backend/tests/src/Models/UserTest.php index c1d8f74b..324cbcbf 100644 --- a/bbbeasy-backend/tests/src/Models/UserTest.php +++ b/bbbeasy-backend/tests/src/Models/UserTest.php @@ -220,28 +220,28 @@ public function testUserExists() return $test->results(); } - /** - * @return array - */ - public function testGetAllUsers() - { - $test = $this->newTest(); - $preset = new Preset(); - $user = new User(); - $preset->erase(['']); // Cleaning the table for test. - $user->erase(['']); // Cleaning the table for test. - $user1 = UserFaker::create(); - $user2 = UserFaker::create(); - $user3 = UserFaker::create(); - $data = [$user1->getUserInfos(), $user2->getUserInfos(), $user3->getUserInfos()]; - - $test->expect($data === $user->getAllUsers(), 'getAllUsers() returned all users informations'); - $test->expect(3 === $user->countActiveUsers(), 'countActiveUsers() returned number of active users = ' . \count($data)); - $test->expect(2 === $user->countActiveUsers([$user1->id, $user2->id]), 'countActiveUsers([' . $user1->id . ',' . $user2->id . ']) returned number of active users in given users array'); - $test->expect(1 === $user->countActiveUsers([$user1->id]), 'countActiveUsers([' . $user1->id . ']) returned number of active users in given users array'); - - return $test->results(); - } + /** + * @return array + */ + public function testGetAllUsers() + { + $test = $this->newTest(); + $preset = new Preset(); + $user = new User(); + $preset->erase(['']); // Cleaning the table for test. + $user->erase(['']); // Cleaning the table for test. + $user1 = UserFaker::create(); + $user2 = UserFaker::create(); + $user3 = UserFaker::create(); + $data = [$user1->getUserInfos(), $user2->getUserInfos(), $user3->getUserInfos()]; + + $test->expect($data === $user->getAllUsers(), 'getAllUsers() returned all users informations'); + $test->expect(3 === $user->countActiveUsers(), 'countActiveUsers() returned number of active users = ' . \count($data)); + $test->expect(2 === $user->countActiveUsers([$user1->id, $user2->id]), 'countActiveUsers([' . $user1->id . ',' . $user2->id . ']) returned number of active users in given users array'); + $test->expect(1 === $user->countActiveUsers([$user1->id]), 'countActiveUsers([' . $user1->id . ']) returned number of active users in given users array'); + + return $test->results(); + } /** * @return array diff --git a/bbbeasy-docs/yarn.lock b/bbbeasy-docs/yarn.lock index 14e7293d..96e17b7d 100644 --- a/bbbeasy-docs/yarn.lock +++ b/bbbeasy-docs/yarn.lock @@ -9360,11 +9360,11 @@ __metadata: linkType: hard "semver@npm:^5.4.1": - version: 5.7.1 - resolution: "semver@npm:5.7.1" + version: 5.7.2 + resolution: "semver@npm:5.7.2" bin: - semver: ./bin/semver - checksum: 57fd0acfd0bac382ee87cd52cd0aaa5af086a7dc8d60379dfe65fea491fb2489b6016400813930ecd61fd0952dae75c115287a1b16c234b1550887117744dfaf + semver: bin/semver + checksum: fb4ab5e0dd1c22ce0c937ea390b4a822147a9c53dbd2a9a0132f12fe382902beef4fbf12cf51bb955248d8d15874ce8cd89532569756384f994309825f10b686 languageName: node linkType: hard @@ -10145,11 +10145,11 @@ __metadata: "typescript@patch:typescript@^4.9.5#~builtin": version: 4.9.5 - resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=289587" + resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 1f8f3b6aaea19f0f67cba79057674ba580438a7db55057eb89cc06950483c5d632115c14077f6663ea76fd09fce3c190e6414bb98582ec80aa5a4eaf345d5b68 + checksum: ab417a2f398380c90a6cf5a5f74badd17866adf57f1165617d6a551f059c3ba0a3e4da0d147b3ac5681db9ac76a303c5876394b13b3de75fdd5b1eaa06181c9d languageName: node linkType: hard diff --git a/bbbeasy-frontend/package.json b/bbbeasy-frontend/package.json index 51a07b17..7d069715 100644 --- a/bbbeasy-frontend/package.json +++ b/bbbeasy-frontend/package.json @@ -22,7 +22,7 @@ "craco-less": "^2.0.0", "craco-plugin-react-hot-reload": "^0.1.0", "dayjs": "^1.11.8", - "dotenv": "^16.1.4", + "dotenv": "^16.3.1", "dotenv-cra": "^3.0.3", "eslint-plugin-react-hooks": "^4.6.0", "global": "^4.4.0", @@ -37,7 +37,7 @@ "pino-transmit-http": "^1.0.1", "pm2": "^5.3.0", "rc-select": "^14.5.2", - "rc-util": "^5.33.0", + "rc-util": "^5.33.1", "react": "^17.0.2", "react-color": "^2.19.3", "react-copy-to-clipboard": "^5.1.0", @@ -48,7 +48,7 @@ "react-i18next": "^12.3.1", "react-images-uploading": "^3.1.7", "react-intl": "^6.4.4", - "react-router-dom": "^6.12.1", + "react-router-dom": "^6.13.0", "react-scripts": "^5.0.1", "react-share": "^4.4.1", "reload": "^3.2.1", @@ -128,5 +128,5 @@ "source-map-explorer": "^2.5.3", "ts-loader": "^9.4.3" }, - "packageManager": "yarn@3.6.0" + "packageManager": "yarn@3.6.1" } diff --git a/bbbeasy-frontend/src/App-installer.css b/bbbeasy-frontend/src/App-installer.css index 2e0cdeef..8b74eecf 100644 --- a/bbbeasy-frontend/src/App-installer.css +++ b/bbbeasy-frontend/src/App-installer.css @@ -355,6 +355,13 @@ body.rtl { border-radius: 6px; padding: 4px 11px; } + +.input-status-presets { + background: transparent; + border: transparent; + width: 50px; +} + .site-footer button { padding: 0 5px !important; } @@ -418,6 +425,7 @@ body.rtl { } .btn-installer { margin-top: 20px; + margin-right: auto; width: 50%; font-weight: bold; @@ -427,7 +435,7 @@ body.rtl { width: 80% !important; } .button-container .ant-row:not(.ant-row-rtl) .prev { - margin-right: 20px; + margin-right: 20px !important; } .button-container .ant-row.ant-row-rtl .prev { margin-left: 20px; @@ -583,7 +591,7 @@ body.rtl { .white-space { white-space: pre-wrap; text-align: left; - width: 300px; + width: 260px; } .presets-modal .ant-modal-content { margin: 0 30px; diff --git a/bbbeasy-frontend/src/App-webapp.css b/bbbeasy-frontend/src/App-webapp.css index b5902a14..18a4c9f3 100644 --- a/bbbeasy-frontend/src/App-webapp.css +++ b/bbbeasy-frontend/src/App-webapp.css @@ -507,6 +507,9 @@ fieldset { color: #fbbc0b !important; background-color: transparent !important; } +.profil-btn .ant-btn-icon { + margin-right: auto !important; +} .profil-btn-dropdown .ant-dropdown-menu-item-icon { min-width: 25px !important; font-size: 13px !important; @@ -523,6 +526,9 @@ fieldset { .warning-btn-dropdown { max-width: 330px !important; } +.dropdownWarning { + display: none !important; +} .search-modal .ant-modal-header { background-color: var(--bbbeasy-darken-gray) !important; height: 56px; @@ -1252,7 +1258,7 @@ fieldset { .white-space { white-space: pre-wrap; text-align: left; - width: 300px; + width: 260px; } .presets-modal .ant-modal-content { margin: 0 30px; @@ -1319,7 +1325,8 @@ fieldset { } .profile-form .bbbeasy-btn { clip-path: polygon(48% 0, 52% 0, 95% 25%, 95% 75%, 52% 100%, 48% 100%, 5% 75%, 5% 25%); - background-color: #fbbc0b; + /* background-color: #fbbc0b;*/ + color: black; } .profile-form .custom-badge-bg { @@ -1512,6 +1519,12 @@ fieldset { width: 90px; } +.input-status-presets { + background: transparent; + border: transparent; + width: 50px; +} + .space-color-picker-add-label { position: relative; display: inline-flex; @@ -1553,3 +1566,14 @@ fieldset { background-color: #d4d4d4 !important; cursor: not-allowed; } +.edit-room-form { + display: block !important; +} +.room-title { + max-width: 150px !important; + overflow: hidden; + text-overflow: ellipsis; +} +.ant-table-cell { + max-width: 150px !important; +} diff --git a/bbbeasy-frontend/src/components/GuestPolicy.tsx b/bbbeasy-frontend/src/components/GuestPolicy.tsx new file mode 100644 index 00000000..f1fb4cf5 --- /dev/null +++ b/bbbeasy-frontend/src/components/GuestPolicy.tsx @@ -0,0 +1,25 @@ +/** + * BBBEasy open source platform - https://riadvice.tn/ + * + * Copyright (c) 2022-2023 RIADVICE SUARL and by respective authors (see below). + * + * This program is free software; you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 3.0 of the License, or (at your option) any later + * version. + * + * BBBEasy is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along + * with BBBEasy; if not, see . + */ + +import { GuestPolicyType } from '../types/GuestPolicyType'; + +export const GuestPolicy: GuestPolicyType[] = [ + { name: 'Ask moderator', key: 'askModerator', value: 'ASK_MODERATOR' }, + { name: 'Always accept', key: 'alwaysAccept', value: 'ALWAYS_ACCEPT' }, + { name: 'Always deny', key: 'alwaysDeny', value: 'ALWAYS_DENY' }, +]; diff --git a/bbbeasy-frontend/src/components/Install.tsx b/bbbeasy-frontend/src/components/Install.tsx index 7ea485fe..b43c6c37 100644 --- a/bbbeasy-frontend/src/components/Install.tsx +++ b/bbbeasy-frontend/src/components/Install.tsx @@ -30,6 +30,7 @@ import LoadingSpinner from './LoadingSpinner'; import { Step1Form } from './Step1Form'; import { Step2Form } from './Step2Form'; import { Step3Form } from './Step3Form'; + import { UserPasswordForm } from './UserPasswordForm'; import { UploadFile } from 'antd/lib/upload/interface'; @@ -39,6 +40,7 @@ import { PresetType } from '../types/PresetType'; import axios from 'axios'; import { apiRoutes } from '../routing/backend-config'; +import usersService from 'services/users.service'; const { Step } = Steps; @@ -159,7 +161,7 @@ const Install = () => { localStorage.removeItem('user'); InstallService.install() - .then((response) => { + .then(() => { setLocked(false); getSettings(); @@ -228,8 +230,17 @@ const Install = () => { const onFinish = () => { const stepsData: formType = stepForm.getFieldsValue(true); - - if (activeStep < steps.length - 1) { + if (activeStep == 0) { + setMessage(''); + usersService + .collect_users(stepsData) + .then(() => { + next(); + }) + .catch((error) => { + setMessage(error.response.data.message); + }); + } else if (activeStep < steps.length - 1) { next(); } else { //edit file @@ -329,7 +340,11 @@ const Install = () => { } > {activeStep > 0 && ( - )} @@ -338,7 +353,7 @@ const Install = () => { type="primary" className="btn-installer" htmlType="submit" - style={activeStep == 0 ? { 'width': '100%' } : { 'width': '50%' }} + style={activeStep == 0 ? { 'width': '100%' } : { 'width': '47%' }} > {steps[activeStep].button} diff --git a/bbbeasy-frontend/src/components/Labels.tsx b/bbbeasy-frontend/src/components/Labels.tsx index 49e9fa53..c7d3e8ed 100644 --- a/bbbeasy-frontend/src/components/Labels.tsx +++ b/bbbeasy-frontend/src/components/Labels.tsx @@ -60,7 +60,6 @@ const Labels = () => { const [errorsEdit, setErrorsEdit] = React.useState({}); const [cancelVisibility, setCancelVisibility] = React.useState(false); const [isModalVisible, setIsModalVisible] = React.useState(false); - const [color, setColor] = React.useState(''); const { token } = theme.useToken(); const getLabels = () => { setLoading(true); diff --git a/bbbeasy-frontend/src/components/LanguagesBBB.tsx b/bbbeasy-frontend/src/components/LanguagesBBB.tsx new file mode 100644 index 00000000..c80202b7 --- /dev/null +++ b/bbbeasy-frontend/src/components/LanguagesBBB.tsx @@ -0,0 +1,84 @@ +/** + * BBBEasy open source platform - https://riadvice.tn/ + * + * Copyright (c) 2022-2023 RIADVICE SUARL and by respective authors (see below). + * + * This program is free software; you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 3.0 of the License, or (at your option) any later + * version. + * + * BBBEasy is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along + * with BBBEasy; if not, see . + */ + +import { LanguageType } from '../types/LanguageType'; + +export const LanguagesBBB: LanguageType[] = [ + { name: 'Afrikaans', key: 'af', value: 'Afrikaans' }, + { name: 'Arabic', key: 'ar', value: 'Arabic' }, + { name: 'Azerbaijani', key: 'az', value: 'Azerbaijani' }, + { name: 'Bulgarian', key: 'bg-BG', value: 'Bulgarian' }, + { name: 'Bengali', key: 'bn', value: 'Bengali' }, + { name: 'Catalan', key: 'ca', value: 'Catalan' }, + { name: 'Czech', key: 'cs-CZ', value: 'Czech' }, + { name: 'Danish', key: 'da', value: 'Danish' }, + { name: 'German', key: 'de', value: 'German' }, + { name: 'Dhivehi', key: 'dv', value: 'Dhivehi' }, + { name: 'Greek (Greece)', key: 'el-GR', value: 'Greek (Greece)' }, + { name: 'English', key: 'en', value: 'English' }, + { name: 'Esperanto', key: 'eo', value: 'Esperanto' }, + { name: 'Spanish', key: 'es', value: 'Spanish' }, + { name: 'Spanish (Latin America)', key: 'es-419', value: 'Spanish (Latin America)' }, + { name: 'Spanish (Spain)', key: 'es-ES', value: 'Spanish (Spain)' }, + { name: 'Spanish (Mexico)', key: 'es-MX', value: 'Spanish (Mexico)' }, + { name: 'Estonian', key: 'et', value: 'Estonian' }, + { name: 'Basque', key: 'eu', value: 'Basque' }, + { name: 'Persian', key: 'fa-IR', value: 'Persian' }, + { name: 'Finnish', key: 'fi', value: 'Finnish' }, + { name: 'French', key: 'fr', value: 'French' }, + { name: 'Galician', key: 'gl', value: 'Galician' }, + { name: 'Hebrew', key: 'he', value: 'Hebrew' }, + { name: 'Hindi', key: 'hi-IN', value: 'Hindi' }, + { name: 'Croatian', key: 'hr', value: 'Croatian' }, + { name: 'Hungarian', key: 'hu-HU', value: 'Hungarian' }, + { name: 'Armenian', key: 'hy', value: 'Armenian' }, + { name: 'Indonesian', key: 'id', value: 'Indonesian' }, + { name: 'Italian', key: 'it-IT', value: 'Italian' }, + { name: 'Japanese', key: 'ja', value: 'Japanese' }, + { name: 'Georgian', key: 'ka', value: 'Georgian' }, + { name: 'Khmer', key: 'km', value: 'Khmer' }, + { name: 'Kannada', key: 'kn', value: 'Kannada' }, + { name: 'Korean (Korea)', key: 'ko-KR', value: 'Korean (Korea)' }, + { name: 'Lao', key: 'lo-LA', value: 'Lao' }, + { name: 'Lithuanian', key: 'lt-LT', value: 'Lithuanian' }, + { name: 'Latvian', key: 'lv', value: 'Latvian' }, + { name: 'Malayalam', key: 'ml', value: 'Malayalam' }, + { name: 'Mongolian', key: 'mn-MN', value: 'Mongolian' }, + { name: 'Norwegian (bokmal)', key: 'nb-NO', value: 'Norwegian (bokmal)' }, + { name: 'Dutch', key: 'nl', value: 'Dutch' }, + { name: 'Occitan', key: 'oc', value: 'Occitan' }, + { name: 'Polish', key: 'pl-PL', value: 'Polish' }, + { name: 'Portuguese', key: 'pt', value: 'Portuguese' }, + { name: 'Portuguese (Brazil)', key: 'pt-BR', value: 'Portuguese (Brazil)' }, + { name: 'Romanian', key: 'ro-RO', value: 'Romanian' }, + { name: 'Russian', key: 'ru', value: 'Russian' }, + { name: 'Slovak (Slovakia)', key: 'sk-SK', value: 'Slovak (Slovakia)' }, + { name: 'Slovenian', key: 'sl', value: 'Slovenian' }, + { name: 'Serbian', key: 'sr', value: 'Serbian' }, + { name: 'Swedish', key: 'sv-SE', value: 'Swedish' }, + { name: 'Tamil', key: 'ta', value: 'Tamil' }, + { name: 'Telugu', key: 'te', value: 'Telugu' }, + { name: 'Thai', key: 'th', value: 'Thai' }, + { name: 'Turkish', key: 'tr', value: 'Turkish' }, + { name: 'Turkish (Turkey)', key: 'tr-TR', value: 'Turkish (Turkey)' }, + { name: 'Ukrainian', key: 'uk-UA', value: 'Ukrainian' }, + { name: 'Vietnamese', key: 'vi', value: 'Vietnamese' }, + { name: 'Vietnamese (Vietnam)', key: 'vi-VN', value: 'Vietnamese (Vietnam)' }, + { name: 'Chinese Simplified (China)', key: 'zh-CN', value: 'Chinese Simplified (China)' }, + { name: 'Chinese Traditional (Taiwan)', key: 'zh-TW', value: 'Chinese Traditional (Taiwan)' }, +]; diff --git a/bbbeasy-frontend/src/components/PresetSettings.tsx b/bbbeasy-frontend/src/components/PresetSettings.tsx index 52e3bae1..1ca37389 100644 --- a/bbbeasy-frontend/src/components/PresetSettings.tsx +++ b/bbbeasy-frontend/src/components/PresetSettings.tsx @@ -23,6 +23,7 @@ import { withTranslation } from 'react-i18next'; import { t } from 'i18next'; import { Step3Form } from './Step3Form'; + import Notifications from './Notifications'; import LoadingSpinner from './LoadingSpinner'; diff --git a/bbbeasy-frontend/src/components/Presets.tsx b/bbbeasy-frontend/src/components/Presets.tsx index b2f28af5..df6eb3be 100644 --- a/bbbeasy-frontend/src/components/Presets.tsx +++ b/bbbeasy-frontend/src/components/Presets.tsx @@ -41,6 +41,7 @@ import { Space, Dropdown, Menu, + Select, } from 'antd'; import { CheckOutlined, @@ -76,6 +77,10 @@ import { MyPresetType } from '../types/MyPresetType'; import { SubCategoryType } from '../types/SubCategoryType'; import { UploadFile } from 'antd/lib/upload/interface'; import type { Color } from 'antd/es/color-picker'; +import ReactDomServer from 'react-dom/server'; +import { LanguagesBBB } from './LanguagesBBB'; +import { GuestPolicy } from './GuestPolicy'; + const { Title } = Typography; interface PresetColProps { @@ -140,11 +145,19 @@ const PresetsCol: React.FC = ({ }, }; + const getData = () => { + if ('Guest Policy' === modalTitle) { + return GuestPolicy; + } else { + return LanguagesBBB; + } + }; const showModal = (title: string, titleTrans: string, content: SubCategoryType[]) => { setIsModalVisible(true); setModalTitle(title); setModalTitleTrans(titleTrans); setModalContent(content); + const indexLogo = content.findIndex((item) => item.type === 'file'); if (indexLogo > -1 && content[indexLogo].value != '') { const presetLogo: UploadFile = { @@ -428,74 +441,145 @@ const PresetsCol: React.FC = ({
{modalContent.map((item) => ( -
- - {item.type == 'bool' && ( - { - item.value = checked; - }} - /> - )} - - {item.type === 'string' && ( - { - item.value = event.target.value; - }} - /> - )} - - {item.type === 'color' && ( - { - setColor(color1); - item.value = - typeof color1 === 'string' ? color1 : color1.toHexString(); - }} + <> + {typeof item.type !== 'boolean' && ( +
+ 30 ? ( +
{t(item.name)}
+ ) : ( + t(item.name) + ) + } + name={item.name} > - -
+ + ) + : ReactDomServer.renderToString( + + ) + } + /> + + { + item.value = checked; + if (item.value) { + ( + document.getElementById( + item.name + ) as HTMLInputElement + ).value = ReactDomServer.renderToString( + + ); + } else { + ( + document.getElementById( + item.name + ) as HTMLInputElement + ).value = ReactDomServer.renderToString( + + ); + } + }} + /> + + )} - backgroundColor: item.value ? item.value : '#fbbc0b', + {item.type === 'string' && ( + { + item.value = event.target.value; }} /> - - - )} - - {item.type === 'file' && ( - - - - )} - - {item.type === 'integer' && ( - (item.value = val)} - /> - )} - -
+ )} + + {item.type === 'color' && ( + { + setColor(color1); + item.value = + typeof color1 === 'string' + ? color1 + : color1.toHexString(); + }} + > + +
+ + + )} + + {item.type === 'file' && ( + + + + )} + + {item.type === 'integer' && ( + (item.value = val)} + /> + )} + + {item.type === 'select' && ( + } + suffix={ + + } + /> + ); + } else { + return ( + + {' '} + + + + + ); + } + }; return ( <> {isLoading ? ( @@ -386,44 +419,50 @@ const RoomDetails = () => { - {!isEditing ? ( + {!isEditing && showRecodingAndPresenttaions ? ( ) : ( <> - - cancelEdit()} - > - + + - - - + + )} )} - + {!isEditing ? ( <> {room.name} @@ -434,28 +473,11 @@ const RoomDetails = () => { ))}
- } - suffix={ - - } - /> + + {renderLinkOrUsername} ) : ( - +
{editFormItems.map((editFormItem) => { return customFormItem(editFormItem); @@ -516,14 +538,12 @@ const RoomDetails = () => { {showStartButton && ( - + - + @@ -532,10 +552,14 @@ const RoomDetails = () => { - + - +
) )} diff --git a/bbbeasy-frontend/src/components/RoomPresentations.tsx b/bbbeasy-frontend/src/components/RoomPresentations.tsx index af480f70..83647b62 100644 --- a/bbbeasy-frontend/src/components/RoomPresentations.tsx +++ b/bbbeasy-frontend/src/components/RoomPresentations.tsx @@ -25,8 +25,10 @@ import { UploadFile } from 'antd/es/upload/interface'; import { RcFile, UploadProps } from 'antd/es/upload'; const { Title } = Typography; - -const RoomPresentations = () => { +type Props = { + open: boolean; +}; +const RoomPresentations = (props: Props) => { const [previewOpen, setPreviewOpen] = useState(false); const [previewImage, setPreviewImage] = useState(''); const [fileList, setFileList] = useState([ @@ -84,23 +86,27 @@ const RoomPresentations = () => { ); return ( <> - - - <Trans i18nKey="room_ppts" /> - - - {fileList.length >= 8 ? null : uploadButton} - - - - - + {props.open && ( + <> + + + <Trans i18nKey="room_ppts" /> + + + {fileList.length >= 8 ? null : uploadButton} + + + + + + + )} ); }; diff --git a/bbbeasy-frontend/src/components/RoomRecordings.tsx b/bbbeasy-frontend/src/components/RoomRecordings.tsx index 8573ff55..848b4827 100644 --- a/bbbeasy-frontend/src/components/RoomRecordings.tsx +++ b/bbbeasy-frontend/src/components/RoomRecordings.tsx @@ -43,10 +43,11 @@ const { Title } = Typography; type Props = { loading: boolean; roomRecordings: RecordingType[]; + open: boolean; }; const RoomRecordings = (props: Props) => { - const { loading, roomRecordings } = props; + const { loading, roomRecordings, open } = props; const actionsItems: MenuProps['items'] = [ { key: '1', @@ -67,151 +68,161 @@ const RoomRecordings = (props: Props) => { ]; return ( -
-
- - - <Trans i18nKey="room_recordings" /> - - {roomRecordings.length != 0 && ( - } - bordered={false} - /> - )} - -
- {loading ? ( - - ) : roomRecordings.length != 0 ? ( - - {roomRecordings.map((recording) => { - const addHeight = recording.name.length <= 16 ? '65px' : null; - const recordingName = - recording.name.length <= 24 ? recording.name : recording.name.substring(0, 21) + '...'; - - return ( - - + {open && ( +
+
+ + + <Trans i18nKey="room_recordings" /> + + {roomRecordings.length != 0 && ( + } bordered={false} - hoverable - cover={ -
- -
-
- - {recordingName} - - + )} + +
+ {loading ? ( + + ) : roomRecordings.length != 0 ? ( + + {roomRecordings.map((recording) => { + const addHeight = recording.name.length <= 16 ? '65px' : null; + const recordingName = + recording.name.length <= 24 + ? recording.name + : recording.name.substring(0, 21) + '...'; + + return ( + + + +
+
+ + {recordingName} + + + + +
+ + + + {recording.users}{' '} + {' '} + + + {recording.date} + + + {recording.duration} + + + +
+
+ } + > + +
+
- - - - {recording.users} {' '} - - - {recording.date} - - - {recording.duration} + + + + + + 35,6 +
+ +
+
+
+
+
+
+
+
- -
-
- } - > - -
- - - 35,6 - -
- -
-
-
-
-
-
-
-
-
-
-
- - ); - })} -
- ) : ( - } /> + + + + ); + })} + + ) : ( + } /> + )} +
)} -
+ ); }; diff --git a/bbbeasy-frontend/src/components/Rooms.tsx b/bbbeasy-frontend/src/components/Rooms.tsx index 89078113..15919ada 100644 --- a/bbbeasy-frontend/src/components/Rooms.tsx +++ b/bbbeasy-frontend/src/components/Rooms.tsx @@ -133,7 +133,9 @@ const RoomsCol: React.FC = ({ index, room, editable, deleteClickH - {room.name} + + {room.name} +
diff --git a/bbbeasy-frontend/src/components/Step2Form.tsx b/bbbeasy-frontend/src/components/Step2Form.tsx index b9c142d7..680690e3 100644 --- a/bbbeasy-frontend/src/components/Step2Form.tsx +++ b/bbbeasy-frontend/src/components/Step2Form.tsx @@ -17,7 +17,7 @@ */ import React from 'react'; -import { Trans, useTranslation, withTranslation } from 'react-i18next'; +import { Trans, useTranslation } from 'react-i18next'; import { message, Form, Input, Typography, Upload, InputNumber, theme, ColorPicker, Space } from 'antd'; import { InboxOutlined } from '@ant-design/icons'; diff --git a/bbbeasy-frontend/src/components/Step3Form.tsx b/bbbeasy-frontend/src/components/Step3Form.tsx index cc966152..c477f3ab 100644 --- a/bbbeasy-frontend/src/components/Step3Form.tsx +++ b/bbbeasy-frontend/src/components/Step3Form.tsx @@ -32,42 +32,49 @@ import { FormInstance } from 'antd/lib/form'; const { Title, Paragraph } = Typography; const { Grid, Meta } = Card; import { useLocation } from 'react-router-dom'; -import presetSettingsService from 'services/preset.settings.service'; +import ReactDomServer from 'react-dom/server'; type Props = { presets: PresetType[]; onFinish?: (category: string, subCategories: SubCategoryType[]) => void; enabled?: boolean; }; -let step3Form: FormInstance = null; +let step3: FormInstance = null; export const Step3Form = (props: Props) => { const location = useLocation(); const { presets } = props; + const [values, setValues] = React.useState(); const enabled = props.enabled ?? true; const [modalTitle, setModalTitle] = React.useState(''); const [modalTitleTrans, setModalTitleTrans] = React.useState(''); const [modalContent, setModalContent] = React.useState([]); const [isModalVisible, setIsModalVisible] = React.useState(false); - const showModal = (title: string, titleTrans: string, content: SubCategoryType[]) => { setIsModalVisible(true); setModalTitle(title); setModalTitleTrans(titleTrans); setModalContent(content); + const formvalues = []; + content.forEach((item) => { + formvalues[item.name] = item.enabled; + }); + setValues(formvalues); }; + const Confirm = () => { modalContent.map((item) => { - item.enabled = step3Form.getFieldValue(item.name); + item.enabled = values[item.name]; }); + if (location.pathname.includes('settings')) { props.onFinish(modalTitle, modalContent); } setIsModalVisible(false); }; + const Cancel = () => { modalContent.map((item) => { - step3Form.getFieldValue(item.name); - step3Form.setFieldValue(item.name, item.enabled); + step3.setFieldValue(item.name, item.enabled); }); setIsModalVisible(false); @@ -147,24 +154,67 @@ export const Step3Form = (props: Props) => { ]} maskClosable={true} > - (step3Form = form)}> + (step3 = form)}>
{modalContent.map((item) => { - const subcategory = item.name; - return (
- -
+ item.name.length > 30 ? ( +
+ +
+ ) : ( + + ) } valuePropName="checked" name={item.name} > - + <> + + ) + : ReactDomServer.renderToString( + + ) + } + /> + { + const formValues = values; + formValues[item.name] = checked; + + setValues(formValues); + if (checked) { + ( + document.getElementById( + item.name + ) as HTMLInputElement + ).value = ReactDomServer.renderToString( + + ); + } else { + ( + document.getElementById( + item.name + ) as HTMLInputElement + ).value = ReactDomServer.renderToString( + + ); + } + }} + /> +
); diff --git a/bbbeasy-frontend/src/components/Users.tsx b/bbbeasy-frontend/src/components/Users.tsx index 0f5bdeeb..302666e0 100644 --- a/bbbeasy-frontend/src/components/Users.tsx +++ b/bbbeasy-frontend/src/components/Users.tsx @@ -23,7 +23,7 @@ import { t } from 'i18next'; import { PageHeader } from '@ant-design/pro-layout'; import { Alert, Button, Form, Input, Modal, Popconfirm, Select, Space, Tag, Typography } from 'antd'; -import { DeleteOutlined, EditOutlined, QuestionCircleOutlined } from '@ant-design/icons'; +import { DeleteOutlined, EditOutlined, QuestionCircleOutlined, StarFilled } from '@ant-design/icons'; import { FormInstance } from 'antd/lib/form'; import { CompareRecords } from '../functions/compare.function'; @@ -40,6 +40,7 @@ import RolesService from '../services/roles.service'; import { TableColumnType } from '../types/TableColumnType'; import { UserType } from '../types/UserType'; import { RoleType } from '../types/RoleType'; +import settingsService from '../services/settings.service'; const { Option } = Select; const { Link } = Typography; @@ -73,6 +74,13 @@ const Users = () => { const [errorsAdd, setErrorsAdd] = React.useState(''); const [errorsEdit, setErrorsEdit] = React.useState({}); const [isModalVisible, setIsModalVisible] = React.useState(false); + const [brandColor, setBrandColor] = React.useState(''); + + const getBrandColor = () => { + settingsService.collect_settings().then((response) => { + setBrandColor(response.data.brand_color); + }); + }; //list const getRoles = () => { @@ -116,6 +124,7 @@ const Users = () => { getRoles(); } getUsers(); + getBrandColor(); const usersActions = AuthService.getActionsPermissionsByGroup('users'); setActions(usersActions); @@ -341,6 +350,18 @@ const Users = () => { compare: (a, b) => a.username.localeCompare(b.username), multiple: 4, }, + render: (username, record) => { + if (record.key == 1) { + return ( + <> + {' '} + {username}{' '} + + ); + } else { + return <>{username}; + } + }, }, { title: t('email_col'), diff --git a/bbbeasy-frontend/src/components/layout/AppHeader.tsx b/bbbeasy-frontend/src/components/layout/AppHeader.tsx index d2b90f45..0b0c95e7 100644 --- a/bbbeasy-frontend/src/components/layout/AppHeader.tsx +++ b/bbbeasy-frontend/src/components/layout/AppHeader.tsx @@ -175,6 +175,7 @@ const AppHeader = () => { placement={LocaleService.direction == 'rtl' ? 'bottomLeft' : 'bottomRight'} arrow trigger={['click']} + className={!warningNotification ? 'dropdownWarning' : null} > + ) : ( + <> + + + )} {dropdownLang} diff --git a/bbbeasy-frontend/src/locale/ar-TN.json b/bbbeasy-frontend/src/locale/ar-TN.json index a8d8bcbc..c71d3b0b 100644 --- a/bbbeasy-frontend/src/locale/ar-TN.json +++ b/bbbeasy-frontend/src/locale/ar-TN.json @@ -3,7 +3,7 @@ "term": "المصطلحات", "conditions": "الشروط", "room": "الغرفة", - "label": "العلامة", + "label": "تسمية", "preset": { "label": "الإعدادات المسبقة", "required": "الإعدادات المسبقة مطلوبة" @@ -15,10 +15,10 @@ "reserved-rights": "جميع الحقوق محفوظة", "sign-in-to-continue": "قم بتسجيل الدخول للاستمرار في تطبيقنا", "remember": "تذكرني", - "remember-password": "أتذكر كلمة المرور", + "remember-password": "تذكر كلمة المرور الخاصة بي", "reset-password": "إعادة تعيين كلمة المرور", - "forgot-password": "نسيت كلمة المرور ؟", - "reset-here": "إعادة تعيين هنا", + "forgot-password": "نسيت كلمة المرور؟", + "reset-here": "إعادة التعيين هنا", "login-now": "تسجيل الدخول الآن", "Dont-t-have-account": "ليس لديك حساب", "register-here": "التسجيل هنا", @@ -35,106 +35,110 @@ "size": "يجب أن تتكون كلمة المرور من 8 أحرف على الأقل", "invalid": "كلمة المرور غير صحيحة" }, - "join-us": "إنضم إلينا", - "register-now": "قم بالتسجيل الآن وانضم إلى مجتمعنا ", + "join-us": "انضم إلينا", + "register-now": "قم بالتسجيل الآن وانضم إلى مجتمعنا", "username": { "label": "اسم المستخدم", "required": "اسم المستخدم مطلوب", - "size": "يجب أن يتكون اسم المستخدم من 4 أحرف على الأقل" + "size": "يجب أن يحتوي اسم المستخدم على 4 أحرف على الأقل" }, + "fullname": { + "label": "الاسم الكامل", + "required": "التسم الكامل مطلوب" + }, + "empty-fullname": "الرجاء إدخال الاسم الكامل للانضمام إلى الاجتماع", "confirm-password": { "label": "تأكيد كلمة المرور", - "required": "تأكيد كلمة المرور مطلوبة ", - "size": "يجب أن تتكون كلمة المرور من 8 أحرف على الأقل" + "required": "تأكيد كلمة المرور مطلوب", + "size": "تأكيد كلمة المرور يجب أن تحتوي على 8 أحرف على الأقل" }, - "read-agreement": "لقد قرأت الاتفاق", - "register": "سجل الآن", - "have-already-account": "لديك حساب مسبقاً", + "read-agreement": "لقد قرأت هذا الاتفاق", + "register": "التسجيل الآن", + "have-already-account": "لديك حساب", "login-here": "تسجيل الدخول هنا", "passwords-not-match": "كلمتا المرور غير متطابقتين", - "user-could-not-logged": "لم يتمكن المستخدم من تسجيل الدخول", + "user-could-not-logged": "تعذر تسجيل المستخدم", "success-title": "تم الإجراء بنجاح", "error-title": "خطأ", "info-title": "معلومات", "success-registration": "تهانينا! لقد تم إنشاء حسابك بنجاح", - "username-email-already-exist": "اسم المستخدم والبريد الإلكتروني موجودين مسبقا", - "username-already-exist": "اسم المستخدم موجود مسبقاً", - "email-already-exist": "البريد الإلكتروني موجود مسبقاً", - "welcome": "مرحباً بعودتك", + "username-email-already-exist": "اسم المستخدم والبريد الإلكتروني موجودان مسبقا", + "username-already-exist": "اسم المستخدم موجود مسبقا", + "email-already-exist": "البريد الإلكتروني موجود مسبقا", + "welcome": "مرحبا بعودتك", "accept-agreement": "يجب قبول الاتفاق", "agree": "أوافق على", "terms": "شروط الخدمة", "and": "و", "privacy-policy": "سياسة الخصوصية", - "invalid_credentials": "تم تقديم بيانات اعتماد غير صالحة ، حاول مرة أخرى", - "wrong_password": ": كلمة مرور خاطئة. المحاولات المتبقية", - "attempts_exceeded": "تم قفل حسابك لأنك وصلت إلى الحد الأقصى لعدد محاولات تسجيل الدخول غير الصالحة. يمكنك الاتصال بالمسؤول أو ", + "invalid_credentials": "بيانات الاعتماد المقدمة غير صالحة، حاول مرة أخرى!", + "attempts_exceeded": "تم قفل حسابك لأنك وصلت إلى الحد الأقصى لعدد محاولات تسجيل الدخول غير صالحة. يمكنك الاتصال بالمسؤول أو ", "click_here": " انقر هنا", - "email_instructions": "لتلقي بريد إلكتروني يحتوي على إرشادات حول كيفية فتح حسابك", - "invalid_password": "يجب أن تحتوي كلمة المرور على الأقل على رقم، حرف كبير، حرف صغير وحرف خاص", + "email_instructions": "لاستلام بريد إلكتروني يحتوي على تعليمات حول كيفية فتح حسابك", + "invalid_password": "يجب أن تحتوي كلمة المرور على رقم واحد على الأقل، وحرف كبير واحد، وحرف صغير واحد، وحرف خاص واحد", "common_password": "تجنب اختيار كلمة مرور شائعة", "already_used_password": "لا يمكن أن تكون كلمة المرور الجديدة هي نفسها كلمة المرور القديمة", "success_change_password": "تم تغيير كلمة المرور بنجاح", - "error_change_password": "لا يمكن تغيير كلمة المرور", - "error-registration": "لا يمكن إضافة المستخدم", - "sent-link-successfully": "الرجاء التحقق من بريدك الإلكتروني لإعادة تعيين كلمة المرور الخاصة بك", + "error_change_password": "تعذر تغيير كلمة المرور", + "error-registration": "تعذر إضافة المستخدم", + "sent-link-successfully": "يرجى التحقق من بريدك الإلكتروني لإعادة تعيين كلمة المرور الخاصة بك", "token": { "expired": "انتهت صلاحية الرمز", - "consumed": "تم إستهلاك الرمز" + "consumed": "تم استهلاك الرمز" }, - "create-first-room": "إنشاء غرفتي الأولى", - "mark-labels": "تنظيمها مع العلامات", - "assign-preset": "تطبيق الإعدادات المسبقة", - "give-it-name": "تسمية غرفتك", + "create-first-room": "أقوم بإنشاء غرفتي الأولى", + "mark-labels": "نظم باستخدام التسميات", + "assign-preset": "طبق الإعداد المسبق", + "give-it-name": "سم غرفتك", "create-easy-room": "ما مدى سهولة إنشاء غرفة؟", "previous": "السابق", - "success_install": "تم تثبيت التطبيق !
يرجى تحديث تكوين الواجهة الخلفية لبدء استخدام التطبيق", - "start-using-hivelvet": "البدء باستخدام Hivelvet", + "success_install": "تم تثبيت التطبيق!
الرجاء تحديث إعدادات backend لبدء استخدام التطبيق", + "start-using-bbbeasy": "ابدأ باستخدام BBEasy", "confirm": "التأكيد", "drop-logo-here": "ضع شعارك هنا", "branding": "العلامات التجارية", "company": { - "label": "الشركة", - "name": "اسم الشركة", - "required": "اسم الشركة مطلوب", + "label": "المنظمة", + "name": "اسم المنظمة", + "required": "اسم المنظمة مطلوب", "website": { - "label": "الموقع الإلكتروني للشركة", - "required": "الموقع الإلكتروني للشركة مطلوب", - "invalid": "موقع الشركة ليس رابط صالح" + "label": "الموقع الإلكتروني للمنظمة", + "required": "الموقع الإلكتروني للمنظمة مطلوب", + "invalid": "الموقع الإلكتروني للمنظمة ليس صحيحا" } }, "platform": { - "label": "إسم المنصة", - "required": "إسم المنصة مطلوب" + "label": "اسم المنصة", + "required": "اسم المنصة مطلوب" }, "terms_url": { "label": "رابط شروط الاستخدام", - "invalid": "رابط شروط الاستخدام ليس صالح" + "invalid": "رابط شروط الاستخدام ليس صالحا" }, "privacy_policy_url": { "label": "رابط سياسة الخصوصية", - "invalid": "رابط سياسة الخصوصية ليس صالح" + "invalid": "رابط سياسة الخصوصية ليس صالحا" }, "bigbluebutton_rooms_settings": "إعدادات غرف BigBlueButton", "brand_color": "لون العلامة التجارية", "default_font_size": "حجم الخط الافتراضي", - "border_radius": "نصف قطر الحدود", - "wireframe_style": "نمط السلكيّة", - "create-administrator-account": "إنشاء حساب المسؤول", + "border_radius": "الحواف الدائرية", + "wireframe_style": "أسلوب الـ wireframe", + "create-administrator-account": "إنشاء حساب المشرف", "support": "الدعم", - "zcaleright": "Zcaleright", - "flexible-configuration": "التشكيل المرن", + "zcaleright": "ZcaleRight", + "flexible-configuration": "تشكيل المرن", "recordings-management": "إدارة التسجيلات", "full-brandings": "العلامات التجارية الكاملة", - "personal-rooms": "الغرف الشخصية", - "not_found": "عذراً، الصفحة التي قمت بزيارتها غير موجودة.", + "personal-rooms": "غرف شخصية", + "not_found": "عذرا، الصفحة التي قمت بزيارتها غير موجودة.", "back-home": "العودة إلى الصفحة الرئيسية", "rooms": "الغرف", - "labels": "العلامات", + "labels": "التسميات", "presets": "الإعدادات المسبقة", "settings": "الإعدادات", - "company_branding": "الشركة & العلامات التجارية", - "users": "المستخدمين", + "company_branding": "المنظمة والعلامة التجارية", + "users": "المستخدمون", "roles": "الأدوار", "bigbluebutton": "BigBlueButton", "notifications": "الإشعارات", @@ -142,20 +146,20 @@ "create": "إنشاء", "next": "التالي", "bigBlueButton_settings": "إعدادات BigBlueButton", - "administrator_account": "حساب المسؤول", + "administrator_account": "حساب المشرف", "finish": "إنهاء", - "customize_configuration": "انقر على كل زر لتخصيص مجموعة الاعدادات و الحصول على ملخصها", - "understand": "فهمت، شكراً لك !", - "welcome_platformname": "مرحباً بك في {{platformName}}", + "customize_configuration": "انقر على كل زر لتخصيص مجموعة الاعدادات و مرر الفأرة فوق الزر للحصول على ملخصها", + "understand": "فهمت، شكرا لك!", + "welcome_platformname": "مرحبا بكم في {{platformName}}", "create_customizable_rooms": "إنشاء غرف قابلة للتخصيص بالكامل لـ", "log-into-account": "تسجيل الدخول إلى حسابك", - "completed_registration": "تم التسجيل بنجاح", - "success_upload": "تم تحميل الملف بنجاح", + "completed_registration": "اكتمل التسجيل بنجاح", + "success_upload": "تم رفع الملف بنجاح", "wrong_file": "ملف خاطئ", "invalid_password_reset_token": "رمز إعادة تعيين كلمة المرور غير صالح", - "account_pending": "حسابك غير فعال. الرجاء الاتصال بالمسؤول", + "account_pending": "حسابك غير نشط. الرجاء الاتصال بالمشرف", "account_deleted": "تم تعطيل حسابك لانتهاك شروطنا", - "invalid_authentication_data": "بيانات غير صالحة", + "invalid_authentication_data": "بيانات المصادقة غير صالحة", "invalid_username": "يجب أن يتكون اسم المستخدم من 4 أحرف على الأقل", "invalid_email": "بريد إلكتروني غير صحيح", "user_account_created": "تم إنشاء حساب المستخدم", @@ -163,15 +167,15 @@ "user_dropdown": { "profile": "الملف الشخصي", "logout": "تسجيل الخروج", - "warning_notification": "BigBlueButton API لم يتم تكوينه في هذه الحالة. يرجى الاتصال بالمسؤول" + "warning_notification": "لم يتم تكوين API زر BigBlueBuon في هذا النموذج. الرجاء الاتصال بالمسؤول." }, - "name_col": "الإسم", + "name_col": "الاسم", "users_col": "عدد المستخدمين", "nb_rooms_col": "عدد الغرف", "actions_col": "الإجراءات", "new_role": "دور جديد", "name": { - "label": "الإسم", + "label": "الاسم", "required": "الاسم مطلوب" }, "color": { @@ -182,7 +186,7 @@ "required": "الوصف مطلوب" }, "required_name": "الاسم مطلوب", - "exist_name": "الاسم موجود مسبقاً", + "exist_name": "الاسم موجود مسبقا", "permissions": { "label": "الصلاحيات" }, @@ -192,21 +196,21 @@ "cancel": "إلغاء", "save": "حفظ", "add_role_success": "تمت إضافة الدور بنجاح", - "cancel_edit": "هل أنت متأكد من إلغاء التعديل ؟", + "cancel_edit": "هل أنت متأكد من إلغاء التعديل؟", "edit_role_success": "تم تحديث الدور بنجاح", "delete": "حذف", - "delete_role_confirm": "هل أنت متأكد من حذف هذا الدور ؟", - "delete_role_title": "هل تريد حذف هذا الدور ؟", + "delete_role_confirm": "هل أنت متأكد من حذف هذا الدور؟", + "delete_role_title": "هل تريد حذف هذا الدور؟", "delete_role_content": "تم تعيين هذا الدور لبعض المستخدمين ، إذا أكدت الحذف ، سيتحول جميع المستخدمين المعينين إلى دور القارئ", "delete_role_success": "تم حذف الدور بنجاح", "confirm_yes": "نعم", "confirm_no": "لا", - "username_col": "إسم المستخدم", + "username_col": "اسم المستخدم", "email_col": "البريد الإلكتروني", "role_col": "الدور", "status_col": "الحالة", "new_user": "مستخدم جديد", - "new_label": "علامة جديدة", + "new_label": "تسمية جديدة", "description_col": "الوصف", "role": { "label": "الدور", @@ -221,23 +225,23 @@ "edit": "تعديل", "add_user_success": "تمت إضافة المستخدم بنجاح", "edit_user_success": "تم تحديث المستخدم بنجاح", - "delete_user_confirm": "هل أنت متأكد من حذف هذا المستخدم ؟", + "delete_user_confirm": "هل أنت متأكد من حذف هذا المستخدم؟", "delete_user_success": "تم حذف المستخدم بنجاح", "label_name": { - "size": "يجب أن يتكون اسم التصنيف من حرف واحد على الأقل", - "maxSize": "لا يجب أن يكون اسم التصنيف أطول من 32 حرفًا" + "size": "يجب أن يكون اسم التسمية حرف واحد على الأقل", + "maxSize": "اسم التسمية لا يمكن أن يكون أطول من 32 حرفا" }, - "label-name-already-exist": "اسم التصنيف موجود بالفعل", - "label-color-already-exist": "لون التصنيف موجود بالفعل", - "delete_label_confirm": "هل أنت متأكد من حذف هذه العلامة ؟", - "delete_label_title": "هل تريد حذف هذه العلامة ؟", - "delete_label_content": "تم تعيين هذه العلامة لبعض الغرف ، إذا أكدت الحذف ، لن يتم تخصيصها لها", - "delete_label_success": "تم حذف العلامة بنجاح", - "add_label_success": "تمت اضافة العلامة بنجاح", - "edit_label_success": "تم تحديث العلامة بنجاح", + "label-name-already-exist": "اسم التسمية موجود مسبقا", + "label-color-already-exist": "لون التسمية موجود مسبقا", + "delete_label_confirm": "هل أنت متأكد من حذف هذه التسمية؟", + "delete_label_title": "هل تريد حذف هذه التسمية؟", + "delete_label_content": "تم تعيين هذه التسمية بالفعل إلى بعض الغرف، إذا قمت بتأكيدها، سيتم إلغاء تعيينها لهم", + "delete_label_success": "تم حذف التسمية بنجاح", + "add_label_success": "تمت إضافة التسمية بنجاح", + "edit_label_success": "تم تحديث التسمية بنجاح", "active": "مفعل", "inactive": "غير مفعل", - "pending": "في انتظار", + "pending": "في الانتظار", "deleted": "محذوف", "required_username": "اسم المستخدم مطلوب", "required_description": "الوصف مطلوب", @@ -248,38 +252,37 @@ "no_changes": "لا توجد تغييرات أجريت", "new_preset": "إعداد مسبق جديد", "preset_name": { - "maxSize": "لا يجب أن يكون اسم الإعداد المسبق أطول من 64 حرفًا" + "maxSize": "لا يمكن أن يكون اسم الإعداد المسبق أطول من 64 حرفا" }, - "upload_img": "تحميل jpg، jpeg، png فقط", + "upload_img": "رفع jpg، jpeg، png فقط", "search_preset": "البحث في إعداداتي المسبقة", "rename": "إعادة التسمية", - "delete_preset_confirm": "هل أنت متأكد من حذف هذا الإعداد المسبق ؟", - "delete_preset_title": "هل تريد حذف هذا الإعداد ؟", - "delete_preset_content": "تم تعيين هذا الإعداد المسبق لبعض الغرف ، إذا أكدت الحذف ، ستتحول جميع الغرف المعينة إلى الإعداد المسبق الافتراضي", - "delete_preset_success": "تم حذف الاعدادات بنجاح", - "add_preset_success": "تمت إضافة الاعدادات بنجاح", - "edit_preset_success": "تم تحديث الاعدادات بنجاح", + "delete_preset_confirm": "هل أنت متأكد من حذف هذا الإعداد المسبق؟", + "delete_preset_title": "هل تريد حذف هذا الإعداد المسبق؟", + "delete_preset_content": "تم تعيين هذا الإعداد المسبق بالفعل إلى بعض الغرف، إذا قمت بالتأكيد، جميع الغرف المعينة سيتم تبديل إلى الإعداد المسبق الافتراضي", + "delete_preset_success": "تم حذف الإعداد المسبق بنجاح", + "add_preset_success": "تمت إضافة الإعداد المسبق بنجاح", + "edit_preset_success": "تم تحديث الإعداد المسبق بنجاح", "copy_preset_success": "تم نسخ الإعداد المسبق بنجاح", - - "edit_settings_success": "تم تحديث إعدادات الشركة و العلامات التجارية بنجاح", + "edit_settings_success": "تم تحديث إعدادات المنضمة والعلامة التجارية بنجاح", "edit_preset_settings_success": "تم تحديث إعدادات غرف BigBlueButton بنجاح", "new_room": "غرفة جديدة", "room_name": { - "minSize": "يجب أن يتكون اسم الفرغة من 4 أحرف على الأقل", - "maxSize": "لا يجب أن يكون اسم الغرفة أطول من 256 حرفًا" + "minSize": "اسم الغرفة يجب أن يحتوي على 4 أحرف على الأقل", + "maxSize": "اسم الغرفة لا يمكن أن يكون أطول من 256 حرفا" }, "shortlink": { - "label": "الرابط", - "required": "الرابط مطلوب" + "label": "الرابط المختصر", + "required": "الرابط المختصر مطلوب" }, - "labels_required": "العلامات مطلوبة", - "room-name-already-exist": "اسم القاعة موجود بالفعل", + "labels_required": "التسميات مطلوبة", + "room-name-already-exist": "اسم الغرفة موجود مسبقا", "room-link-already-exist": "رابط الغرفة موجود مسبقا", "add_room_success": "تمت إضافة القاعة بنجاح", "view": "عرض", "copy": "نسخ", "copy_text": "نسخ النص", - "copied": "منسوخ", + "copied": "تم النسخ", "facebook_share": "مشاركة على الفيسبوك", "twitter_share": "مشاركة على تويتر", "linkedin_share": "مشاركة على لينكد إن", @@ -288,7 +291,7 @@ "join": "انضم", "meeting_not_started": "لم يبدأ الاجتماع بعد", "room_ppts": "عروض الغرفة", - "upload": "أضف", + "upload": "إضافة", "room_recordings": "تسجيلات الغرفة", "attendees": "الحاضرون", "publish": "نشر", @@ -307,9 +310,8 @@ "edit_account_success": "تم تحديث الملف الشخصي بنجاح", "install_locked_title": "عملية التثبيت مقفلة", "install_locked_text": "عذرًا ، غير مصرح لك بالدخول إلى هذه الصفحة ، التطبيق مثبت بالفعل", - "install_error_title": "عملية التثبيت غير نشطة", - "install_error_text": "يجب أن تكون عملية التثبيت نشطة في تكوين الواجهة الخلفية. يرجى إعادة التحميل بمجرد التحديث", - + "install_error_title": "المثبت معطل", + "install_error_text": "يجب تمكين المثبت في تكوين backend. الرجاء إعادة التحميل بمجرد التحديث", "recordings": "تسجيلات", "date_col": "التاريخ", "duration_col": "المدة", @@ -326,77 +328,85 @@ "edit_recording_success": "تم تحديث التسجيل بنجاح", "delete_recording_confirm": "هل أنت متأكد من حذف هذا التسجيل ؟", "delete_recording_success": "تم حذف التسجيل بنجاح", - - "audio": "صوتي", - "breakout_rooms": "غرف جانبية", + "audio": "الصوت", + "breakout_rooms": "غرف الاجتماعات الفرعية", "general": "عام", - "guest_policy": "سياسة الضيف", + "guest_policy": "سياسة الضيوف", "language": "اللغة", - "layout": "تخطيط", - "learning_dashboard": "لوحة التعلم", + "layout": "التخطيط", + "learning_dashboard": "لوحة تحليلات التعلم", "lock_settings": "إعدادات القفل", - "presentation": "عرض تقديمي", - "recording": "تسجيل", + "presentation": "العرض", + "recording": "التسجيل", "screenshare": "مشاركة الشاشة", "security": "الأمان", "ux": "تجربة المستخدم", "webcams": "كاميرات الويب", - "whiteboard": "لوحة بيضاء", - - "users_join_muted": "كتم صوت انضمام المستخدمين", + "whiteboard": "اللوحة البيضاء", + "users_join_muted": "كتم الصوت المستخدمين عند الانضمام", "moderators_allowed_to_unmute_users": "السماح للمشرفين بإلغاء كتم المستخدمين", - "auto_join": "الانظمام التلقائي", + "auto_join": "الانضمام تلقائيا", "listen_only_enabled": "تمكين الاستماع فقط", "skip_echo_test": "تخطي اختبار الصدى", "title": "العنوان", "logo": "الشعار", - "banner_text": "نص اللافتة", - "banner_color": "لون اللافتة", - "use_avatars": "استعمال الصور الرمزية", - "custom_css": "مخصص ال css", - "configurable": "قابل للإعداد", - "private_chat": "دردشة خاصة", - "duration": "المدة الزمنية", + "banner_text": "نص البانر", + "banner_color": "لون البانر", + "use_avatars": "استخدم الصور الرمزية", + "custom_css": "CSS مخصصة", + "configurable": "قابل للتعديل", + "private_chat": "المحادثة الخاصة", + "duration": "المدة", "maximum_participants": "العدد الأقصى للمشاركين", - "anyone_can_start": "أي أحد يمكنه البدأ", + "anyone_can_start": "أي شخص يمكنه البدء", "open_for_everyone": "مفتوح للجميع", - "all_join_as_moderator": "انظمام الكل كمشرفين", - "logged_in_users_only": "فقط المستخدمين المسجلين", + "all_join_as_moderator": "الكل ينضم كمشرف", + "logged_in_users_only": "تسجيل دخول المستخدمين فقط", "policy": "السياسة", "default_language": "اللغة الافتراضية", - "participants": "المشاركين", - "chat": "دردشة", + "participants": "المشاركون", + "chat": "المحادثة", "navigation_bar": "شريط التنقل", - "actions_bar": "شريط الإجراءات", - "cleanup_delay": "تأجيل عملية التنظيف", - "microphones": "ميكروفون", - "public_chat": "الدردشة العامة", - "shared_notes": "ملاحظات مشتركة", - "pre_upload": "قبل التحميل", - "auto_start": "بدء تلقائي", - "allow_start_stop": "السماح بالبدء و التوقف", - "password_for_attendee": "كلمة سر للحاضر", - "password_for_moderator": "كلمة سر للمشرف", - "keyboard_shortcuts": "إختصارات لوحة المفاتيح", - "ask_for_feedback": "طلب ردود الفعل", - "visible_for_moderator_only": "مرئي للمشرف فقط", - "moderator_allowed_camera_eject": "سمح المشرف بإخراج الكاميرا", - "auto_share": "مشاركة تلقائية", - "skip_preview": "تجاوز العرض التمهيدي", + "actions_bar": "شريط الأعمال", + "cleanup_delay": "تأخير التنظيف", + "microphones": "الميكروفون", + "public_chat": "المحادثة العامة", + "shared_notes": "الملاحظات المشتركة", + "pre_upload": "الرفع السابق", + "auto_start": "التشغيل التلقائي", + "allow_start_stop": "السماح بالبدء و الإيقاف", + "password_for_attendee": "كلمة المرور للحضور", + "password_for_moderator": "كلمة المرور للمشرف", + "keyboard_shortcuts": "اختصارات لوحة المفاتيح", + "ask_for_feedback": "طلب الرأي", + "visible_for_moderator_only": "مرئية للمشرف فقط", + "moderator_allowed_camera_eject": "السماح للمشرف بقطع الكاميرا", + "auto_share": "التشغيل التلقائي", + "skip_preview": "تخطي المعاينة", "multi_user_pen_only": "قلم متعدد المستخدمين فقط", - "presenter_tools": "أدوات العارض", + "presenter_tools": "أدوات المقدم", "multi_user_tools": "أدوات متعددة المستخدمين", - "pool_name": "إسم التجمع", + "pool_name": "اسم المجموعة", "no_recordings": "لا توجد تسجيلات", - "no_rooms": "لا يوجد غرف دردشة", + "no_rooms": "لا توجد غرف", "no_presets": "لا توجد إعدادات مسبقة", - - "no_labels": "لا توجد علامات", + "no_labels": "لا توجد تسميات", "no_data": "لا توجد بيانات", - - "email_not_exist": "المستخدم غير موجود مع هذا البريد الإلكتروني", + "wrong_file_name": "اسم الملف غير صحيح: يجب ألا يحتوي اسم الملف على أحرف خاصة", + "email_not_exist": "المستخدم غير موجود بهذا البريد الإلكتروني", "send_invitation.label": "إرسال دعوة تسجيل للمستخدمين", "self_registration.label": "السماح بالتسجيل الذاتي", "administration": "الإدارة", - "edit_administration_settings_success": "تم تحديث إعدادات الإدارة التجارية بنجاح" + "edit_administration_settings_success": "تم تحديث إعدادات الإدارة بنجاح", + + "status_presets_active": "نشيط", + "status_presets_inactive": "عاطل", + "availability": "التوفر", + "record": "سجل", + "askModerator": "اسأل المشرف", + "alwaysAccept": "تقبل دائما", + + "alwaysDeny": "ينفي دائما", + + "email-not-exist": "المستخدم غير موجود مع هذا البريد الإلكتروني" } diff --git a/bbbeasy-frontend/src/locale/en-US.json b/bbbeasy-frontend/src/locale/en-US.json index ed025286..89656f00 100644 --- a/bbbeasy-frontend/src/locale/en-US.json +++ b/bbbeasy-frontend/src/locale/en-US.json @@ -19,7 +19,7 @@ "reset-password": "Reset password", "forgot-password": "Forgot password ?", "reset-here": "Reset here", - "login-now": "Login Now", + "login-now": "Login now", "Dont-t-have-account": "Don't have an account", "register-here": "Register here", "change-password": "Change password", @@ -36,15 +36,20 @@ "invalid": "Invalid password" }, "join-us": "Join us", - "register-now": "Register now and join our community ", + "register-now": "Register now and join our community", "username": { "label": "Username", "required": "Username is required", "size": "Username must have at least 4 characters" }, + "fullname": { + "label": "Full name", + "required": "Full name is required" + }, + "empty-fullname": "Could not join a meeting with an empty fullname", "confirm-password": { "label": "Confirm password", - "required": "Confirm password is required ", + "required": "Confirm password is required", "size": "Confirm password must have at least 8 characters" }, "read-agreement": "I have read the agreement", @@ -79,7 +84,7 @@ "error-registration": "User could not be added", "sent-link-successfully": "Please check your email to reset your password", "token": { - "expired": "Token was expired", + "expired": "Token has expired", "consumed": "Token was consumed" }, "create-first-room": "Create my first room", @@ -94,13 +99,13 @@ "drop-logo-here": "Drop your logo here", "branding": "Branding", "company": { - "label": "Company", - "name": "Company Name", - "required": "Company name is required", + "label": "Organisation", + "name": "Organisation name", + "required": "Organisation name is required", "website": { - "label": "Company website", - "required": "Company website is required", - "invalid": "Company website is not a valid url" + "label": "Organisation website", + "required": "Organisation website is required", + "invalid": "Organisation website is not a valid url" } }, "platform": { @@ -109,7 +114,7 @@ }, "terms_url": { "label": "Terms of use URL", - "invalid": "Term of use url is not a valid url" + "invalid": "Terms of use url is not a valid url" }, "privacy_policy_url": { "label": "Privacy Policy URL", @@ -133,7 +138,7 @@ "labels": "Labels", "presets": "Presets", "settings": "Settings", - "company_branding": "Company & Branding", + "company_branding": "Organisation & Branding", "users": "Users", "roles": "Roles", "bigbluebutton": "BigBlueButton", @@ -167,10 +172,10 @@ }, "name_col": "Name", - "users_col": "N◦ Users", - "nb_rooms_col": "N° of Rooms", + "users_col": "No. of users", + "nb_rooms_col": "No. of Rooms", "actions_col": "Actions", - "new_role": "New Role", + "new_role": "New role", "name": { "label": "Name", "required": "Name is required" @@ -251,7 +256,7 @@ "no_changes": "No changes made", "new_preset": "New Preset", "preset_name": { - "maxSize": "Preset Name cannot be longer than 64 characters" + "maxSize": "Preset name cannot be longer than 64 characters" }, "upload_img": "Upload jpg, jpeg, png only", "search_preset": "Search all my presets", @@ -260,26 +265,26 @@ "delete_preset_title": "Do you Want to delete this preset ?", "delete_preset_content": "This preset is already assigned to some rooms, if you confirm, all assigned rooms will switch to Default preset", "delete_preset_success": "Preset successfully deleted", - "add_preset_success": "Preset Successfully added", - "edit_preset_success": "Preset Successfully updated", - "copy_preset_success": "Preset Successfully copied", + "add_preset_success": "Preset successfully added", + "edit_preset_success": "Preset successfully updated", + "copy_preset_success": "Preset successfully copied", - "edit_settings_success": "Company & Branding settings successfully updated", + "edit_settings_success": "Organisation & Branding settings successfully updated", "edit_preset_settings_success": "BigBlueButton rooms settings successfully updated", "new_room": "New Room", "room_name": { - "minSize": "Room Name must have at least 4 characters", - "maxSize": "Room Name cannot be longer than 256 characters" + "minSize": "Room name must have at least 4 characters", + "maxSize": "Room name cannot be longer than 256 characters" }, "shortlink": { - "label": "Short Link", - "required": "The Short Link is required" + "label": "Shortlink", + "required": "The shortlink is required" }, "labels_required": "labels are required", "room-name-already-exist": "Room name already exists", "room-link-already-exist": "Room link already exists", - "add_room_success": "Room Added Successfully", + "add_room_success": "Room added Successfully", "view": "View", "copy": "Copy", @@ -305,14 +310,14 @@ "found_results": "Found {{count}} results", "search_all_rooms": "Search all my rooms", - "update_profile": "Update Profile", - "current_password": "Current Password", - "new_password": "New Password", - "confirm_new_password": "Re-Type New Password", - "change_avatar": "Change Avatar", + "update_profile": "Update profile", + "current_password": "Current password", + "new_password": "New password", + "confirm_new_password": "Re-type new password", + "change_avatar": "Change avatar", "edit_account_success": "Profile successfully updated", - "install_locked_title": "Install Process locked", + "install_locked_title": "Install process locked", "install_locked_text": "Sorry, you are not authorized to access this page, application already installed", "install_error_title": "Installer disabled", "install_error_text": "Installer must be enabled in the backend configuration. Please reload once updated", @@ -340,7 +345,7 @@ "guest_policy": "Guest Policy", "language": "Language", "layout": "Layout", - "learning_dashboard": "Learning Dashboard", + "learning_dashboard": "Learning Analytics Dashboard", "lock_settings": "Lock Settings", "presentation": "Presentation", "recording": "Recording", @@ -361,7 +366,7 @@ "banner_color": "Banner color", "use_avatars": "Use avatars", "custom_css": "Custom css", - "configurable": "Configurable", + "configurable": "Adjustable", "private_chat": "Private chat", "duration": "Duration", "maximum_participants": "Maximum participants", @@ -401,9 +406,21 @@ "no_data": "No Data", "wrong_file_name": "Wrong file name : File name must not contain special characters", - "email_not_exist": "User does not exist with this email", + "email_not_exist": "User with this email does not exist", "send_invitation.label": "Send registration invitation to users", "self_registration.label": "Allow self-registration", "administration": "Administration", - "edit_administration_settings_success": "Administration settings successfully updated" + "edit_administration_settings_success": "Administration settings successfully updated", + + "status_presets_active": "Active", + "status_presets_inactive": "Inactive", + "availability": "Availability", + "record": "Record", + + "askModerator": "Ask moderator", + "alwaysAccept": "Always accept", + + "alwaysDeny": "Always deny", + + "email-not-exist": "User does not exist with this email" } diff --git a/bbbeasy-frontend/src/locale/fr-FR.json b/bbbeasy-frontend/src/locale/fr-FR.json index 0cf4262d..e564f1f8 100644 --- a/bbbeasy-frontend/src/locale/fr-FR.json +++ b/bbbeasy-frontend/src/locale/fr-FR.json @@ -3,7 +3,7 @@ "term": "Conditions d'utilisation", "conditions": "Conditions générales", "room": "Salle", - "label": "Libellé", + "label": "Étiquette", "preset": { "label": "Préréglage", "required": "Préréglage obligatoire" @@ -12,18 +12,18 @@ "get started": "Commencer", "sign-up": "S'inscrire", "login": "Se connecter", - "reserved-rights": "Tous les droits sont réservés", + "reserved-rights": "Tous droits réservés", "sign-in-to-continue": "Connectez-vous pour continuer à utiliser notre application", - "remember": "Se souvenir de moi", + "remember": "Se rappeler de moi", "remember-password": "Mémoriser mon mot de passe", "reset-password": "Réinitialiser le mot de passe", "forgot-password": "Mot de passe oublié ?", "reset-here": "Réinitialiser ici", "login-now": "Se connecter maintenant", - "Dont-t-have-account": "Vous n'avez pas encore de compte", + "Dont-t-have-account": "Je n'ai pas de compte", "register-here": "S'inscrire ici", "change-password": "Modifier le mot de passe", - "back-to-login": "Revenir à l'identification", + "back-to-login": "Revenir à l'authentification", "email": { "label": "E-mail", "required": "L'e-mail est obligatoire", @@ -36,20 +36,26 @@ "invalid": "Mot de passe incorrect" }, "join-us": "Rejoignez-nous", - "register-now": "Inscrivez-vous dès maintenant et rejoignez notre communauté ", + "register-now": "Inscrivez-vous dès maintenant et rejoignez notre communauté", "username": { "label": "Nom d'utilisateur", "required": "Le nom d'utilisateur est obligatoire", "size": "Le nom d'utilisateur doit contenir au moins 4 caractères" }, + "fullname": { + "label": "Nom Complet", + "required": "Le Nom complet est obligatoire" + }, + + "empty-fullname": "Veuillez entrer le Nom complet pour rejoindre la réunion", "confirm-password": { "label": "Confirmation du mot de passe", - "required": "La confirmation du mot de passe est obligatoire ", + "required": "La confirmation du mot de passe est obligatoire", "size": "La confirmation du mot de passe doit contenir au moins 8 caractères" }, - "read-agreement": "J'ai lu l'accord", + "read-agreement": "J'ai lu l'accord et je l'approuve", "register": "S'inscrire maintenant", - "have-already-account": "Vous avez déjà un compte", + "have-already-account": "J'ai déjà un compte", "login-here": "Connectez-vous ici", "passwords-not-match": "Les deux mots de passe ne sont pas identiques", "user-could-not-logged": "L'utilisateur n'a pas pu se connecter", @@ -61,13 +67,12 @@ "username-already-exist": "Ce nom d’utilisateur existe déjà", "email-already-exist": "Cette adresse e-mail existe déjà", "welcome": "Bon retour", - "accept-agreement": "Accepter l'accord", + "accept-agreement": "Devrait accepter l'accord", "agree": "J'accepte les", "terms": "Conditions d'utilisation", "and": "et", "privacy-policy": "Politique de confidentialité", - "invalid_credentials": "Les informations d'identification fournies ne sont pas valides, réessayez.", - + "invalid_credentials": "Informations d'authentification invalides. Veuillez réessayer !", "attempts_exceeded": "Votre compte a été verrouillé car vous avez atteint le nombre maximum de tentatives de connexion non valides. Vous pouvez contacter l'administrateur ou ", "click_here": " cliquer ici", "email_instructions": "pour recevoir un e-mail contenant des instructions sur la façon de déverrouiller votre compte", @@ -83,24 +88,24 @@ "consumed": "Le jeton a été utilisé" }, "create-first-room": "Créer ma première salle", - "mark-labels": "Organiser avec des labels", - "assign-preset": "Appliquer un préréglage", - "give-it-name": "Nommez votre salles", - "create-easy-room": "Est-il facile de créer une salle ?", + "mark-labels": "Organises avec des étiquettes", + "assign-preset": "Appliques un préréglage", + "give-it-name": "Donnes un nom à ta salle", + "create-easy-room": "A quel point est-il facile de créer une salle ?", "previous": "Précédent", - "success_install": "Application installée !
Veuillez mettre à jour votre configuration backend pour commencer à utiliser l'application", - "start-using-hivelvet": "Commencez à utiliser Hivelvet", + "success_install": "Application installée !
Veuillez mettre à jour votre configuration backend pour commencer à utiliser l'application", + "start-using-bbbeasy": "Commencer à utiliser BBBEasy", "confirm": "Confirmer", "drop-logo-here": "Déposer votre logo ici", "branding": "Branding", "company": { - "label": "Compagnie", - "name": "Nom de la compagnie", - "required": "Le nom de la compagnie est obligatoire", + "label": "Organisation", + "name": "Nom de la l'organisation", + "required": "Le nom de l'organisation est obligatoire", "website": { - "label": "Site Web de la compagnie", - "required": "Le site Web de la compagnie est obligatoire", - "invalid": "Le site Web de la compagnie n'est pas une url valide" + "label": "Site Web de l'organisation", + "required": "Le site web de la l'organisation est obligatoire", + "invalid": "Le site web de l'organisation n'est pas une url valide" } }, "platform": { @@ -109,31 +114,31 @@ }, "terms_url": { "label": "URL des conditions d'utilisation", - "invalid": "L'url du terme d'utilisation n'est pas une url valide" + "invalid": "L'url des conditions d'utilisation n'est pas une url valide" }, "privacy_policy_url": { "label": "URL de la politique de confidentialité", "invalid": "L'url de la politique de confidentialité n'est pas une url valide" }, "bigbluebutton_rooms_settings": "Paramètres des salles BigBlueButton", - "brand_color": "Couleur de la marque", + "brand_color": "Couleur principale", "default_font_size": "Taille de police par défaut", - "border_radius": "Rayon de la bordure", - "wireframe_style": "Style filaire", + "border_radius": "Bord arrondi", + "wireframe_style": "Style wireframe", "create-administrator-account": "Créer un compte administrateur", "support": "Support", - "zcaleright": "Zcaleright", + "zcaleright": "ZcaleRight", "flexible-configuration": "Configuration flexible", - "recordings-management": "Gestion d'enregistrements", + "recordings-management": "Gestion des enregistrements", "full-brandings": "Branding complet", "personal-rooms": "Salles personnelles", "not_found": "Désolé, la page que vous avez visitée n'existe pas.", "back-home": "Retour à la page d'accueil", "rooms": "Salles", - "labels": "Labels", + "labels": "Étiquettes", "presets": "Préréglages", "settings": "Paramètres", - "company_branding": "Compagnie & Branding", + "company_branding": "Organisation & Branding", "users": "Utilisateurs", "roles": "Rôles", "bigbluebutton": "BigBlueButton", @@ -146,7 +151,7 @@ "finish": "Terminer", "customize_configuration": "Cliquez sur chaque bouton pour personnaliser le groupe de configuration et le survolez pour obtenir son résumé", "understand": "Je comprends, merci !", - "welcome_platformname": "Bienvenue à {{platformName}}", + "welcome_platformname": "Bienvenue sur {{platformName}}", "create_customizable_rooms": "Créer des salles entièrement personnalisables pour", "log-into-account": "Connectez-vous à votre compte", "completed_registration": "Inscription terminée avec succès", @@ -163,10 +168,10 @@ "user_dropdown": { "profile": "Profil", "logout": "Déconnexion", - "warning_notification": "BigBlueButton API n'est pas configurée sur cette instance. Veuillez contacter votre administrateur." + "warning_notification": "L'API BigBlueButton n'est pas configurée sur cette instance. Veuillez contacter votre administrateur." }, "name_col": "Nom", - "users_col": "N◦ Utilisateurs", + "users_col": "N° d'utilisateurs", "nb_rooms_col": "N° de Salles", "actions_col": "Actions", "new_role": "Nouveau rôle", @@ -204,9 +209,9 @@ "username_col": "Nom d'utilisateur", "email_col": "E-mail", "role_col": "Rôle", - "status_col": "Status", + "status_col": "État", "new_user": "Nouvel utilisateur", - "new_label": "Nouvel libellé", + "new_label": "Nouvelle étiquette", "description_col": "Description", "role": { "label": "Rôle", @@ -214,8 +219,8 @@ "placeholder": "Sélectionner un rôle" }, "status": { - "label": "Status", - "required": "Veuillez sélectionner une status", + "label": "État", + "required": "Veuillez sélectionner un état", "placeholder": "Sélectionner une status" }, "edit": "Éditer", @@ -224,17 +229,17 @@ "delete_user_confirm": "Êtes-vous sûr de vouloir supprimer cet utilisateur ?", "delete_user_success": "Utilisateur supprimé avec succès", "label_name": { - "size": "Le nom du libellé doit comporter au moins un caractère", - "maxSize": "Le nom du libellé ne peut pas dépasser 32 caractères" + "size": "Le nom de l'étiquette doit comporter au moins un caractère", + "maxSize": "Le nom de l'étiquette ne peut pas contenir plus de 32 caractères" }, - "label-name-already-exist": "Le nom du libellé existe déjà", - "label-color-already-exist": "Le couleur du libellé existe déjà", - "delete_label_confirm": "Êtes-vous sûr de vouloir supprimer cet libellé ?", - "delete_label_title": "Voulez-vous supprimer ce libellé ?", - "delete_label_content": "Ce label est déjà attribué à certaines salles, si vous confirmez, il ne leur sera plus attribué", - "delete_label_success": "Libellé supprimée avec succès", - "add_label_success": "Libellé ajoutée avec succès", - "edit_label_success": "Libellé mis à jour avec succès", + "label-name-already-exist": "Ce nom d'étiquette existe déjà", + "label-color-already-exist": "La couleur de l'étiquette existe déjà", + "delete_label_confirm": "Êtes-vous sûr de vouloir supprimer cette étiquette ?", + "delete_label_title": "Voulez-vous supprimer cette étiquette ?", + "delete_label_content": "Cette étiquette est déjà attribuée à certaines salles, si vous confirmez, elle ne leur sera plus attribuée", + "delete_label_success": "Étiquette supprimée avec succès", + "add_label_success": "Étiquette ajoutée avec succès", + "edit_label_success": "Étiquette mise à jour avec succès", "active": "Actif", "inactive": "Inactif", "pending": "En attente", @@ -248,37 +253,36 @@ "no_changes": "Aucune modification n'a été effectuée", "new_preset": "Nouveau préréglage", "preset_name": { - "maxSize": "Le nom du préréglage ne peut pas dépasser 64 caractères" + "maxSize": "Le nom du préréglage ne peut pas dépasser les 64 caractères" }, - "upload_img": "Télécharger jpg, jpeg, png uniquement", + "upload_img": "Charger jpg, jpeg, png uniquement", "search_preset": "Chercher préréglage", "rename": "Renommer", "delete_preset_confirm": "Êtes-vous sûr de vouloir supprimer ce préréglage ?", "delete_preset_title": "Voulez-vous supprimer ce préréglage ?", "delete_preset_content": "Ce préréglage est déjà attribué à certaines salles, si vous confirmez, toutes les salles attribuées passeront au préréglage par défaut", - "delete_preset_success": "préréglage supprimé avec succès", - "add_preset_success": "préréglage ajouté avec succès", - "edit_preset_success": "préréglage mis à jour avec succès", - "copy_preset_success": "Préréglage copié avec succès", - - "edit_settings_success": "Paramètres de compagnie et de branding mis à jour avec succès", + "delete_preset_success": "Préaglage supprimé avec succès", + "add_preset_success": "Préaglage ajouté avec succès", + "edit_preset_success": "Préaglage mis à jour avec succès", + "copy_preset_success": "Préaglage copié avec succès", + "edit_settings_success": "Paramètres d'organisation et de branding mis à jour avec succès", "edit_preset_settings_success": "Paramètres des salles BigBlueButton mis à jour avec succès", "new_room": "Nouvelle Salle", "room_name": { "minSize": "Le nom de la salle doit comporter au moins 4 caractères", - "maxSize": "Le nom de la salle ne peut pas dépasser 256 caractères" + "maxSize": "Le nom de la salle ne peut pas dépasser les 256 caractères" }, "shortlink": { "label": "Lien", "required": "Le lien est obligatoire" }, - "labels_required": "Les labels sont obligatoires", + "labels_required": "les étiquettes sont obligatoires", "room-name-already-exist": "Le nom du salle existe déjà", "room-link-already-exist": "Le lien du salle existe déjà", "add_room_success": "Salle ajoutée avec succès", "view": "Voir", "copy": "Copier", - "copy_text": "Copier le text", + "copy_text": "Copier le texte", "copied": "Copié", "facebook_share": "Partager sur facebook", "twitter_share": "Partager sur Twitter", @@ -297,19 +301,18 @@ "delete_room_confirm": "Êtes-vous sûr de vouloir supprimer cette salle ?", "delete_room_success": "Salle a été supprimée avec succès", "edit_room_success": "Salle a été mis a jour avec succès", - "found_results": "{{count}} Résultats trouvés", + "found_results": "{{count}} résultats trouvés", "search_all_rooms": "Rechercher toutes mes salles", "update_profile": "Mettre à jour le profil", "current_password": "Mot de passe Actuel", - "new_password": "Nouveau Mot de passe", - "confirm_new_password": "Retaper le Nouveau Mot de passe", + "new_password": "Nouveau mot de passe", + "confirm_new_password": "Ressaisir le nouveau mot de passe", "change_avatar": "Changer Avatar", "edit_account_success": "Profil mis à jour avec succès", "install_locked_title": "Processus d'installation verrouillé", "install_locked_text": "Désolé, vous n'êtes pas autorisé à accéder à cette page, application déjà installée", - "install_error_title": "Processus d'installation est inactif", - "install_error_text": "Processus d'installation doit etre actif dans la configuration backend.Veuillez recharger une fois mis à jour", - + "install_error_title": "Installeur désactivé", + "install_error_text": "L'installateur doit être activé dans la configuration du backend. Veuillez recharger une fois mis à jour", "recordings": "Enregistrements", "date_col": "Date", "duration_col": "Durée", @@ -326,14 +329,13 @@ "edit_recording_success": "Enregistrement mis à jour avec succès", "delete_recording_confirm": "Êtes-vous sûr de vouloir supprimer cet enregistrement ?", "delete_recording_success": "Enregistrement supprimé avec succès", - "audio": "Audio", - "breakout_rooms": "Salles de sous-commission", + "breakout_rooms": "Groupes de travail", "general": "Général", - "guest_policy": "Politique d'invité", + "guest_policy": "Politique des visiteurs", "language": "Langue", - "layout": "Mise en page", - "learning_dashboard": "Tableau de bord d'apprentissage", + "layout": "Disposition", + "learning_dashboard": "Tableau de bord d'activité des participants", "lock_settings": "Paramètres de verrouillage", "presentation": "Présentation", "recording": "Enregistrement", @@ -342,61 +344,67 @@ "ux": "Expérience utilisateur", "webcams": "Webcams", "whiteboard": "Tableau blanc", - - "users_join_muted": "Les utilisateurs rejoignent en sourdine", - "moderators_allowed_to_unmute_users": "Les modérateurs sont autorisés à réactiver les utilisateurs", + "users_join_muted": "Micro silencieux", + "moderators_allowed_to_unmute_users": "Modérateurs autorisés à réactiver le son des utilisateurs", "auto_join": "Rejoindre automatiquement", - "listen_only_enabled": "Écoute uniquement activée", - "skip_echo_test": "Ignorer le test d'écho", + "listen_only_enabled": "Écouter seulement activé", + "skip_echo_test": "Passer le test echo", "title": "Titre", "logo": "Logo", - "banner_text": "Texte de la bannière", + "banner_text": "Text de bannière", "banner_color": "Couleur de la bannière", - "use_avatars": "Utiliser des avatars", + "use_avatars": "Utiliser les avatars", "custom_css": "CSS personnalisé", - "configurable": "Configurable", - "private_chat": "Chat privé", + "configurable": "Ajustable", + "private_chat": "Discussion privée", "duration": "Durée", - "maximum_participants": "Participants maximum", - "anyone_can_start": "Tout le monde peut commencer", - "open_for_everyone": "Ouvert pour tout le monde", - "all_join_as_moderator": "Tous rejoignent en tant que modérateur", - "logged_in_users_only": "Utilisateurs connectés uniquement", + "maximum_participants": "Nombre max. de participants", + "anyone_can_start": "N'importe qui peut commencer", + "open_for_everyone": "Ouverte à tous", + "all_join_as_moderator": "Tous les membres en tant que modérateurs", + "logged_in_users_only": "Utilisateurs connectés seulement", "policy": "Politique", "default_language": "Langue par défaut", "participants": "Participants", - "chat": "Chat", + "chat": "Discussion", "navigation_bar": "Barre de navigation", - "actions_bar": "Barre d'actions", + "actions_bar": "Barre d’actions", "cleanup_delay": "Délai de nettoyage", "microphones": "Microphones", - "public_chat": "Chat public", + "public_chat": "Discussion publique", "shared_notes": "Notes partagées", - "pre_upload": "Pré-upload", + "pre_upload": "Pré-envoi", "auto_start": "Démarrage automatique", - "allow_start_stop": "Autoriser l'arrêt du démarrage", - "password_for_attendee": "Mot de passe pour le participant", - "password_for_moderator": "Mot de passe pour le modérateur", + "allow_start_stop": "Autoriser le démarrage et l'arrêt", + "password_for_attendee": "Mot de passe du participant", + "password_for_moderator": "Mot de passe du modérateur", "keyboard_shortcuts": "Raccourcis clavier", - "ask_for_feedback": "Demander un avis", + "ask_for_feedback": "Demander l'avis sur l'expérience", "visible_for_moderator_only": "Visible uniquement pour le modérateur", - "moderator_allowed_camera_eject": "Le modérateur a autorisé l'éjection de la caméra", + "moderator_allowed_camera_eject": "Éjection de caméra autorisée par le modérateur", "auto_share": "Partage automatique", - "skip_preview": "Ignorer l'aperçu", - "multi_user_pen_only": "Stylo multi-utilisateur uniquement", - "presenter_tools": "Outils de présentation", + "skip_preview": "Passer l'aperçu", + "multi_user_pen_only": "Stylo multi-utilisateurs uniquement", + "presenter_tools": "Outils du présentateur", "multi_user_tools": "Outils multi-utilisateurs", "pool_name": "Nom du pool", - - "no_recordings": "Aucun Enregistrement", - "no_rooms": "Aucune Salle", - "no_presets": "Aucun Préréglage", - "no_labels": "Aucun Label", + "no_recordings": "Pas d’enregistrements", + "no_rooms": "Aucune salle", + "no_presets": "Aucun préréglage", + "no_labels": "Aucune étiquette", "no_data": "Aucune donnée", - - "email_not_exist": "L'utilisateur n'existe pas avec cet e-mail", - "send_invitation.label": "Envoyer une invitation d'inscription aux utilisateurs", - "self_registration.label": "Autoriser l'auto-inscription", + "wrong_file_name": "Mauvais nom de fichier : Le nom du fichier ne doit pas contenir de caractères spéciaux", + "email_not_exist": "L'utilisateur avec cette adresse e-mail n'existe pas", + "send_invitation.label": "Envoyer l'invitation à l'inscription aux utilisateurs", + "self_registration.label": "Auto-inscription autorisée", "administration": "Administration", - "edit_administration_settings_success": "Paramètres de l'administration mis à jour avec succès" + "edit_administration_settings_success": "Paramètres d'administration mis à jour avec succès", + "status_presets_active": "Actif", + "status_presets_inactive": "Inactif", + "availability": "Disponibilité", + "record": "Enregistrer", + + "askModerator": "Demander au modérateur", + "alwaysAccept": "Toujours accepter", + "alwaysDeny": "Toujours refuser" } diff --git a/bbbeasy-frontend/src/routing/config.tsx b/bbbeasy-frontend/src/routing/config.tsx index cbd22456..db496d85 100644 --- a/bbbeasy-frontend/src/routing/config.tsx +++ b/bbbeasy-frontend/src/routing/config.tsx @@ -82,7 +82,7 @@ export const webRoutes: IRoute[] = [ { path: '/r/:shortlink', element: , - private: true, + private: false, }, { path: '/recordings', diff --git a/bbbeasy-frontend/src/services/rooms.service.ts b/bbbeasy-frontend/src/services/rooms.service.ts index 87ac7480..cd78efe1 100644 --- a/bbbeasy-frontend/src/services/rooms.service.ts +++ b/bbbeasy-frontend/src/services/rooms.service.ts @@ -40,8 +40,10 @@ class RoomsService { delete_room(id: number) { return axiosInstance.delete(apiRoutes.DELETE_ROOM_URL + id); } - start_room(id: number) { - return axiosInstance.post(apiRoutes.START_ROOM_URL + id); + start_room(id: number, fullname) { + return axiosInstance.post(apiRoutes.START_ROOM_URL + id, { + fullname, + }); } getRoomByLink(link: string) { return axiosInstance.get(apiRoutes.GET_ROOM_BY_LINK + link); diff --git a/bbbeasy-frontend/src/types/GuestPolicyType.ts b/bbbeasy-frontend/src/types/GuestPolicyType.ts new file mode 100644 index 00000000..ea61c2dc --- /dev/null +++ b/bbbeasy-frontend/src/types/GuestPolicyType.ts @@ -0,0 +1,23 @@ +/** + * BBBEasy open source platform - https://riadvice.tn/ + * + * Copyright (c) 2022-2023 RIADVICE SUARL and by respective authors (see below). + * + * This program is free software; you can redistribute it and/or modify it under the + * terms of the GNU Lesser General Public License as published by the Free Software + * Foundation; either version 3.0 of the License, or (at your option) any later + * version. + * + * BBBEasy is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A + * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License along + * with BBBEasy; if not, see . + */ + +export type GuestPolicyType = { + name: string; + key: string; + value: string; +}; diff --git a/bbbeasy-frontend/yarn.lock b/bbbeasy-frontend/yarn.lock index a9530988..0a8849ae 100644 --- a/bbbeasy-frontend/yarn.lock +++ b/bbbeasy-frontend/yarn.lock @@ -3026,7 +3026,25 @@ __metadata: languageName: node linkType: hard -"@rc-component/trigger@npm:^1.0.4, @rc-component/trigger@npm:^1.13.0, @rc-component/trigger@npm:^1.3.6, @rc-component/trigger@npm:^1.5.0, @rc-component/trigger@npm:^1.6.2, @rc-component/trigger@npm:^1.7.0": +"@rc-component/trigger@npm:^1.0.4, @rc-component/trigger@npm:^1.13.0, @rc-component/trigger@npm:^1.3.6, @rc-component/trigger@npm:^1.6.2, @rc-component/trigger@npm:^1.7.0": + version: 1.13.6 + resolution: "@rc-component/trigger@npm:1.13.6" + dependencies: + "@babel/runtime": ^7.18.3 + "@rc-component/portal": ^1.1.0 + classnames: ^2.3.2 + rc-align: ^4.0.0 + rc-motion: ^2.0.0 + rc-resize-observer: ^1.3.1 + rc-util: ^5.33.0 + peerDependencies: + react: ">=16.9.0" + react-dom: ">=16.9.0" + checksum: a4dab5334408ae3dd55d05ac34d625238332bb00261d15afa4a5fc204bf08f31354ea158c7484cc4090866224b438ce60f18d87c720cc810a86986d217d301f4 + languageName: node + linkType: hard + +"@rc-component/trigger@npm:^1.5.0": version: 1.13.5 resolution: "@rc-component/trigger@npm:1.13.5" dependencies: @@ -4634,8 +4652,8 @@ __metadata: linkType: hard "antd@npm:^5.6.1": - version: 5.6.1 - resolution: "antd@npm:5.6.1" + version: 5.6.2 + resolution: "antd@npm:5.6.2" dependencies: "@ant-design/colors": ^7.0.0 "@ant-design/cssinjs": ^1.10.1 @@ -4652,7 +4670,7 @@ __metadata: dayjs: ^1.11.1 qrcode.react: ^3.1.0 rc-cascader: ~3.12.0 - rc-checkbox: ~3.0.0 + rc-checkbox: ~3.1.0 rc-collapse: ~3.7.0 rc-dialog: ~9.1.0 rc-drawer: ~6.2.0 @@ -4666,7 +4684,7 @@ __metadata: rc-motion: ^2.7.3 rc-notification: ~5.0.4 rc-pagination: ~3.5.0 - rc-picker: ~3.8.0 + rc-picker: ~3.8.2 rc-progress: ~3.4.1 rc-rate: ~2.12.0 rc-resize-observer: ^1.2.0 @@ -4688,7 +4706,7 @@ __metadata: peerDependencies: react: ">=16.9.0" react-dom: ">=16.9.0" - checksum: 8ee8345375be69fc4b242ecb46e72683be361e102fe306717adcd66b0d208cc82bdf0cb60ed1b557bf3611857e5516d2f69f79e408f262783599f6e36c8fe513 + checksum: ac2e73a53bbb870310ea384e8b7cb178d4326d76637f3e887da5819b915b84ef42790400116a3d6cefed8d5fdc5e3bacc051c55f97eec238af50245a6fa015b0 languageName: node linkType: hard @@ -5412,7 +5430,7 @@ __metadata: craco-plugin-react-hot-reload: ^0.1.0 cypress: ^10.11.0 dayjs: ^1.11.8 - dotenv: ^16.1.4 + dotenv: ^16.3.1 dotenv-cra: ^3.0.3 eslint: ^8.42.0 eslint-config-prettier: ^8.8.0 @@ -5437,7 +5455,7 @@ __metadata: pm2: ^5.3.0 prettier: ^2.8.8 rc-select: ^14.5.2 - rc-util: ^5.33.0 + rc-util: ^5.33.1 react: ^17.0.2 react-color: ^2.19.3 react-copy-to-clipboard: ^5.1.0 @@ -5448,7 +5466,7 @@ __metadata: react-i18next: ^12.3.1 react-images-uploading: ^3.1.7 react-intl: ^6.4.4 - react-router-dom: ^6.12.1 + react-router-dom: ^6.13.0 react-scripts: ^5.0.1 react-share: ^4.4.1 react-styleguidist: ^13.1.1 @@ -7642,10 +7660,10 @@ __metadata: languageName: node linkType: hard -"dotenv@npm:^16.1.4": - version: 16.1.4 - resolution: "dotenv@npm:16.1.4" - checksum: c1b2e13df4d374a6a29e134c56c7b040ba20500677fe8b9939ea654f3b3badb9aaa0b172e40e4dfa1233a4177dbb8fb79d84cc79a50ac9c9641fe2ad98c14876 +"dotenv@npm:^16.3.1": + version: 16.3.1 + resolution: "dotenv@npm:16.3.1" + checksum: 15d75e7279018f4bafd0ee9706593dd14455ddb71b3bcba9c52574460b7ccaf67d5cf8b2c08a5af1a9da6db36c956a04a1192b101ee102a3e0cf8817bbcf3dfd languageName: node linkType: hard @@ -15446,9 +15464,9 @@ __metadata: languageName: node linkType: hard -"rc-checkbox@npm:~3.0.0": - version: 3.0.1 - resolution: "rc-checkbox@npm:3.0.1" +"rc-checkbox@npm:~3.1.0": + version: 3.1.0 + resolution: "rc-checkbox@npm:3.1.0" dependencies: "@babel/runtime": ^7.10.1 classnames: ^2.3.2 @@ -15456,7 +15474,7 @@ __metadata: peerDependencies: react: ">=16.9.0" react-dom: ">=16.9.0" - checksum: 046b138e95c1b77fb0fb0d06ef3cdb00e34ae551adfe0a0b886cd0fb0ee34a98d1bef43a2c0122e6731862c2ec031d0d2fff9b4ea6c36857777532ad29115265 + checksum: f15dd3e3e3120567b633392e37c6d904f2b3c32eb752f4197231b6d79bfa257bde9cd32616ad08c0ad5b053d7b197c9e0684479053b4dea384e466ab53f5c7b4 languageName: node linkType: hard @@ -15523,8 +15541,8 @@ __metadata: linkType: hard "rc-field-form@npm:~1.32.0": - version: 1.32.1 - resolution: "rc-field-form@npm:1.32.1" + version: 1.32.2 + resolution: "rc-field-form@npm:1.32.2" dependencies: "@babel/runtime": ^7.18.0 async-validator: ^4.1.0 @@ -15532,7 +15550,7 @@ __metadata: peerDependencies: react: ">=16.9.0" react-dom: ">=16.9.0" - checksum: ea358cd8cf3954d17ad98447d517799c9b2fd060035746d2df2743c06130da3951e2933998ea6a801ab63470e2359809dac26153a8512b5ab08c4f910d18eb98 + checksum: c74cd7fe3a5d14f8bfbe3fc2a77a2d0d055c0450a685aadfe4b5ab3448892ea2ce834f362e305219cf2caef4d1c07e285fc5c1d4787922e1bbbee6a632f8b5ae languageName: node linkType: hard @@ -15665,7 +15683,7 @@ __metadata: languageName: node linkType: hard -"rc-overflow@npm:^1.0.0, rc-overflow@npm:^1.2.8": +"rc-overflow@npm:^1.0.0": version: 1.3.0 resolution: "rc-overflow@npm:1.3.0" dependencies: @@ -15680,6 +15698,21 @@ __metadata: languageName: node linkType: hard +"rc-overflow@npm:^1.2.8": + version: 1.3.1 + resolution: "rc-overflow@npm:1.3.1" + dependencies: + "@babel/runtime": ^7.11.1 + classnames: ^2.2.1 + rc-resize-observer: ^1.0.0 + rc-util: ^5.19.2 + peerDependencies: + react: ">=16.9.0" + react-dom: ">=16.9.0" + checksum: 1573dcb2509634ca3eea8f45575fd80128b3da9395af64e2ecf0059a8cae6f29e07a8583935682b837f38db0d533b5cd68d75b4918a75f0d0cd10bdbf07db575 + languageName: node + linkType: hard + "rc-pagination@npm:~3.5.0": version: 3.5.0 resolution: "rc-pagination@npm:3.5.0" @@ -15694,9 +15727,9 @@ __metadata: languageName: node linkType: hard -"rc-picker@npm:~3.8.0": - version: 3.8.1 - resolution: "rc-picker@npm:3.8.1" +"rc-picker@npm:~3.8.2": + version: 3.8.2 + resolution: "rc-picker@npm:3.8.2" dependencies: "@babel/runtime": ^7.10.1 "@rc-component/trigger": ^1.5.0 @@ -15718,7 +15751,7 @@ __metadata: optional: true moment: optional: true - checksum: 6e8c4fc31661c14160cefd2a15175128d9eb49b8ec89c84736d5441653cbcdea884dd57b316b567f0ac08a6b2fdf485c198e55fec07c3866700524286a617b7b + checksum: cc1d23a0d8e4bdce2ca480969be2363d68731cdd0f22e440422f949dfc66d09a5951298444413d5d9d61b1562493d54a365b58716e1d49ec645f7d6d7d011707 languageName: node linkType: hard @@ -15921,8 +15954,8 @@ __metadata: linkType: hard "rc-tree@npm:~5.7.0, rc-tree@npm:~5.7.4": - version: 5.7.4 - resolution: "rc-tree@npm:5.7.4" + version: 5.7.6 + resolution: "rc-tree@npm:5.7.6" dependencies: "@babel/runtime": ^7.10.1 classnames: 2.x @@ -15932,7 +15965,7 @@ __metadata: peerDependencies: react: "*" react-dom: "*" - checksum: c478d4d41b31e9fcb0f3be7853800b3f3280e315e4ad3f0eab2587e6d4e79d4c8d0520fceaa48e6e6b9de8fb710624b1702866bd9711d1ed2faed697fb0711d6 + checksum: f6f4e8c3799dd106e492967cc4dc96aa23bc399eb0a8af9699b88db75dba9689bc846b236eae06a6e6af375cbc33731782ff8436ddaaeb2574569f76e653646f languageName: node linkType: hard @@ -15963,7 +15996,7 @@ __metadata: languageName: node linkType: hard -"rc-util@npm:^5.0.1, rc-util@npm:^5.0.6, rc-util@npm:^5.15.0, rc-util@npm:^5.16.0, rc-util@npm:^5.16.1, rc-util@npm:^5.17.0, rc-util@npm:^5.18.1, rc-util@npm:^5.19.2, rc-util@npm:^5.2.0, rc-util@npm:^5.20.1, rc-util@npm:^5.21.0, rc-util@npm:^5.21.2, rc-util@npm:^5.22.5, rc-util@npm:^5.24.4, rc-util@npm:^5.24.5, rc-util@npm:^5.25.2, rc-util@npm:^5.26.0, rc-util@npm:^5.27.0, rc-util@npm:^5.27.1, rc-util@npm:^5.28.0, rc-util@npm:^5.30.0, rc-util@npm:^5.31.1, rc-util@npm:^5.32.0, rc-util@npm:^5.32.2, rc-util@npm:^5.33.0, rc-util@npm:^5.6.1": +"rc-util@npm:^5.0.1, rc-util@npm:^5.0.6, rc-util@npm:^5.15.0, rc-util@npm:^5.16.1, rc-util@npm:^5.19.2, rc-util@npm:^5.21.0, rc-util@npm:^5.24.4, rc-util@npm:^5.24.5, rc-util@npm:^5.26.0, rc-util@npm:^5.27.0, rc-util@npm:^5.31.1, rc-util@npm:^5.33.0": version: 5.33.0 resolution: "rc-util@npm:5.33.0" dependencies: @@ -15976,6 +16009,19 @@ __metadata: languageName: node linkType: hard +"rc-util@npm:^5.16.0, rc-util@npm:^5.17.0, rc-util@npm:^5.18.1, rc-util@npm:^5.2.0, rc-util@npm:^5.20.1, rc-util@npm:^5.21.2, rc-util@npm:^5.22.5, rc-util@npm:^5.25.2, rc-util@npm:^5.27.1, rc-util@npm:^5.28.0, rc-util@npm:^5.30.0, rc-util@npm:^5.32.0, rc-util@npm:^5.32.2, rc-util@npm:^5.33.1, rc-util@npm:^5.6.1": + version: 5.33.1 + resolution: "rc-util@npm:5.33.1" + dependencies: + "@babel/runtime": ^7.18.3 + react-is: ^16.12.0 + peerDependencies: + react: ">=16.9.0" + react-dom: ">=16.9.0" + checksum: 5b99edb25e9348be33976c2b83bf1d9b52558824c25f36b5e88ba23a215df3bdeb51a79ca196bcf68f8f05cd9165f6b7fd24cf2d052efb47d4bb02a48b54db89 + languageName: node + linkType: hard + "rc-virtual-list@npm:^3.5.1, rc-virtual-list@npm:^3.5.2": version: 3.5.2 resolution: "rc-virtual-list@npm:3.5.2" @@ -16299,27 +16345,27 @@ __metadata: languageName: node linkType: hard -"react-router-dom@npm:^6.12.1": - version: 6.12.1 - resolution: "react-router-dom@npm:6.12.1" +"react-router-dom@npm:^6.13.0": + version: 6.13.0 + resolution: "react-router-dom@npm:6.13.0" dependencies: "@remix-run/router": 1.6.3 - react-router: 6.12.1 + react-router: 6.13.0 peerDependencies: react: ">=16.8" react-dom: ">=16.8" - checksum: 885528986b6e32bde0cc6ff1f318186ce6931cf4a2a36511fe12eafb380576b448a991d43fe473dbb9bc97bb7efa0c87ac179a7470345a1d3534a34b65578677 + checksum: f51131063c2d5e127b6b3f3f813c6d4988d0f37694a06697dc9d4a4d9d3825e2a4487ec9b81a1d356eb269018814d884ffc2e3d9ff056a46ae59c99c9e7e1086 languageName: node linkType: hard -"react-router@npm:6.12.1": - version: 6.12.1 - resolution: "react-router@npm:6.12.1" +"react-router@npm:6.13.0": + version: 6.13.0 + resolution: "react-router@npm:6.13.0" dependencies: "@remix-run/router": 1.6.3 peerDependencies: react: ">=16.8" - checksum: a23a0f2e6635eba19aec8d50b9126f61663d1e6ee6e69d6b2ca6e5dd678496b54d925f0d86a375270646da11cc12be66ac5e6ebf73962957af91ac828b63d10b + checksum: 31a187005d05e063c59324564a283cd28052eaf848ad446c87658f4fc48fa9543329fe8a14d7be14d9bbf62410d383f8cf1cf13898a838bf9c1e3201fe93384c languageName: node linkType: hard @@ -17335,11 +17381,11 @@ __metadata: linkType: hard "semver@npm:^5.3.0, semver@npm:^5.5.0, semver@npm:^5.6.0": - version: 5.7.1 - resolution: "semver@npm:5.7.1" + version: 5.7.2 + resolution: "semver@npm:5.7.2" bin: - semver: ./bin/semver - checksum: 57fd0acfd0bac382ee87cd52cd0aaa5af086a7dc8d60379dfe65fea491fb2489b6016400813930ecd61fd0952dae75c115287a1b16c234b1550887117744dfaf + semver: bin/semver + checksum: fb4ab5e0dd1c22ce0c937ea390b4a822147a9c53dbd2a9a0132f12fe382902beef4fbf12cf51bb955248d8d15874ce8cd89532569756384f994309825f10b686 languageName: node linkType: hard @@ -18964,11 +19010,11 @@ __metadata: "typescript@patch:typescript@^4.9.5#~builtin": version: 4.9.5 - resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=289587" + resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin::version=4.9.5&hash=23ec76" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 1f8f3b6aaea19f0f67cba79057674ba580438a7db55057eb89cc06950483c5d632115c14077f6663ea76fd09fce3c190e6414bb98582ec80aa5a4eaf345d5b68 + checksum: ab417a2f398380c90a6cf5a5f74badd17866adf57f1165617d6a551f059c3ba0a3e4da0d147b3ac5681db9ac76a303c5876394b13b3de75fdd5b1eaa06181c9d languageName: node linkType: hard @@ -19864,9 +19910,9 @@ __metadata: linkType: hard "word-wrap@npm:^1.2.3, word-wrap@npm:~1.2.3": - version: 1.2.3 - resolution: "word-wrap@npm:1.2.3" - checksum: 30b48f91fcf12106ed3186ae4fa86a6a1842416df425be7b60485de14bec665a54a68e4b5156647dec3a70f25e84d270ca8bc8cd23182ed095f5c7206a938c1f + version: 1.2.4 + resolution: "word-wrap@npm:1.2.4" + checksum: 8f1f2e0a397c0e074ca225ba9f67baa23f99293bc064e31355d426ae91b8b3f6b5f6c1fc9ae5e9141178bb362d563f55e62fd8d5c31f2a77e3ade56cb3e35bd1 languageName: node linkType: hard diff --git a/install.sh b/install.sh index 430d5469..d2481c5c 100755 --- a/install.sh +++ b/install.sh @@ -51,7 +51,15 @@ APP_DIR=$BASEDIR/../ # Git tag, commits ahead & commit id under format '0.4-160-g3bb256c' # GIT_VERSION=$(git --git-dir="$BASEDIR/../.git" describe --tags --always HEAD) -echo "BBBEASY - INSTALL SCRIPT" +echo "BBBeasy - INSTALL SCRIPT" + +# Check for the OS +source /etc/lsb-release + +if [[ "$DISTRIB_ID" != "Ubuntu" && "$DISTRIB_RELEASE" != "22.04" ]]; then + echo "Ubuntu 22.04 LTS (jammy) is required to install BBBeasy - https://releases.ubuntu.com/jammy/" + exit +fi # Setup default values HV_HOST=$(hostname) @@ -114,8 +122,14 @@ install_docker_deps() { apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin } +install_common_deps() { + echo "Install basic dependencies" + apt-get install -y git gcc g++ make curl software-properties-common +} + install_deps() { cd /tmp + echo "adding ondrej/php repository" add-apt-repository -y ppa:ondrej/php @@ -131,9 +145,6 @@ install_deps() { apt-get update apt-get upgrade -y - echo "Install basic dependencies" - apt-get install -y git gcc g++ make - echo "Install ubuntu tools" apt-get install -y wget gnupg2 lsb-release curl zip unzip bc ntp @@ -277,10 +288,12 @@ install() { read_options "$@" if [[ "$INSTALL_TYPE" == "docker" ]]; then echo "-- Installing docker version --" + install_common_deps install_docker_deps install_docker elif [[ "$INSTALL_TYPE" == "git" ]]; then echo "-- Installing git version --" + install_common_deps install_deps service nginx stop generate_ssl From c02ea36ecd4732e413996eedcf4824608905f4b5 Mon Sep 17 00:00:00 2001 From: Hana Zaraa Date: Thu, 24 Aug 2023 11:24:37 +0100 Subject: [PATCH 4/5] display the profile dropdown in header && decrease the delete button size of avatar --- bbbeasy-frontend/src/components/Profile.tsx | 10 ++++++---- bbbeasy-frontend/src/components/layout/AppHeader.tsx | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/bbbeasy-frontend/src/components/Profile.tsx b/bbbeasy-frontend/src/components/Profile.tsx index d2177fba..52a45904 100644 --- a/bbbeasy-frontend/src/components/Profile.tsx +++ b/bbbeasy-frontend/src/components/Profile.tsx @@ -16,7 +16,7 @@ * with BBBEasy; if not, see . */ -import React from 'react'; +import React from 'react'; import { Trans, withTranslation } from 'react-i18next'; import { t } from 'i18next'; import EN_US from '../locale/en-US.json'; @@ -82,7 +82,7 @@ const Profile = () => { console.error(error); }); }; - + const handleUpdate = (formValues: formType) => { setErrors(''); @@ -106,10 +106,12 @@ const Profile = () => { const user = response.data.user; console.log(user); if (user) { + //remove passwords from form accountForm.resetFields(['current_password', 'new_password', 'confirm_new_password']); //update LS AuthService.updateCurrentUser(user.username, user.email, user.avatar); + Notifications.openNotificationWithIcon('success', t('edit_account_success')); } }) @@ -207,7 +209,7 @@ const Profile = () => { height={130} /> - ) : currentUser.avatar != null ? ( + ) : currentUser.avatar != null ? (
{ />
- handleRemoveAvatar()} /> + handleRemoveAvatar()} />
diff --git a/bbbeasy-frontend/src/components/layout/AppHeader.tsx b/bbbeasy-frontend/src/components/layout/AppHeader.tsx index 0b0c95e7..d8e2bf13 100644 --- a/bbbeasy-frontend/src/components/layout/AppHeader.tsx +++ b/bbbeasy-frontend/src/components/layout/AppHeader.tsx @@ -258,7 +258,7 @@ const AppHeader = () => { {' '} ) : ( - <> + - + )} {dropdownLang} From 0b303cb0f50e93f2f0a6fb2390b9a5484279371a Mon Sep 17 00:00:00 2001 From: Hana Zaraa Date: Thu, 24 Aug 2023 11:25:33 +0100 Subject: [PATCH 5/5] format code --- bbbeasy-frontend/src/components/Profile.tsx | 14 ++++---- .../src/components/layout/AppHeader.tsx | 36 +++++++++---------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/bbbeasy-frontend/src/components/Profile.tsx b/bbbeasy-frontend/src/components/Profile.tsx index 52a45904..66bb4325 100644 --- a/bbbeasy-frontend/src/components/Profile.tsx +++ b/bbbeasy-frontend/src/components/Profile.tsx @@ -16,7 +16,7 @@ * with BBBEasy; if not, see . */ -import React from 'react'; +import React from 'react'; import { Trans, withTranslation } from 'react-i18next'; import { t } from 'i18next'; import EN_US from '../locale/en-US.json'; @@ -82,7 +82,7 @@ const Profile = () => { console.error(error); }); }; - + const handleUpdate = (formValues: formType) => { setErrors(''); @@ -106,12 +106,11 @@ const Profile = () => { const user = response.data.user; console.log(user); if (user) { - //remove passwords from form accountForm.resetFields(['current_password', 'new_password', 'confirm_new_password']); //update LS AuthService.updateCurrentUser(user.username, user.email, user.avatar); - + Notifications.openNotificationWithIcon('success', t('edit_account_success')); } }) @@ -209,7 +208,7 @@ const Profile = () => { height={130} /> - ) : currentUser.avatar != null ? ( + ) : currentUser.avatar != null ? (
{ />
- handleRemoveAvatar()} /> + handleRemoveAvatar()} + />
diff --git a/bbbeasy-frontend/src/components/layout/AppHeader.tsx b/bbbeasy-frontend/src/components/layout/AppHeader.tsx index d8e2bf13..a475a1ac 100644 --- a/bbbeasy-frontend/src/components/layout/AppHeader.tsx +++ b/bbbeasy-frontend/src/components/layout/AppHeader.tsx @@ -258,25 +258,23 @@ const AppHeader = () => { {' '} ) : ( - - - + )} {dropdownLang}