forked from EVOgeek/Vmeda.Online
		
	MOBILE-4137 bbb: Don't display room info if showroom = false
This commit is contained in:
		
							parent
							
								
									e6308c2869
								
							
						
					
					
						commit
						6d0473ef4c
					
				| @ -16,7 +16,7 @@ | |||||||
|     <core-group-selector [groupInfo]="groupInfo" [(selected)]="groupId" (selectedChange)="groupChanged()" |     <core-group-selector [groupInfo]="groupInfo" [(selected)]="groupId" (selectedChange)="groupChanged()" | ||||||
|         [multipleGroupsMessage]="'addon.mod_bigbluebuttonbn.view_groups_selection_warning' | translate"></core-group-selector> |         [multipleGroupsMessage]="'addon.mod_bigbluebuttonbn.view_groups_selection_warning' | translate"></core-group-selector> | ||||||
| 
 | 
 | ||||||
|     <ng-container *ngIf="meetingInfo"> |     <ng-container *ngIf="meetingInfo && showRoom"> | ||||||
|         <ion-item class="ion-text-wrap" *ngIf="meetingInfo.openingtime"> |         <ion-item class="ion-text-wrap" *ngIf="meetingInfo.openingtime"> | ||||||
|             <ion-label> |             <ion-label> | ||||||
|                 <h3>{{ 'addon.mod_bigbluebuttonbn.mod_form_field_openingtime' | translate }}</h3> |                 <h3>{{ 'addon.mod_bigbluebuttonbn.mod_form_field_openingtime' | translate }}</h3> | ||||||
| @ -85,7 +85,7 @@ | |||||||
| 
 | 
 | ||||||
|     <div collapsible-footer *ngIf="!showLoading" slot="fixed"> |     <div collapsible-footer *ngIf="!showLoading" slot="fixed"> | ||||||
|         <div class="list-item-limited-width adaptable-buttons-row" |         <div class="list-item-limited-width adaptable-buttons-row" | ||||||
|             *ngIf="meetingInfo && (meetingInfo.canjoin || meetingInfo.statusrunning && meetingInfo.ismoderator)"> |             *ngIf="meetingInfo && showRoom && (meetingInfo.canjoin || (meetingInfo.statusrunning && meetingInfo.ismoderator))"> | ||||||
|             <ion-button *ngIf="meetingInfo.statusrunning && meetingInfo.ismoderator" fill="outline" class="ion-margin ion-text-wrap" |             <ion-button *ngIf="meetingInfo.statusrunning && meetingInfo.ismoderator" fill="outline" class="ion-margin ion-text-wrap" | ||||||
|                 expand="block" (click)="endMeeting()"> |                 expand="block" (click)="endMeeting()"> | ||||||
|                 {{ 'addon.mod_bigbluebuttonbn.view_conference_action_end' | translate }} |                 {{ 'addon.mod_bigbluebuttonbn.view_conference_action_end' | translate }} | ||||||
|  | |||||||
| @ -22,7 +22,7 @@ import { CoreGroupInfo, CoreGroups } from '@services/groups'; | |||||||
| import { CoreDomUtils } from '@services/utils/dom'; | import { CoreDomUtils } from '@services/utils/dom'; | ||||||
| import { CoreUtils } from '@services/utils/utils'; | import { CoreUtils } from '@services/utils/utils'; | ||||||
| import { Translate } from '@singletons'; | import { Translate } from '@singletons'; | ||||||
| import { AddonModBBB, AddonModBBBData, AddonModBBBMeetingInfoWSResponse, AddonModBBBService } from '../../services/bigbluebuttonbn'; | import { AddonModBBB, AddonModBBBData, AddonModBBBMeetingInfo, AddonModBBBService } from '../../services/bigbluebuttonbn'; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  * Component that displays a Big Blue Button activity. |  * Component that displays a Big Blue Button activity. | ||||||
| @ -39,7 +39,7 @@ export class AddonModBBBIndexComponent extends CoreCourseModuleMainActivityCompo | |||||||
|     bbb?: AddonModBBBData; |     bbb?: AddonModBBBData; | ||||||
|     groupInfo?: CoreGroupInfo; |     groupInfo?: CoreGroupInfo; | ||||||
|     groupId = 0; |     groupId = 0; | ||||||
|     meetingInfo?: AddonModBBBMeetingInfoWSResponse; |     meetingInfo?: AddonModBBBMeetingInfo; | ||||||
| 
 | 
 | ||||||
|     constructor( |     constructor( | ||||||
|         protected content?: IonContent, |         protected content?: IonContent, | ||||||
| @ -57,6 +57,10 @@ export class AddonModBBBIndexComponent extends CoreCourseModuleMainActivityCompo | |||||||
|         await this.loadContent(); |         await this.loadContent(); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     get showRoom(): boolean { | ||||||
|  |         return !!this.meetingInfo && (!this.meetingInfo.features || this.meetingInfo.features.showroom); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     /** |     /** | ||||||
|      * @inheritdoc |      * @inheritdoc | ||||||
|      */ |      */ | ||||||
|  | |||||||
| @ -19,6 +19,7 @@ import { CoreSite, CoreSiteWSPreSets } from '@classes/site'; | |||||||
| import { CoreCourseCommonModWSOptions } from '@features/course/services/course'; | import { CoreCourseCommonModWSOptions } from '@features/course/services/course'; | ||||||
| import { CoreCourseLogHelper } from '@features/course/services/log-helper'; | import { CoreCourseLogHelper } from '@features/course/services/log-helper'; | ||||||
| import { CoreSites, CoreSitesCommonWSOptions } from '@services/sites'; | import { CoreSites, CoreSitesCommonWSOptions } from '@services/sites'; | ||||||
|  | import { CoreUtils } from '@services/utils/utils'; | ||||||
| import { CoreWSExternalFile, CoreWSExternalWarning } from '@services/ws'; | import { CoreWSExternalFile, CoreWSExternalWarning } from '@services/ws'; | ||||||
| import { makeSingleton, Translate } from '@singletons'; | import { makeSingleton, Translate } from '@singletons'; | ||||||
| 
 | 
 | ||||||
| @ -152,7 +153,7 @@ export class AddonModBBBService { | |||||||
|         id: number, |         id: number, | ||||||
|         groupId: number = 0, |         groupId: number = 0, | ||||||
|         options: AddonModBBBGetMeetingInfoOptions = {}, |         options: AddonModBBBGetMeetingInfoOptions = {}, | ||||||
|     ): Promise<AddonModBBBMeetingInfoWSResponse> { |     ): Promise<AddonModBBBMeetingInfo> { | ||||||
|         const site = await CoreSites.getSite(options.siteId); |         const site = await CoreSites.getSite(options.siteId); | ||||||
| 
 | 
 | ||||||
|         const params: AddonModBBBMeetingInfoWSParams = { |         const params: AddonModBBBMeetingInfoWSParams = { | ||||||
| @ -172,11 +173,16 @@ export class AddonModBBBService { | |||||||
|             preSets.getFromCache = false; |             preSets.getFromCache = false; | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|         return site.read<AddonModBBBMeetingInfoWSResponse>( |         const meetingInfo = await site.read<AddonModBBBMeetingInfoWSResponse>( | ||||||
|             'mod_bigbluebuttonbn_meeting_info', |             'mod_bigbluebuttonbn_meeting_info', | ||||||
|             params, |             params, | ||||||
|             preSets, |             preSets, | ||||||
|         ); |         ); | ||||||
|  | 
 | ||||||
|  |         return { | ||||||
|  |             ...meetingInfo, | ||||||
|  |             features: meetingInfo.features ? CoreUtils.objectToKeyValueMap(meetingInfo.features, 'name', 'isenabled') : undefined, | ||||||
|  |         }; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     /** |     /** | ||||||
| @ -353,6 +359,17 @@ export type AddonModBBBMeetingInfoWSResponse = { | |||||||
|         name: string; // Presentation name.
 |         name: string; // Presentation name.
 | ||||||
|     }[]; |     }[]; | ||||||
|     joinurl: string; // Join URL.
 |     joinurl: string; // Join URL.
 | ||||||
|  |     features?: { // Enabled features. @since 4.1.
 | ||||||
|  |         name: string; | ||||||
|  |         isenabled: boolean; | ||||||
|  |     }[]; | ||||||
|  | }; | ||||||
|  | 
 | ||||||
|  | /** | ||||||
|  |  * Meeting info with some calculated data. | ||||||
|  |  */ | ||||||
|  | export type AddonModBBBMeetingInfo = Omit<AddonModBBBMeetingInfoWSResponse, 'features'> & { | ||||||
|  |     features?: Record<string, boolean>; | ||||||
| }; | }; | ||||||
| 
 | 
 | ||||||
| /** | /** | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user