Skip to content

Commit

Permalink
Summit 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
farhatahmad committed Apr 25, 2024
1 parent 959ef57 commit 6d8120e
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import React from 'react';
import {
Row, Col, Button, Stack,
Row, Col, Button, Stack, Form,
} from 'react-bootstrap';
import { useParams } from 'react-router-dom';
import Card from 'react-bootstrap/Card';
Expand Down Expand Up @@ -45,13 +45,26 @@ export default function RoomSettings() {
const updateMutationWrapper = () => useUpdateRoomSetting(friendlyId);
const deleteMutationWrapper = (args) => useDeleteRoom({ friendlyId, ...args });

const updateAPI = updateMutationWrapper();

return (
<div id="room-settings" className="pt-3">
<Card className="mx-auto p-4 border-0 card-shadow">
<div className="mt-2">
<Row>
<Col className="border-end border-2">
<UpdateRoomNameForm friendlyId={friendlyId} />

<Row className="my-3">
<h6 className="text-brand">Login URL</h6>

<Stack direction="horizontal">
<Form.Control id="loginURL" type="text" defaultValue={roomSetting?.data?.loginURL} />
<Button type="submit" variant="brand" className="ms-3"
onClick={() => { updateAPI.mutate({ settingName: 'loginURL', settingValue: document.getElementById("loginURL")?.value }) }}> { t('update') } </Button>
</Stack>
</Row>

<AccessCodeRow
settingName="glViewerAccessCode"
updateMutation={updateMutationWrapper}
Expand Down
12 changes: 12 additions & 0 deletions db/data/20240425134919_add_login_url_meeting_option.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# frozen_string_literal: true

class AddLoginUrlMeetingOption < ActiveRecord::Migration[7.1]
def up
MeetingOption.create! name: 'loginURL', default_value: ''
RoomsConfiguration.create! meeting_option: MeetingOption.find_by(name: 'loginURL'), value: 'optional', provider: 'greenlight'
end

def down
MeetingOption.destroy_by name: 'loginURL'
end
end
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

class PopulateLoginUrlMeetingOptionForExistingRooms < ActiveRecord::Migration[7.1]
def up

end

def down
raise ActiveRecord::IrreversibleMigration
end
end
2 changes: 1 addition & 1 deletion db/data_schema.rb
Original file line number Diff line number Diff line change
@@ -1 +1 @@
DataMigrate::Data.define(version: 20240209155229)
DataMigrate::Data.define(version: 20240425134945)
8 changes: 4 additions & 4 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6d8120e

Please sign in to comment.