Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/npm_and_yarn/axios-1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
farhatahmad authored Nov 14, 2023
2 parents d1d86de + a50c283 commit b670e20
Show file tree
Hide file tree
Showing 12 changed files with 261 additions and 161 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby '>= 3.0'

gem 'active_model_serializers', '>= 0.10.14'
gem 'active_storage_validations', '>= 1.0.4'
gem 'active_storage_validations', '>= 1.1.0'
gem 'aws-sdk-s3', require: false
gem 'bcrypt', '~> 3.1.7'
gem 'bigbluebutton-api-ruby', '1.9.1'
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ GEM
activemodel (>= 4.1)
case_transform (>= 0.2)
jsonapi-renderer (>= 0.1.1.beta1, < 0.3)
active_storage_validations (1.0.4)
active_storage_validations (1.1.0)
activejob (>= 5.2.0)
activemodel (>= 5.2.0)
activestorage (>= 5.2.0)
Expand Down Expand Up @@ -257,7 +257,7 @@ GEM
memoist (0.16.2)
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.4)
mini_portile2 (2.8.5)
minitest (5.20.0)
msgpack (1.6.0)
multi_json (1.15.0)
Expand Down Expand Up @@ -489,7 +489,7 @@ PLATFORMS

DEPENDENCIES
active_model_serializers (>= 0.10.14)
active_storage_validations (>= 1.0.4)
active_storage_validations (>= 1.1.0)
aws-sdk-s3
bcrypt (~> 3.1.7)
bigbluebutton-api-ruby (= 1.9.1)
Expand Down
4 changes: 4 additions & 0 deletions app/assets/locales/el.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"account_info": "Πληροφορίες λογαριασμού",
"delete_account": "Διαγραφή λογαριασμού",
"change_password": "Αλλαγή κωδικού πρόσβασης",
"set_password": "Ορίστε τον νέο κωδικό πρόσβασής σας",
"reset_password": "Επαναφορά κωδικού πρόσβασης",
"update_account_info": "Ενημέρωση πληροφοριών λογαριασμού",
"current_password": "Τρέχων κωδικός πρόσβασης",
Expand Down Expand Up @@ -129,6 +130,7 @@
"click_to_upload": "Κάντε κλικ για μεταφόρτωση ",
"drag_and_drop": "ή σύρετε και αποθέστε το αρχείο",
"upload_description": "Μεταφόρτωση εγγράφου ή αρχείου PDF (έως {{size}}). Ανάλογα με το μέγεθος του αρχείου, απαιτείται χρόνος για τη μεταφόρτωση πριν τη χρήση του",
"delete_presentation": "Διαγραφή παρουσίασης",
"are_you_sure_delete_presentation": "Θέλετε σίγουρα να διαγράψετε αυτή την παρουσίαση;"
},
"shared_access": {
Expand Down Expand Up @@ -165,6 +167,7 @@
"recording": {
"recording": "Καταγραφή",
"recordings": "Καταγραφές",
"processing": "Επεξεργασία καταγραφών... ",
"name": "Όνομα",
"length": "Μήκος",
"users": "Χρήστες",
Expand Down Expand Up @@ -358,6 +361,7 @@
"user_updated": "Ο χρήστης ενημερώθηκε.",
"user_deleted": "Ο χρήστης διαγράφηκε.",
"avatar_updated": "Το άβαταρ ενημερώθηκε.",
"password_changed": "Επιτυχής ενημέρωση του κωδικού πρόσβασής σας. Παρακαλούμε συνδεθείτε ξανά.",
"password_updated": "Ο κωδικός πρόσβασης ενημερώθηκε.",
"account_activated": "Ο λογαριασμός ενεργοποιήθηκε επιτυχώς. Παρακαλούμε συνδεθείτε στον λογαριασμό σας.",
"activation_email_sent": "Το email επιβεβαίωσης στάλθηκε.",
Expand Down
1 change: 1 addition & 0 deletions app/assets/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@
"click_to_upload": "Click to Upload",
"drag_and_drop": " or drag and drop",
"upload_description": "Upload any office document or PDF file (not larger than {{size}}). Depending on the size of the file, it may require additional time to upload before it can be used",
"delete_presentation": "Delete Presentation",
"are_you_sure_delete_presentation": "Are you sure you want to delete this presentation?"
},
"shared_access": {
Expand Down
3 changes: 2 additions & 1 deletion app/controllers/api/v1/rooms_configurations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
module Api
module V1
class RoomsConfigurationsController < ApiController
before_action only: %i[index show] do
before_action only: %i[index] do
ensure_authorized(%w[CreateRoom ManageSiteSettings ManageRoles ManageRooms], friendly_id: params[:friendly_id])
end
skip_before_action :ensure_authenticated, only: %i[show]

# GET /api/v1/rooms_configurations.json
# Fetches and returns all rooms configurations.
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/health_checks_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def check

def check_database
raise 'Unable to connect to Database' unless ActiveRecord::Base.connection.active?
raise 'Unable to connect to Database - pending migrations' unless ActiveRecord::Migration.check_pending!.nil?
raise 'Unable to connect to Database - pending migrations' unless ActiveRecord::Migration.check_all_pending!.nil?
rescue StandardError => e
raise "Unable to connect to Database - #{e}"
end
Expand Down
18 changes: 11 additions & 7 deletions app/javascript/components/home/HomePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ import {
import { toast } from 'react-toastify';
import { useAuth } from '../../contexts/auth/AuthProvider';
import HomepageFeatureCard from './HomepageFeatureCard';
import useRoomConfigValue from '../../hooks/queries/rooms/useRoomConfigValue';

export default function HomePage() {
const { t } = useTranslation();
const currentUser = useAuth();
const navigate = useNavigate();
const [searchParams, setSearchParams] = useSearchParams();
const error = searchParams.get('error');
const { data: recordValue } = useRoomConfigValue('record');

// Redirects the user to the proper page based on signed in status and CreateRoom permission
useEffect(
Expand Down Expand Up @@ -88,13 +90,15 @@ export default function HomePage() {
icon={<ComputerDesktopIcon className="hi-s text-white" />}
/>
</Col>
<Col className="mb-3">
<HomepageFeatureCard
title={t('homepage.recording_title')}
description={t('homepage.recording_description')}
icon={<VideoCameraIcon className="hi-s text-white" />}
/>
</Col>
{ (recordValue !== 'false') && (
<Col className="mb-3">
<HomepageFeatureCard
title={t('homepage.recording_title')}
description={t('homepage.recording_description')}
icon={<VideoCameraIcon className="hi-s text-white" />}
/>
</Col>
)}
<Col className="mb-3">
<HomepageFeatureCard
title={t('homepage.settings_title')}
Expand Down
18 changes: 11 additions & 7 deletions app/javascript/components/rooms/room/join/JoinCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import RoomJoinPlaceholder from './RoomJoinPlaceholder';
import useRoomJoinForm from '../../../../hooks/forms/rooms/useRoomJoinForm';
import ButtonLink from '../../../shared_components/utilities/ButtonLink';
import Title from '../../../shared_components/utilities/Title';
import useRoomConfigValue from '../../../../hooks/queries/rooms/useRoomConfigValue';

export default function JoinCard() {
const { t } = useTranslation();
Expand All @@ -54,6 +55,7 @@ export default function JoinCard() {
const roomStatusAPI = useRoomStatus(friendlyId, joinInterval);

const { data: env } = useEnv();
const { data: recordValue } = useRoomConfigValue('record');

const { methods, fields } = useRoomJoinForm();

Expand Down Expand Up @@ -205,13 +207,15 @@ export default function JoinCard() {
<h1 className="mt-2">
{publicRoom?.data.name}
</h1>
<ButtonLink
variant="brand-outline"
className="mt-3 mb-0 cursor-pointer"
to={`/rooms/${friendlyId}/public_recordings`}
>
<span> <VideoCameraIcon className="hi-s text-brand" /> {t('view_recordings')} </span>
</ButtonLink>
{ (recordValue !== 'false') && (
<ButtonLink
variant="brand-outline"
className="mt-3 mb-0 cursor-pointer"
to={`/rooms/${friendlyId}/public_recordings`}
>
<span> <VideoCameraIcon className="hi-s text-brand" /> {t('view_recordings')} </span>
</ButtonLink>
)}
</Col>
<Col>
<Stack direction="vertical" gap={3}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function DeletePresentationForm({ handleClose }) {
<Stack direction="horizontal" className="mb-3">
<ExclamationTriangleIcon className="text-danger hi-xl" />
<Stack direction="vertical" className="ps-3">
<h3> { t('recording.delete_recording') } </h3>
<h3> { t('room.presentation.delete_presentation') } </h3>
<p className="mb-0"> { t('room.presentation.are_you_sure_delete_presentation') } </p>
<p className="mt-0"><strong> { t('action_permanent') } </strong></p>
</Stack>
Expand Down
Loading

0 comments on commit b670e20

Please sign in to comment.