Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up available location settings #9522

Merged
merged 1 commit into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ interface Props {

const defaultState = {
name: '',
maxUsers: 10,
maxUsers: 20,
scene: '',
type: 'private',
videoEnabled: false,
audioEnabled: false,
screenSharingEnabled: false,
faceStreamingEnabled: false,
isLobby: false,
isFeatured: false,
type: 'public',
videoEnabled: true,
audioEnabled: true,
screenSharingEnabled: true,
// faceStreamingEnabled: false,
// isLobby: false,
// isFeatured: false,
formErrors: {
name: '',
maxUsers: '',
Expand Down Expand Up @@ -129,10 +129,10 @@ const LocationDrawer = ({ open, mode, selectedLocation, onClose }: Props) => {
type: selectedLocation.locationSetting?.locationType,
videoEnabled: selectedLocation.locationSetting?.videoEnabled,
audioEnabled: selectedLocation.locationSetting?.audioEnabled,
screenSharingEnabled: selectedLocation.locationSetting?.screenSharingEnabled,
faceStreamingEnabled: selectedLocation.locationSetting?.faceStreamingEnabled,
isLobby: selectedLocation.isLobby,
isFeatured: selectedLocation.isFeatured
screenSharingEnabled: selectedLocation.locationSetting?.screenSharingEnabled
// faceStreamingEnabled: selectedLocation.locationSetting?.faceStreamingEnabled,
// isLobby: selectedLocation.isLobby,
// isFeatured: selectedLocation.isFeatured
})
}
}
Expand Down Expand Up @@ -184,13 +184,13 @@ const LocationDrawer = ({ open, mode, selectedLocation, onClose }: Props) => {
locationType: state.type.value as 'private' | 'public' | 'showroom',
audioEnabled: state.audioEnabled.value,
screenSharingEnabled: state.screenSharingEnabled.value,
faceStreamingEnabled: state.faceStreamingEnabled.value,
faceStreamingEnabled: false, //state.faceStreamingEnabled.value,
videoEnabled: state.videoEnabled.value,
createdAt: '',
updatedAt: ''
},
isLobby: state.isLobby.value,
isFeatured: state.isFeatured.value
isLobby: false, //state.isLobby.value,
isFeatured: false //state.isFeatured.value
}

state.formErrors.merge({
Expand Down Expand Up @@ -289,33 +289,6 @@ const LocationDrawer = ({ open, mode, selectedLocation, onClose }: Props) => {
onChange={(e) => state.merge({ screenSharingEnabled: e.target.checked })}
/>
</Grid>
<Grid item xs={6} style={{ display: 'flex' }}>
<div style={{ marginLeft: 'auto' }}>
<InputSwitch
name="faceStreamingEnabled"
label={t('admin:components.location.lbl-fe')}
checked={state?.value?.faceStreamingEnabled}
disabled={viewMode}
onChange={(e) => state.merge({ faceStreamingEnabled: e.target.checked })}
/>

<InputSwitch
name="isLobby"
label={t('admin:components.location.lbl-lobby')}
checked={state?.value?.isLobby}
disabled={viewMode}
onChange={(e) => state.merge({ isLobby: e.target.checked })}
/>

<InputSwitch
name="isFeatured"
label={t('admin:components.location.lbl-featured')}
checked={state?.value?.isFeatured}
disabled={viewMode}
onChange={(e) => state.merge({ isFeatured: e.target.checked })}
/>
</div>
</Grid>
</Grid>
<DialogActions>
<Button className={styles.outlinedButton} onClick={handleCancel}>
Expand Down
2 changes: 2 additions & 0 deletions packages/engine/src/schemas/social/location-setting.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,11 @@ export const locationSettingSchema = Type.Object(
locationId: TypedString<LocationID>({
format: 'uuid'
}),
/** @todo review */
locationType: StringEnum(['private', 'public', 'showroom']),
audioEnabled: Type.Boolean(),
screenSharingEnabled: Type.Boolean(),
/** @todo review */
faceStreamingEnabled: Type.Boolean(),
videoEnabled: Type.Boolean(),
createdAt: Type.String({ format: 'date-time' }),
Expand Down
2 changes: 2 additions & 0 deletions packages/engine/src/schemas/social/location.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ export const locationSchema = Type.Object(
format: 'uuid'
}),
slugifiedName: Type.String(),
/** @todo review */
isLobby: Type.Boolean(),
/** @todo review */
isFeatured: Type.Boolean(),
maxUsersPerInstance: Type.Number(),
locationSetting: Type.Ref(locationSettingSchema),
Expand Down