Class ConfirmExitModal

ConfirmExitModal component renders a modal view for exit confirmation, allowing users to confirm or cancel an exit event from a session or room.

app-confirm-exit-modal

true

[CommonModule, FormsModule, FontAwesomeModule]

<app-confirm-exit-modal
[isConfirmExitModalVisible]="true"
[onConfirmExitClose]="closeModal"
[exitEventOnConfirm]="confirmExit"
[member]="memberName"
[ban]="false"
[roomName]="currentRoom"
[socket]="socketInstance"
[islevel]="userLevel">
</app-confirm-exit-modal>

isConfirmExitModalVisible - Determines the visibility of the modal.

onConfirmExitClose - Callback to close the modal.

position - Position on the screen (default: 'topRight').

backgroundColor - Background color of the modal (default: '#83c0e9').

exitEventOnConfirm - Callback function to handle exit confirmation.

member - Identifies the member for whom the exit is confirmed.

ban - Indicates if the exit action includes a ban.

roomName - Name of the room involved in the exit action.

socket - Socket instance for real-time interaction.

islevel - User level information.

Service to handle the exit confirmation.

ngOnInit - Initializes component properties and default styles for the modal content.

ngOnChanges - Updates component state upon changes in input properties.

Object containing the current and previous property values.

handleConfirmExit - Handles the exit confirmation event, triggering the provided exitEventOnConfirm function and then closing the modal.

Implements

  • OnInit
  • OnChanges

Constructors

Methods

Properties

isConfirmExitModalVisible: boolean = false
onConfirmExitClose: (() => void)
position: string = 'topRight'
backgroundColor: string = '#83c0e9'
exitEventOnConfirm: ((options: ConfirmExitOptions) => void)
member: string = ''
ban: boolean = false
roomName: string = ''
socket: Socket<DefaultEventsMap, DefaultEventsMap> = ...
islevel: string = ''
faTimes: IconDefinition = faTimes

FontAwesome icon for the close button.

modalContentStyle: any

Object defining the style for modal content.