@rtsee/ngx 0.0.137 → 0.0.138
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, PLATFORM_ID, Input, Inject, Directive, Component, ViewChild, EventEmitter, Output, forwardRef, reflectComponentType,
|
|
2
|
+
import { Injectable, PLATFORM_ID, Input, Inject, Directive, Component, ViewChild, EventEmitter, Output, forwardRef, reflectComponentType, HostListener, DOCUMENT, ChangeDetectionStrategy, output, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
|
3
3
|
import * as i1$3 from '@angular/common';
|
|
4
4
|
import { isPlatformBrowser, NgClass, NgIf, NgForOf, DecimalPipe, DatePipe, NgComponentOutlet, SlicePipe, JsonPipe, DOCUMENT as DOCUMENT$1, CommonModule, NgStyle, NgOptimizedImage } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
@@ -10,11 +10,11 @@ import * as i4 from 'primeng/button';
|
|
|
10
10
|
import { Button, ButtonModule } from 'primeng/button';
|
|
11
11
|
import { interval, tap, map } from 'rxjs';
|
|
12
12
|
import { RTSeeTextLabelKeys, RTSeeCore, defaultLabels, hasPermission, RTSeePeerPermissions } from '@rtsee/core';
|
|
13
|
+
import { RTSEE_BLOCK_REASONS, RTSeeChatMemberRoles, RTSeeIllustratorEvents, RTSeeChatTypes, OzzyTaskStatus, CREATE_STORY_ACTION_NAME, EDIT_STORY_ACTION_NAME, CREATE_SLIDE_ACTION_NAME, EDIT_SLIDE_ACTION_NAME, getStoryTranslatorLanguage, STORY_TRANSLATOR_LANGUAGES, RTSEE_REPORT_REASONS, RTSeeModerationWidgets } from '@rtsee/common';
|
|
13
14
|
import { AuthEndpointsKeys, LS_TOKEN_LABEL, LS_USER_LABEL, DEFAULT_ROUTE_NAMES } from '@rtsee/auth';
|
|
14
15
|
import * as i2 from '@angular/router';
|
|
15
16
|
import { RouterLink, RouterLinkActive, NavigationStart, NavigationEnd } from '@angular/router';
|
|
16
17
|
import * as i1$1 from '@angular/common/http';
|
|
17
|
-
import { RTSeeChatMemberRoles, RTSeeIllustratorEvents, RTSeeChatTypes, OzzyTaskStatus, CREATE_STORY_ACTION_NAME, EDIT_STORY_ACTION_NAME, CREATE_SLIDE_ACTION_NAME, EDIT_SLIDE_ACTION_NAME, getStoryTranslatorLanguage, STORY_TRANSLATOR_LANGUAGES } from '@rtsee/common';
|
|
18
18
|
import { sanitizeImageUrl, RTSeeFormFieldEvents, ManageAgentForm, RTSeeForm, RTSeeFormFieldRadioGroup, RTSeeFormField, RTSeeFormFieldImageUploader, fetchImageBlob, RTSeeFormFieldSelect, RTSeeFormFieldAutocomplete, RTSeeRater } from '@rtsee/utilities-ui';
|
|
19
19
|
import { InputText } from 'primeng/inputtext';
|
|
20
20
|
import { InputGroup } from 'primeng/inputgroup';
|
|
@@ -521,6 +521,11 @@ class ProfileComponent {
|
|
|
521
521
|
constructor(authService, router) {
|
|
522
522
|
this.authService = authService;
|
|
523
523
|
this.router = router;
|
|
524
|
+
this.blockReasons = RTSEE_BLOCK_REASONS;
|
|
525
|
+
this.showBlockForm = false;
|
|
526
|
+
this.selectedBlockReason = RTSEE_BLOCK_REASONS[0].value;
|
|
527
|
+
this.blockExplanation = '';
|
|
528
|
+
this.blockSubmitting = false;
|
|
524
529
|
this.AuthEndpointsKeys = AuthEndpointsKeys;
|
|
525
530
|
this.RTSeeTextLabelKeys = RTSeeTextLabelKeys;
|
|
526
531
|
this.authConfiguration = this.authService.rtseeAuth.authConfiguration;
|
|
@@ -529,6 +534,13 @@ class ProfileComponent {
|
|
|
529
534
|
if (this.peer) {
|
|
530
535
|
return { id: this.peer.clientId, name: this.peer.name, imageUrl: this.peer.imageUrl };
|
|
531
536
|
}
|
|
537
|
+
if (this.messenger?.openedProfile) {
|
|
538
|
+
return {
|
|
539
|
+
id: this.messenger.openedProfile.clientId,
|
|
540
|
+
name: this.messenger.openedProfile.name,
|
|
541
|
+
imageUrl: this.messenger.openedProfile.imageUrl,
|
|
542
|
+
};
|
|
543
|
+
}
|
|
532
544
|
if (this.messenger?.openedChat) {
|
|
533
545
|
const myId = this.messenger.myPeer?.clientId || this.messenger.clientId;
|
|
534
546
|
const other = this.messenger.openedChat.members.find((m) => m.id !== myId && m.clientId !== myId);
|
|
@@ -546,15 +558,18 @@ class ProfileComponent {
|
|
|
546
558
|
return undefined;
|
|
547
559
|
}
|
|
548
560
|
get isOtherUser() {
|
|
549
|
-
if (!this.messenger?.ownProfileOpened) {
|
|
550
|
-
return true;
|
|
551
|
-
}
|
|
552
561
|
const myId = this.messenger?.myPeer?.clientId || this.messenger?.clientId;
|
|
553
562
|
if (this.targetPeer && myId && this.targetPeer.id !== myId) {
|
|
554
563
|
return true;
|
|
555
564
|
}
|
|
565
|
+
if (!this.messenger?.ownProfileOpened && this.peer && this.peer.clientId !== myId) {
|
|
566
|
+
return true;
|
|
567
|
+
}
|
|
556
568
|
return false;
|
|
557
569
|
}
|
|
570
|
+
get isTargetBlocked() {
|
|
571
|
+
return Boolean(this.targetPeer?.id && this.messenger?.isUserBlocked(this.targetPeer.id));
|
|
572
|
+
}
|
|
558
573
|
get displayName() {
|
|
559
574
|
return (this.targetPeer?.name ||
|
|
560
575
|
this.messenger?.openedChat?.name ||
|
|
@@ -583,20 +598,68 @@ class ProfileComponent {
|
|
|
583
598
|
}
|
|
584
599
|
return 'My Profile';
|
|
585
600
|
}
|
|
601
|
+
openBlockUserPrompt() {
|
|
602
|
+
this.selectedBlockReason = RTSEE_BLOCK_REASONS[0].value;
|
|
603
|
+
this.blockExplanation = '';
|
|
604
|
+
this.showBlockForm = true;
|
|
605
|
+
}
|
|
606
|
+
cancelBlockUserPrompt() {
|
|
607
|
+
if (this.blockSubmitting) {
|
|
608
|
+
return;
|
|
609
|
+
}
|
|
610
|
+
this.showBlockForm = false;
|
|
611
|
+
}
|
|
612
|
+
async confirmBlockUser() {
|
|
613
|
+
const targetId = this.targetPeer?.id;
|
|
614
|
+
if (!targetId || this.blockSubmitting) {
|
|
615
|
+
return;
|
|
616
|
+
}
|
|
617
|
+
this.blockSubmitting = true;
|
|
618
|
+
try {
|
|
619
|
+
await this.messenger.blockUser({
|
|
620
|
+
blockedUserId: targetId,
|
|
621
|
+
reason: this.selectedBlockReason,
|
|
622
|
+
explanation: this.blockExplanation.trim() || undefined,
|
|
623
|
+
});
|
|
624
|
+
this.showBlockForm = false;
|
|
625
|
+
}
|
|
626
|
+
catch (e) {
|
|
627
|
+
console.error('Failed to block user:', e);
|
|
628
|
+
}
|
|
629
|
+
finally {
|
|
630
|
+
this.blockSubmitting = false;
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
async unblockTargetUser() {
|
|
634
|
+
const targetId = this.targetPeer?.id;
|
|
635
|
+
if (!targetId || this.blockSubmitting) {
|
|
636
|
+
return;
|
|
637
|
+
}
|
|
638
|
+
this.blockSubmitting = true;
|
|
639
|
+
try {
|
|
640
|
+
await this.messenger.unblockUser(targetId);
|
|
641
|
+
}
|
|
642
|
+
catch (e) {
|
|
643
|
+
console.error('Failed to unblock user:', e);
|
|
644
|
+
}
|
|
645
|
+
finally {
|
|
646
|
+
this.blockSubmitting = false;
|
|
647
|
+
}
|
|
648
|
+
}
|
|
586
649
|
setLanguage() {
|
|
587
650
|
this.messenger.setLanguage(this.messenger.currentLanguage);
|
|
588
651
|
void this.messenger.propagateLanguageChange(this.messenger.currentLanguage);
|
|
589
652
|
}
|
|
590
653
|
call() {
|
|
591
654
|
const chat = this.messenger.openedChat;
|
|
592
|
-
if (!chat) {
|
|
655
|
+
if (!chat || this.isTargetBlocked) {
|
|
593
656
|
return;
|
|
594
657
|
}
|
|
595
658
|
void this.messenger.initializeVideoCall(chat);
|
|
596
659
|
}
|
|
597
660
|
videoCall() {
|
|
598
661
|
const chat = this.messenger.openedChat;
|
|
599
|
-
if (!chat) {
|
|
662
|
+
if (!chat || this.isTargetBlocked) {
|
|
600
663
|
return;
|
|
601
664
|
}
|
|
602
665
|
void this.messenger.initializeVideoCall(chat);
|
|
@@ -609,11 +672,11 @@ class ProfileComponent {
|
|
|
609
672
|
}, 200);
|
|
610
673
|
}
|
|
611
674
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ProfileComponent, deps: [{ token: RTSeeAuthService }, { token: i2.Router }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
612
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: ProfileComponent, isStandalone: true, selector: "rtsee-profile", inputs: { messenger: "messenger", peer: "peer" }, ngImport: i0, template: "<div class=\"rts-chat-info rts-messenger-profile\">\n @if (displaySubtitle) {\n <div class=\"rts-chat-info-meta\">\n <p class=\"rts-chat-info-type\">{{ displaySubtitle }}</p>\n </div>\n }\n\n @if (isOtherUser) {\n <div class=\"rts-chat-info-call-actions\">\n <button class=\"rts-call-btn\"\n (click)=\"call()\"\n type=\"button\"\n title=\"Audio Call\"\n >\n <span class=\"material-icons-outlined\">call</span>\n <span>Audio</span>\n </button>\n <button class=\"rts-call-btn rts-call-btn-video\"\n (click)=\"videoCall()\"\n type=\"button\"\n title=\"Video Call\"\n >\n <span class=\"material-icons-outlined\">videocam</span>\n <span>Video</span>\n </button>\n </div>\n }\n\n @if (!isOtherUser && messenger.myPeer && !messenger.myPeer.isAnonymous) {\n <div class=\"rts-chat-info-actions\">\n <button class=\"rts-btn rts-btn-ghost rts-btn-block\"\n (click)=\"messenger.openManageProfile()\"\n >\n <span class=\"material-icons-outlined\">edit</span>\n {{ messenger.labels[RTSeeTextLabelKeys.MESSENGER_EDIT_PROFILE_BTN_LABEL] || 'Edit Profile' }}\n </button>\n </div>\n\n <hr class=\"rts-divider\" />\n }\n\n <!-- language selection is available to every user (anonymous included) -->\n @if (!isOtherUser && messenger.myPeer) {\n <div class=\"rts-profile-section\">\n <div class=\"rts-profile-field-row\">\n <label class=\"rts-profile-field-label\" for=\"rts-profile-language-select\">\n {{ messenger.labels[RTSeeTextLabelKeys.LANGUAGE_LABEL] || 'Language' }}\n </label>\n <p-select [options]=\"messenger.languageOptions\"\n [(ngModel)]=\"messenger.currentLanguage\"\n (ngModelChange)=\"setLanguage()\"\n optionLabel=\"key\"\n optionValue=\"key\"\n inputId=\"rts-profile-language-select\"\n [placeholder]=\"messenger.labels[RTSeeTextLabelKeys.MESSANGER_LANGUAGE_PLACEHOLDER]\"\n class=\"rts-profile-language-select\"\n />\n </div>\n </div>\n }\n\n @if (!isOtherUser && messenger.myPeer && !messenger.myPeer.isAnonymous) {\n @if (messenger.myPeer.plan) {\n <hr class=\"rts-divider\" />\n <div class=\"rts-profile-section\">\n <div class=\"rts-profile-plan-badge\">\n <span class=\"material-icons-outlined\">verified</span>\n <span>{{ messenger.myPeer.plan.productName }}</span>\n </div>\n <button class=\"rts-btn rts-btn-ghost rts-btn-block\"\n (click)=\"messenger.openManagePlanPage()\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.MANAGE_PLAN] || 'Manage Plan' }}\n </button>\n </div>\n } @else {\n <hr class=\"rts-divider\" />\n <div class=\"rts-profile-section\">\n <button class=\"rts-btn rts-btn-primary rts-btn-block\"\n (click)=\"messenger.openPaymentPage()\"\n >\n <span class=\"material-icons-outlined\">stars</span>\n {{ messenger.labels[RTSeeTextLabelKeys.SUBSCRIBE_LABEL] || 'Upgrade Plan' }}\n </button>\n </div>\n }\n\n <hr class=\"rts-divider\" />\n <div class=\"rts-chat-info-danger-zone\">\n <button class=\"rts-btn rts-btn-danger rts-btn-block\"\n (click)=\"logOut()\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.LOGOUT_BUTTON] || 'Logout' }}\n </button>\n </div>\n }\n\n @if (!isOtherUser && messenger.myPeer?.isAnonymous) {\n <hr class=\"rts-divider\" />\n <div class=\"rts-profile-anon-box\">\n <div class=\"rts-profile-anon-icon\">\n <span class=\"material-icons-outlined\">shield</span>\n </div>\n <div class=\"rts-profile-anon-text\">\n @if (!messenger.currentLanguage || messenger.currentLanguage === 'eng') {\n <p>This is a temporary anonymous identity. Sign up or sign in to save your history permanently.</p>\n } @else if (messenger.currentLanguage === 'ua') {\n <p>\u0426\u0435 \u0442\u0438\u043C\u0447\u0430\u0441\u043E\u0432\u0430 \u0430\u043D\u043E\u043D\u0456\u043C\u043D\u0430 \u043E\u0441\u043E\u0431\u0438\u0441\u0442\u0456\u0441\u0442\u044C. \u0417\u0430\u0440\u0435\u0454\u0441\u0442\u0440\u0443\u0439\u0442\u0435\u0441\u044F, \u0430\u0431\u0438 \u0437\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u0456\u0441\u0442\u043E\u0440\u0456\u044E \u0441\u043F\u0456\u043B\u043A\u0443\u0432\u0430\u043D\u043D\u044F.</p>\n }\n </div>\n </div>\n\n <div class=\"rts-profile-auth-actions\">\n <button class=\"rts-btn rts-btn-primary rts-btn-block\"\n [routerLink]=\"authConfiguration.getRoutePathSplit(AuthEndpointsKeys.SIGN_UP)\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.SIGN_UP_BUTTON] || 'Sign Up' }}\n </button>\n <button class=\"rts-btn rts-btn-ghost rts-btn-block\"\n [routerLink]=\"authConfiguration.getRoutePathSplit(AuthEndpointsKeys.SIGN_IN)\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.SIGN_IN_BUTTON] || 'Sign In' }}\n </button>\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
675
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: ProfileComponent, isStandalone: true, selector: "rtsee-profile", inputs: { messenger: "messenger", peer: "peer" }, ngImport: i0, template: "<div class=\"rts-chat-info rts-messenger-profile\">\n @if (displaySubtitle) {\n <div class=\"rts-chat-info-meta\">\n <p class=\"rts-chat-info-type\">{{ displaySubtitle }}</p>\n </div>\n }\n\n @if (isOtherUser) {\n <div class=\"rts-chat-info-call-actions\">\n <button class=\"rts-call-btn\"\n (click)=\"call()\"\n [disabled]=\"isTargetBlocked\"\n type=\"button\"\n title=\"Audio Call\"\n >\n <span class=\"material-icons-outlined\">call</span>\n <span>Audio</span>\n </button>\n <button class=\"rts-call-btn rts-call-btn-video\"\n (click)=\"videoCall()\"\n [disabled]=\"isTargetBlocked\"\n type=\"button\"\n title=\"Video Call\"\n >\n <span class=\"material-icons-outlined\">videocam</span>\n <span>Video</span>\n </button>\n </div>\n\n <div class=\"rts-profile-moderation-section\">\n @if (isTargetBlocked) {\n <button\n type=\"button\"\n class=\"rts-block-user-btn rts-unblock-btn\"\n [disabled]=\"blockSubmitting\"\n (click)=\"unblockTargetUser()\"\n >\n <span class=\"material-icons-outlined\">person_add_alt_1</span>\n <span>{{ blockSubmitting ? 'Unblocking...' : 'Unblock User' }}</span>\n </button>\n } @else {\n <button\n type=\"button\"\n class=\"rts-block-user-btn\"\n (click)=\"openBlockUserPrompt()\"\n >\n <span class=\"material-icons-outlined\">block</span>\n <span>Block User</span>\n </button>\n }\n\n @if (showBlockForm && !isTargetBlocked) {\n <div class=\"rts-block-modal-card\">\n <h5>Block {{ displayName }}?</h5>\n <p>\n Blocked users cannot message you directly, and their messages will be hidden for you across chats.\n </p>\n <select [(ngModel)]=\"selectedBlockReason\" aria-label=\"Reason for blocking\">\n @for (reason of blockReasons; track reason.value) {\n <option [value]=\"reason.value\">{{ reason.label }}</option>\n }\n </select>\n <textarea\n rows=\"2\"\n maxlength=\"500\"\n placeholder=\"Optional details...\"\n [(ngModel)]=\"blockExplanation\"\n ></textarea>\n <div class=\"rts-block-modal-actions\">\n <button\n type=\"button\"\n class=\"rts-block-cancel\"\n [disabled]=\"blockSubmitting\"\n (click)=\"cancelBlockUserPrompt()\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n class=\"rts-block-confirm\"\n [disabled]=\"blockSubmitting\"\n (click)=\"confirmBlockUser()\"\n >\n {{ blockSubmitting ? 'Blocking...' : 'Block User' }}\n </button>\n </div>\n </div>\n }\n </div>\n }\n\n @if (!isOtherUser && messenger.myPeer && !messenger.myPeer.isAnonymous) {\n <div class=\"rts-chat-info-actions\">\n <button class=\"rts-btn rts-btn-ghost rts-btn-block\"\n (click)=\"messenger.openManageProfile()\"\n >\n <span class=\"material-icons-outlined\">edit</span>\n {{ messenger.labels[RTSeeTextLabelKeys.MESSENGER_EDIT_PROFILE_BTN_LABEL] || 'Edit Profile' }}\n </button>\n </div>\n\n <hr class=\"rts-divider\" />\n }\n\n <!-- language selection is available to every user (anonymous included) -->\n @if (!isOtherUser && messenger.myPeer) {\n <div class=\"rts-profile-section\">\n <div class=\"rts-profile-field-row\">\n <label class=\"rts-profile-field-label\" for=\"rts-profile-language-select\">\n {{ messenger.labels[RTSeeTextLabelKeys.LANGUAGE_LABEL] || 'Language' }}\n </label>\n <p-select [options]=\"messenger.languageOptions\"\n [(ngModel)]=\"messenger.currentLanguage\"\n (ngModelChange)=\"setLanguage()\"\n optionLabel=\"key\"\n optionValue=\"key\"\n inputId=\"rts-profile-language-select\"\n [placeholder]=\"messenger.labels[RTSeeTextLabelKeys.MESSANGER_LANGUAGE_PLACEHOLDER]\"\n class=\"rts-profile-language-select\"\n />\n </div>\n </div>\n }\n\n @if (!isOtherUser && messenger.myPeer && !messenger.myPeer.isAnonymous) {\n @if (messenger.myPeer.plan) {\n <hr class=\"rts-divider\" />\n <div class=\"rts-profile-section\">\n <div class=\"rts-profile-plan-badge\">\n <span class=\"material-icons-outlined\">verified</span>\n <span>{{ messenger.myPeer.plan.productName }}</span>\n </div>\n <button class=\"rts-btn rts-btn-ghost rts-btn-block\"\n (click)=\"messenger.openManagePlanPage()\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.MANAGE_PLAN] || 'Manage Plan' }}\n </button>\n </div>\n } @else {\n <hr class=\"rts-divider\" />\n <div class=\"rts-profile-section\">\n <button class=\"rts-btn rts-btn-primary rts-btn-block\"\n (click)=\"messenger.openPaymentPage()\"\n >\n <span class=\"material-icons-outlined\">stars</span>\n {{ messenger.labels[RTSeeTextLabelKeys.SUBSCRIBE_LABEL] || 'Upgrade Plan' }}\n </button>\n </div>\n }\n\n <hr class=\"rts-divider\" />\n <div class=\"rts-chat-info-danger-zone\">\n <button class=\"rts-btn rts-btn-danger rts-btn-block\"\n (click)=\"logOut()\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.LOGOUT_BUTTON] || 'Logout' }}\n </button>\n </div>\n }\n\n @if (!isOtherUser && messenger.myPeer?.isAnonymous) {\n <hr class=\"rts-divider\" />\n <div class=\"rts-profile-anon-box\">\n <div class=\"rts-profile-anon-icon\">\n <span class=\"material-icons-outlined\">shield</span>\n </div>\n <div class=\"rts-profile-anon-text\">\n @if (!messenger.currentLanguage || messenger.currentLanguage === 'eng') {\n <p>This is a temporary anonymous identity. Sign up or sign in to save your history permanently.</p>\n } @else if (messenger.currentLanguage === 'ua') {\n <p>\u0426\u0435 \u0442\u0438\u043C\u0447\u0430\u0441\u043E\u0432\u0430 \u0430\u043D\u043E\u043D\u0456\u043C\u043D\u0430 \u043E\u0441\u043E\u0431\u0438\u0441\u0442\u0456\u0441\u0442\u044C. \u0417\u0430\u0440\u0435\u0454\u0441\u0442\u0440\u0443\u0439\u0442\u0435\u0441\u044F, \u0430\u0431\u0438 \u0437\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u0456\u0441\u0442\u043E\u0440\u0456\u044E \u0441\u043F\u0456\u043B\u043A\u0443\u0432\u0430\u043D\u043D\u044F.</p>\n }\n </div>\n </div>\n\n <div class=\"rts-profile-auth-actions\">\n <button class=\"rts-btn rts-btn-primary rts-btn-block\"\n [routerLink]=\"authConfiguration.getRoutePathSplit(AuthEndpointsKeys.SIGN_UP)\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.SIGN_UP_BUTTON] || 'Sign Up' }}\n </button>\n <button class=\"rts-btn rts-btn-ghost rts-btn-block\"\n [routerLink]=\"authConfiguration.getRoutePathSplit(AuthEndpointsKeys.SIGN_IN)\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.SIGN_IN_BUTTON] || 'Sign In' }}\n </button>\n </div>\n }\n</div>\n", styles: [".rts-profile-moderation-section{margin-top:16px;display:flex;flex-direction:column;gap:10px}.rts-block-user-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border-radius:12px;border:1px solid rgba(255,107,107,.45);background:#ff6b6b1f;color:#ff7675;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.rts-block-user-btn:hover{background:#ff6b6b38;border-color:#ff6b6bb3}.rts-block-user-btn.rts-unblock-btn{border-color:#a29bfe73;background:#6c5ce729;color:#a29bfe}.rts-block-modal-card{margin-top:8px;padding:14px;border-radius:12px;background:#ffffff0a;border:1px solid rgba(255,255,255,.14);display:flex;flex-direction:column;gap:10px}.rts-block-modal-card h5{margin:0;font-size:14px;font-weight:700}.rts-block-modal-card p{margin:0;font-size:12px;opacity:.75;line-height:1.4}.rts-block-modal-card select,.rts-block-modal-card textarea{width:100%;box-sizing:border-box;background:#1d1f29;color:#fff;border:1px solid rgba(255,255,255,.18);border-radius:9px;padding:9px 10px;font-size:13px;font-family:inherit}.rts-block-modal-actions{display:flex;justify-content:flex-end;gap:8px}.rts-block-modal-actions button{padding:8px 14px;border-radius:9px;font-size:13px;font-weight:600;cursor:pointer;border:none}.rts-block-cancel{background:#ffffff1a;color:#fff}.rts-block-confirm{background:#e14b4b;color:#fff}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
|
|
613
676
|
}
|
|
614
677
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ProfileComponent, decorators: [{
|
|
615
678
|
type: Component,
|
|
616
|
-
args: [{ selector: 'rtsee-profile', imports: [RouterLink, Select, FormsModule], standalone: true, template: "<div class=\"rts-chat-info rts-messenger-profile\">\n @if (displaySubtitle) {\n <div class=\"rts-chat-info-meta\">\n <p class=\"rts-chat-info-type\">{{ displaySubtitle }}</p>\n </div>\n }\n\n @if (isOtherUser) {\n <div class=\"rts-chat-info-call-actions\">\n <button class=\"rts-call-btn\"\n (click)=\"call()\"\n type=\"button\"\n title=\"Audio Call\"\n >\n <span class=\"material-icons-outlined\">call</span>\n <span>Audio</span>\n </button>\n <button class=\"rts-call-btn rts-call-btn-video\"\n (click)=\"videoCall()\"\n type=\"button\"\n title=\"Video Call\"\n >\n <span class=\"material-icons-outlined\">videocam</span>\n <span>Video</span>\n </button>\n </div>\n }\n\n @if (!isOtherUser && messenger.myPeer && !messenger.myPeer.isAnonymous) {\n <div class=\"rts-chat-info-actions\">\n <button class=\"rts-btn rts-btn-ghost rts-btn-block\"\n (click)=\"messenger.openManageProfile()\"\n >\n <span class=\"material-icons-outlined\">edit</span>\n {{ messenger.labels[RTSeeTextLabelKeys.MESSENGER_EDIT_PROFILE_BTN_LABEL] || 'Edit Profile' }}\n </button>\n </div>\n\n <hr class=\"rts-divider\" />\n }\n\n <!-- language selection is available to every user (anonymous included) -->\n @if (!isOtherUser && messenger.myPeer) {\n <div class=\"rts-profile-section\">\n <div class=\"rts-profile-field-row\">\n <label class=\"rts-profile-field-label\" for=\"rts-profile-language-select\">\n {{ messenger.labels[RTSeeTextLabelKeys.LANGUAGE_LABEL] || 'Language' }}\n </label>\n <p-select [options]=\"messenger.languageOptions\"\n [(ngModel)]=\"messenger.currentLanguage\"\n (ngModelChange)=\"setLanguage()\"\n optionLabel=\"key\"\n optionValue=\"key\"\n inputId=\"rts-profile-language-select\"\n [placeholder]=\"messenger.labels[RTSeeTextLabelKeys.MESSANGER_LANGUAGE_PLACEHOLDER]\"\n class=\"rts-profile-language-select\"\n />\n </div>\n </div>\n }\n\n @if (!isOtherUser && messenger.myPeer && !messenger.myPeer.isAnonymous) {\n @if (messenger.myPeer.plan) {\n <hr class=\"rts-divider\" />\n <div class=\"rts-profile-section\">\n <div class=\"rts-profile-plan-badge\">\n <span class=\"material-icons-outlined\">verified</span>\n <span>{{ messenger.myPeer.plan.productName }}</span>\n </div>\n <button class=\"rts-btn rts-btn-ghost rts-btn-block\"\n (click)=\"messenger.openManagePlanPage()\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.MANAGE_PLAN] || 'Manage Plan' }}\n </button>\n </div>\n } @else {\n <hr class=\"rts-divider\" />\n <div class=\"rts-profile-section\">\n <button class=\"rts-btn rts-btn-primary rts-btn-block\"\n (click)=\"messenger.openPaymentPage()\"\n >\n <span class=\"material-icons-outlined\">stars</span>\n {{ messenger.labels[RTSeeTextLabelKeys.SUBSCRIBE_LABEL] || 'Upgrade Plan' }}\n </button>\n </div>\n }\n\n <hr class=\"rts-divider\" />\n <div class=\"rts-chat-info-danger-zone\">\n <button class=\"rts-btn rts-btn-danger rts-btn-block\"\n (click)=\"logOut()\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.LOGOUT_BUTTON] || 'Logout' }}\n </button>\n </div>\n }\n\n @if (!isOtherUser && messenger.myPeer?.isAnonymous) {\n <hr class=\"rts-divider\" />\n <div class=\"rts-profile-anon-box\">\n <div class=\"rts-profile-anon-icon\">\n <span class=\"material-icons-outlined\">shield</span>\n </div>\n <div class=\"rts-profile-anon-text\">\n @if (!messenger.currentLanguage || messenger.currentLanguage === 'eng') {\n <p>This is a temporary anonymous identity. Sign up or sign in to save your history permanently.</p>\n } @else if (messenger.currentLanguage === 'ua') {\n <p>\u0426\u0435 \u0442\u0438\u043C\u0447\u0430\u0441\u043E\u0432\u0430 \u0430\u043D\u043E\u043D\u0456\u043C\u043D\u0430 \u043E\u0441\u043E\u0431\u0438\u0441\u0442\u0456\u0441\u0442\u044C. \u0417\u0430\u0440\u0435\u0454\u0441\u0442\u0440\u0443\u0439\u0442\u0435\u0441\u044F, \u0430\u0431\u0438 \u0437\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u0456\u0441\u0442\u043E\u0440\u0456\u044E \u0441\u043F\u0456\u043B\u043A\u0443\u0432\u0430\u043D\u043D\u044F.</p>\n }\n </div>\n </div>\n\n <div class=\"rts-profile-auth-actions\">\n <button class=\"rts-btn rts-btn-primary rts-btn-block\"\n [routerLink]=\"authConfiguration.getRoutePathSplit(AuthEndpointsKeys.SIGN_UP)\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.SIGN_UP_BUTTON] || 'Sign Up' }}\n </button>\n <button class=\"rts-btn rts-btn-ghost rts-btn-block\"\n [routerLink]=\"authConfiguration.getRoutePathSplit(AuthEndpointsKeys.SIGN_IN)\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.SIGN_IN_BUTTON] || 'Sign In' }}\n </button>\n </div>\n }\n</div>\n" }]
|
|
679
|
+
args: [{ selector: 'rtsee-profile', imports: [RouterLink, Select, FormsModule], standalone: true, template: "<div class=\"rts-chat-info rts-messenger-profile\">\n @if (displaySubtitle) {\n <div class=\"rts-chat-info-meta\">\n <p class=\"rts-chat-info-type\">{{ displaySubtitle }}</p>\n </div>\n }\n\n @if (isOtherUser) {\n <div class=\"rts-chat-info-call-actions\">\n <button class=\"rts-call-btn\"\n (click)=\"call()\"\n [disabled]=\"isTargetBlocked\"\n type=\"button\"\n title=\"Audio Call\"\n >\n <span class=\"material-icons-outlined\">call</span>\n <span>Audio</span>\n </button>\n <button class=\"rts-call-btn rts-call-btn-video\"\n (click)=\"videoCall()\"\n [disabled]=\"isTargetBlocked\"\n type=\"button\"\n title=\"Video Call\"\n >\n <span class=\"material-icons-outlined\">videocam</span>\n <span>Video</span>\n </button>\n </div>\n\n <div class=\"rts-profile-moderation-section\">\n @if (isTargetBlocked) {\n <button\n type=\"button\"\n class=\"rts-block-user-btn rts-unblock-btn\"\n [disabled]=\"blockSubmitting\"\n (click)=\"unblockTargetUser()\"\n >\n <span class=\"material-icons-outlined\">person_add_alt_1</span>\n <span>{{ blockSubmitting ? 'Unblocking...' : 'Unblock User' }}</span>\n </button>\n } @else {\n <button\n type=\"button\"\n class=\"rts-block-user-btn\"\n (click)=\"openBlockUserPrompt()\"\n >\n <span class=\"material-icons-outlined\">block</span>\n <span>Block User</span>\n </button>\n }\n\n @if (showBlockForm && !isTargetBlocked) {\n <div class=\"rts-block-modal-card\">\n <h5>Block {{ displayName }}?</h5>\n <p>\n Blocked users cannot message you directly, and their messages will be hidden for you across chats.\n </p>\n <select [(ngModel)]=\"selectedBlockReason\" aria-label=\"Reason for blocking\">\n @for (reason of blockReasons; track reason.value) {\n <option [value]=\"reason.value\">{{ reason.label }}</option>\n }\n </select>\n <textarea\n rows=\"2\"\n maxlength=\"500\"\n placeholder=\"Optional details...\"\n [(ngModel)]=\"blockExplanation\"\n ></textarea>\n <div class=\"rts-block-modal-actions\">\n <button\n type=\"button\"\n class=\"rts-block-cancel\"\n [disabled]=\"blockSubmitting\"\n (click)=\"cancelBlockUserPrompt()\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n class=\"rts-block-confirm\"\n [disabled]=\"blockSubmitting\"\n (click)=\"confirmBlockUser()\"\n >\n {{ blockSubmitting ? 'Blocking...' : 'Block User' }}\n </button>\n </div>\n </div>\n }\n </div>\n }\n\n @if (!isOtherUser && messenger.myPeer && !messenger.myPeer.isAnonymous) {\n <div class=\"rts-chat-info-actions\">\n <button class=\"rts-btn rts-btn-ghost rts-btn-block\"\n (click)=\"messenger.openManageProfile()\"\n >\n <span class=\"material-icons-outlined\">edit</span>\n {{ messenger.labels[RTSeeTextLabelKeys.MESSENGER_EDIT_PROFILE_BTN_LABEL] || 'Edit Profile' }}\n </button>\n </div>\n\n <hr class=\"rts-divider\" />\n }\n\n <!-- language selection is available to every user (anonymous included) -->\n @if (!isOtherUser && messenger.myPeer) {\n <div class=\"rts-profile-section\">\n <div class=\"rts-profile-field-row\">\n <label class=\"rts-profile-field-label\" for=\"rts-profile-language-select\">\n {{ messenger.labels[RTSeeTextLabelKeys.LANGUAGE_LABEL] || 'Language' }}\n </label>\n <p-select [options]=\"messenger.languageOptions\"\n [(ngModel)]=\"messenger.currentLanguage\"\n (ngModelChange)=\"setLanguage()\"\n optionLabel=\"key\"\n optionValue=\"key\"\n inputId=\"rts-profile-language-select\"\n [placeholder]=\"messenger.labels[RTSeeTextLabelKeys.MESSANGER_LANGUAGE_PLACEHOLDER]\"\n class=\"rts-profile-language-select\"\n />\n </div>\n </div>\n }\n\n @if (!isOtherUser && messenger.myPeer && !messenger.myPeer.isAnonymous) {\n @if (messenger.myPeer.plan) {\n <hr class=\"rts-divider\" />\n <div class=\"rts-profile-section\">\n <div class=\"rts-profile-plan-badge\">\n <span class=\"material-icons-outlined\">verified</span>\n <span>{{ messenger.myPeer.plan.productName }}</span>\n </div>\n <button class=\"rts-btn rts-btn-ghost rts-btn-block\"\n (click)=\"messenger.openManagePlanPage()\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.MANAGE_PLAN] || 'Manage Plan' }}\n </button>\n </div>\n } @else {\n <hr class=\"rts-divider\" />\n <div class=\"rts-profile-section\">\n <button class=\"rts-btn rts-btn-primary rts-btn-block\"\n (click)=\"messenger.openPaymentPage()\"\n >\n <span class=\"material-icons-outlined\">stars</span>\n {{ messenger.labels[RTSeeTextLabelKeys.SUBSCRIBE_LABEL] || 'Upgrade Plan' }}\n </button>\n </div>\n }\n\n <hr class=\"rts-divider\" />\n <div class=\"rts-chat-info-danger-zone\">\n <button class=\"rts-btn rts-btn-danger rts-btn-block\"\n (click)=\"logOut()\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.LOGOUT_BUTTON] || 'Logout' }}\n </button>\n </div>\n }\n\n @if (!isOtherUser && messenger.myPeer?.isAnonymous) {\n <hr class=\"rts-divider\" />\n <div class=\"rts-profile-anon-box\">\n <div class=\"rts-profile-anon-icon\">\n <span class=\"material-icons-outlined\">shield</span>\n </div>\n <div class=\"rts-profile-anon-text\">\n @if (!messenger.currentLanguage || messenger.currentLanguage === 'eng') {\n <p>This is a temporary anonymous identity. Sign up or sign in to save your history permanently.</p>\n } @else if (messenger.currentLanguage === 'ua') {\n <p>\u0426\u0435 \u0442\u0438\u043C\u0447\u0430\u0441\u043E\u0432\u0430 \u0430\u043D\u043E\u043D\u0456\u043C\u043D\u0430 \u043E\u0441\u043E\u0431\u0438\u0441\u0442\u0456\u0441\u0442\u044C. \u0417\u0430\u0440\u0435\u0454\u0441\u0442\u0440\u0443\u0439\u0442\u0435\u0441\u044F, \u0430\u0431\u0438 \u0437\u0431\u0435\u0440\u0435\u0433\u0442\u0438 \u0456\u0441\u0442\u043E\u0440\u0456\u044E \u0441\u043F\u0456\u043B\u043A\u0443\u0432\u0430\u043D\u043D\u044F.</p>\n }\n </div>\n </div>\n\n <div class=\"rts-profile-auth-actions\">\n <button class=\"rts-btn rts-btn-primary rts-btn-block\"\n [routerLink]=\"authConfiguration.getRoutePathSplit(AuthEndpointsKeys.SIGN_UP)\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.SIGN_UP_BUTTON] || 'Sign Up' }}\n </button>\n <button class=\"rts-btn rts-btn-ghost rts-btn-block\"\n [routerLink]=\"authConfiguration.getRoutePathSplit(AuthEndpointsKeys.SIGN_IN)\"\n >\n {{ messenger.labels[RTSeeTextLabelKeys.SIGN_IN_BUTTON] || 'Sign In' }}\n </button>\n </div>\n }\n</div>\n", styles: [".rts-profile-moderation-section{margin-top:16px;display:flex;flex-direction:column;gap:10px}.rts-block-user-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border-radius:12px;border:1px solid rgba(255,107,107,.45);background:#ff6b6b1f;color:#ff7675;font-size:14px;font-weight:600;cursor:pointer;transition:background .15s ease,border-color .15s ease}.rts-block-user-btn:hover{background:#ff6b6b38;border-color:#ff6b6bb3}.rts-block-user-btn.rts-unblock-btn{border-color:#a29bfe73;background:#6c5ce729;color:#a29bfe}.rts-block-modal-card{margin-top:8px;padding:14px;border-radius:12px;background:#ffffff0a;border:1px solid rgba(255,255,255,.14);display:flex;flex-direction:column;gap:10px}.rts-block-modal-card h5{margin:0;font-size:14px;font-weight:700}.rts-block-modal-card p{margin:0;font-size:12px;opacity:.75;line-height:1.4}.rts-block-modal-card select,.rts-block-modal-card textarea{width:100%;box-sizing:border-box;background:#1d1f29;color:#fff;border:1px solid rgba(255,255,255,.18);border-radius:9px;padding:9px 10px;font-size:13px;font-family:inherit}.rts-block-modal-actions{display:flex;justify-content:flex-end;gap:8px}.rts-block-modal-actions button{padding:8px 14px;border-radius:9px;font-size:13px;font-weight:600;cursor:pointer;border:none}.rts-block-cancel{background:#ffffff1a;color:#fff}.rts-block-confirm{background:#e14b4b;color:#fff}\n"] }]
|
|
617
680
|
}], ctorParameters: () => [{ type: RTSeeAuthService }, { type: i2.Router }], propDecorators: { messenger: [{
|
|
618
681
|
type: Input
|
|
619
682
|
}], peer: [{
|
|
@@ -5720,6 +5783,130 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
5720
5783
|
type: Input
|
|
5721
5784
|
}] } });
|
|
5722
5785
|
|
|
5786
|
+
class ProfanityWarningWidgetComponent {
|
|
5787
|
+
dismiss() {
|
|
5788
|
+
if (this.chat && this.message) {
|
|
5789
|
+
this.chat.removeLocalMessage(this.message);
|
|
5790
|
+
}
|
|
5791
|
+
}
|
|
5792
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ProfanityWarningWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5793
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: ProfanityWarningWidgetComponent, isStandalone: true, selector: "rtsee-profanity-warning-widget", inputs: { message: "message", chat: "chat", messenger: "messenger" }, ngImport: i0, template: `
|
|
5794
|
+
<div class="rts-moderation-warning rts-moderation-profanity" role="alert">
|
|
5795
|
+
<div class="rts-moderation-warning-header">
|
|
5796
|
+
<span class="material-icons-outlined rts-moderation-warning-icon">gpp_maybe</span>
|
|
5797
|
+
<strong class="rts-moderation-warning-title">Message Not Delivered</strong>
|
|
5798
|
+
<button
|
|
5799
|
+
type="button"
|
|
5800
|
+
class="rts-moderation-dismiss-btn"
|
|
5801
|
+
title="Dismiss warning"
|
|
5802
|
+
(click)="dismiss()"
|
|
5803
|
+
>
|
|
5804
|
+
<span class="material-icons-outlined">close</span>
|
|
5805
|
+
</button>
|
|
5806
|
+
</div>
|
|
5807
|
+
<p class="rts-moderation-warning-body">
|
|
5808
|
+
{{ message?.text || 'Your message was blocked by our content filter because it contains inappropriate or offensive language.' }}
|
|
5809
|
+
</p>
|
|
5810
|
+
<span class="rts-moderation-warning-sub">Only visible to you</span>
|
|
5811
|
+
</div>
|
|
5812
|
+
`, isInline: true }); }
|
|
5813
|
+
}
|
|
5814
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: ProfanityWarningWidgetComponent, decorators: [{
|
|
5815
|
+
type: Component,
|
|
5816
|
+
args: [{
|
|
5817
|
+
selector: 'rtsee-profanity-warning-widget',
|
|
5818
|
+
standalone: true,
|
|
5819
|
+
template: `
|
|
5820
|
+
<div class="rts-moderation-warning rts-moderation-profanity" role="alert">
|
|
5821
|
+
<div class="rts-moderation-warning-header">
|
|
5822
|
+
<span class="material-icons-outlined rts-moderation-warning-icon">gpp_maybe</span>
|
|
5823
|
+
<strong class="rts-moderation-warning-title">Message Not Delivered</strong>
|
|
5824
|
+
<button
|
|
5825
|
+
type="button"
|
|
5826
|
+
class="rts-moderation-dismiss-btn"
|
|
5827
|
+
title="Dismiss warning"
|
|
5828
|
+
(click)="dismiss()"
|
|
5829
|
+
>
|
|
5830
|
+
<span class="material-icons-outlined">close</span>
|
|
5831
|
+
</button>
|
|
5832
|
+
</div>
|
|
5833
|
+
<p class="rts-moderation-warning-body">
|
|
5834
|
+
{{ message?.text || 'Your message was blocked by our content filter because it contains inappropriate or offensive language.' }}
|
|
5835
|
+
</p>
|
|
5836
|
+
<span class="rts-moderation-warning-sub">Only visible to you</span>
|
|
5837
|
+
</div>
|
|
5838
|
+
`,
|
|
5839
|
+
}]
|
|
5840
|
+
}], propDecorators: { message: [{
|
|
5841
|
+
type: Input
|
|
5842
|
+
}], chat: [{
|
|
5843
|
+
type: Input
|
|
5844
|
+
}], messenger: [{
|
|
5845
|
+
type: Input
|
|
5846
|
+
}] } });
|
|
5847
|
+
|
|
5848
|
+
class BlockedUserNoticeWidgetComponent {
|
|
5849
|
+
dismiss() {
|
|
5850
|
+
if (this.chat && this.message) {
|
|
5851
|
+
this.chat.removeLocalMessage(this.message);
|
|
5852
|
+
}
|
|
5853
|
+
}
|
|
5854
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: BlockedUserNoticeWidgetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5855
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.4", type: BlockedUserNoticeWidgetComponent, isStandalone: true, selector: "rtsee-blocked-user-notice-widget", inputs: { message: "message", chat: "chat", messenger: "messenger" }, ngImport: i0, template: `
|
|
5856
|
+
<div class="rts-moderation-warning rts-moderation-blocked" role="alert">
|
|
5857
|
+
<div class="rts-moderation-warning-header">
|
|
5858
|
+
<span class="material-icons-outlined rts-moderation-warning-icon">block</span>
|
|
5859
|
+
<strong class="rts-moderation-warning-title">Cannot Send Message</strong>
|
|
5860
|
+
<button
|
|
5861
|
+
type="button"
|
|
5862
|
+
class="rts-moderation-dismiss-btn"
|
|
5863
|
+
title="Dismiss notice"
|
|
5864
|
+
(click)="dismiss()"
|
|
5865
|
+
>
|
|
5866
|
+
<span class="material-icons-outlined">close</span>
|
|
5867
|
+
</button>
|
|
5868
|
+
</div>
|
|
5869
|
+
<p class="rts-moderation-warning-body">
|
|
5870
|
+
{{ message?.text || 'You cannot send messages to this user because you have been blocked.' }}
|
|
5871
|
+
</p>
|
|
5872
|
+
<span class="rts-moderation-warning-sub">Only visible to you</span>
|
|
5873
|
+
</div>
|
|
5874
|
+
`, isInline: true }); }
|
|
5875
|
+
}
|
|
5876
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: BlockedUserNoticeWidgetComponent, decorators: [{
|
|
5877
|
+
type: Component,
|
|
5878
|
+
args: [{
|
|
5879
|
+
selector: 'rtsee-blocked-user-notice-widget',
|
|
5880
|
+
standalone: true,
|
|
5881
|
+
template: `
|
|
5882
|
+
<div class="rts-moderation-warning rts-moderation-blocked" role="alert">
|
|
5883
|
+
<div class="rts-moderation-warning-header">
|
|
5884
|
+
<span class="material-icons-outlined rts-moderation-warning-icon">block</span>
|
|
5885
|
+
<strong class="rts-moderation-warning-title">Cannot Send Message</strong>
|
|
5886
|
+
<button
|
|
5887
|
+
type="button"
|
|
5888
|
+
class="rts-moderation-dismiss-btn"
|
|
5889
|
+
title="Dismiss notice"
|
|
5890
|
+
(click)="dismiss()"
|
|
5891
|
+
>
|
|
5892
|
+
<span class="material-icons-outlined">close</span>
|
|
5893
|
+
</button>
|
|
5894
|
+
</div>
|
|
5895
|
+
<p class="rts-moderation-warning-body">
|
|
5896
|
+
{{ message?.text || 'You cannot send messages to this user because you have been blocked.' }}
|
|
5897
|
+
</p>
|
|
5898
|
+
<span class="rts-moderation-warning-sub">Only visible to you</span>
|
|
5899
|
+
</div>
|
|
5900
|
+
`,
|
|
5901
|
+
}]
|
|
5902
|
+
}], propDecorators: { message: [{
|
|
5903
|
+
type: Input
|
|
5904
|
+
}], chat: [{
|
|
5905
|
+
type: Input
|
|
5906
|
+
}], messenger: [{
|
|
5907
|
+
type: Input
|
|
5908
|
+
}] } });
|
|
5909
|
+
|
|
5723
5910
|
class MessageWidgetsService {
|
|
5724
5911
|
constructor() {
|
|
5725
5912
|
this.widgetsMap = [
|
|
@@ -5728,6 +5915,8 @@ class MessageWidgetsService {
|
|
|
5728
5915
|
{ name: 'rtsee-media', component: MediaWidgetComponent },
|
|
5729
5916
|
{ name: 'rts-workflow', component: RtsWorkflowComponent },
|
|
5730
5917
|
{ name: 'rtsee-task', component: RTSeeTaskComponent },
|
|
5918
|
+
{ name: 'rtsee-profanity-warning', component: ProfanityWarningWidgetComponent },
|
|
5919
|
+
{ name: 'rtsee-blocked-user-notice', component: BlockedUserNoticeWidgetComponent },
|
|
5731
5920
|
];
|
|
5732
5921
|
}
|
|
5733
5922
|
getWidgetComponentByName(name) {
|
|
@@ -5754,13 +5943,104 @@ class MessageComponent {
|
|
|
5754
5943
|
this.widgetsService = widgetsService;
|
|
5755
5944
|
this.componentFactoryResolver = componentFactoryResolver;
|
|
5756
5945
|
this.timeFormatService = timeFormatService;
|
|
5946
|
+
this.reportReasons = RTSEE_REPORT_REASONS;
|
|
5947
|
+
this.showActionMenu = false;
|
|
5948
|
+
this.showReportModal = false;
|
|
5949
|
+
this.selectedReportReason = RTSEE_REPORT_REASONS[0].value;
|
|
5950
|
+
this.reportExplanation = '';
|
|
5951
|
+
this.reportSubmitting = false;
|
|
5952
|
+
this.reportSubmitted = false;
|
|
5953
|
+
this.longPressTimer = null;
|
|
5757
5954
|
this.widgetRef = null;
|
|
5758
5955
|
this.widgetHasMessageInput = false;
|
|
5759
5956
|
this.currentWidgetName = null;
|
|
5760
5957
|
}
|
|
5958
|
+
get isModerationNotice() {
|
|
5959
|
+
return (this.message?.widget === RTSeeModerationWidgets.PROFANITY_WARNING ||
|
|
5960
|
+
this.message?.widget === RTSeeModerationWidgets.BLOCKED_USER_NOTICE ||
|
|
5961
|
+
Boolean(this.message?.data?.isLocalModerationNotice));
|
|
5962
|
+
}
|
|
5963
|
+
get canReportMessage() {
|
|
5964
|
+
return !this.isModerationNotice;
|
|
5965
|
+
}
|
|
5966
|
+
closeActionMenu() {
|
|
5967
|
+
if (this.showActionMenu) {
|
|
5968
|
+
this.showActionMenu = false;
|
|
5969
|
+
}
|
|
5970
|
+
}
|
|
5971
|
+
onTouchStart() {
|
|
5972
|
+
if (!this.canReportMessage) {
|
|
5973
|
+
return;
|
|
5974
|
+
}
|
|
5975
|
+
this.clearLongPressTimer();
|
|
5976
|
+
this.longPressTimer = setTimeout(() => {
|
|
5977
|
+
this.showActionMenu = true;
|
|
5978
|
+
}, 500);
|
|
5979
|
+
}
|
|
5980
|
+
onTouchEndOrMove() {
|
|
5981
|
+
this.clearLongPressTimer();
|
|
5982
|
+
}
|
|
5983
|
+
onContextMenu(event) {
|
|
5984
|
+
if (!this.canReportMessage) {
|
|
5985
|
+
return;
|
|
5986
|
+
}
|
|
5987
|
+
event.preventDefault();
|
|
5988
|
+
event.stopPropagation();
|
|
5989
|
+
this.showActionMenu = true;
|
|
5990
|
+
}
|
|
5991
|
+
openReportModal(event) {
|
|
5992
|
+
event?.stopPropagation();
|
|
5993
|
+
this.showActionMenu = false;
|
|
5994
|
+
this.selectedReportReason = RTSEE_REPORT_REASONS[0].value;
|
|
5995
|
+
this.reportExplanation = '';
|
|
5996
|
+
this.reportSubmitted = false;
|
|
5997
|
+
this.showReportModal = true;
|
|
5998
|
+
}
|
|
5999
|
+
closeReportModal(event) {
|
|
6000
|
+
event?.stopPropagation();
|
|
6001
|
+
if (this.reportSubmitting) {
|
|
6002
|
+
return;
|
|
6003
|
+
}
|
|
6004
|
+
this.showReportModal = false;
|
|
6005
|
+
}
|
|
6006
|
+
async submitReport() {
|
|
6007
|
+
if (!this.messenger || this.reportSubmitting || !this.selectedReportReason) {
|
|
6008
|
+
return;
|
|
6009
|
+
}
|
|
6010
|
+
this.reportSubmitting = true;
|
|
6011
|
+
try {
|
|
6012
|
+
await this.messenger.reportContent({
|
|
6013
|
+
messageId: this.message?.id,
|
|
6014
|
+
chatId: this.chat?.id,
|
|
6015
|
+
reportedUserId: this.message?.from?.id,
|
|
6016
|
+
messageText: this.message?.text,
|
|
6017
|
+
reason: this.selectedReportReason,
|
|
6018
|
+
explanation: this.reportExplanation.trim() || undefined,
|
|
6019
|
+
});
|
|
6020
|
+
this.reportSubmitted = true;
|
|
6021
|
+
setTimeout(() => {
|
|
6022
|
+
this.showReportModal = false;
|
|
6023
|
+
this.reportSubmitted = false;
|
|
6024
|
+
}, 1200);
|
|
6025
|
+
}
|
|
6026
|
+
catch (e) {
|
|
6027
|
+
console.error('Failed to submit content report:', e);
|
|
6028
|
+
}
|
|
6029
|
+
finally {
|
|
6030
|
+
this.reportSubmitting = false;
|
|
6031
|
+
}
|
|
6032
|
+
}
|
|
5761
6033
|
ngOnInit() { }
|
|
6034
|
+
ngOnDestroy() {
|
|
6035
|
+
this.clearLongPressTimer();
|
|
6036
|
+
}
|
|
6037
|
+
clearLongPressTimer() {
|
|
6038
|
+
if (this.longPressTimer) {
|
|
6039
|
+
clearTimeout(this.longPressTimer);
|
|
6040
|
+
this.longPressTimer = null;
|
|
6041
|
+
}
|
|
6042
|
+
}
|
|
5762
6043
|
ngOnChanges(changes) {
|
|
5763
|
-
// The message instance or widget type can be replaced (e.g. stream start -> media widget -> downsized versions)
|
|
5764
6044
|
if (changes['message'] && !changes['message'].firstChange) {
|
|
5765
6045
|
if (this.widgetHost && this.message?.widget !== this.currentWidgetName) {
|
|
5766
6046
|
this.renderWidget();
|
|
@@ -5809,16 +6089,17 @@ class MessageComponent {
|
|
|
5809
6089
|
/* eslint-enable */
|
|
5810
6090
|
}
|
|
5811
6091
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: MessageComponent, deps: [{ token: MessageWidgetsService }, { token: i0.ComponentFactoryResolver }, { token: TimeFormatHelperService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5812
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: MessageComponent, isStandalone: true, selector: "rtsee-message", inputs: { chat: "chat", message: "message", member: "member", messenger: "messenger" }, viewQueries: [{ propertyName: "widgetHost", first: true, predicate: WidgetDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"rts-message-container\" #rtsMessageContainer\n data-ugc=\"true\"\n rel=\"ugc\"\n itemprop=\"comment\"\n itemscope\n itemtype=\"https://schema.org/Comment\"\n [ngClass]=\"{\n
|
|
6092
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: MessageComponent, isStandalone: true, selector: "rtsee-message", inputs: { chat: "chat", message: "message", member: "member", messenger: "messenger" }, host: { listeners: { "document:click": "closeActionMenu()" } }, viewQueries: [{ propertyName: "widgetHost", first: true, predicate: WidgetDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"rts-message-container\" #rtsMessageContainer\n data-ugc=\"true\"\n rel=\"ugc\"\n itemprop=\"comment\"\n itemscope\n itemtype=\"https://schema.org/Comment\"\n (touchstart)=\"onTouchStart()\"\n (touchend)=\"onTouchEndOrMove()\"\n (touchmove)=\"onTouchEndOrMove()\"\n (touchcancel)=\"onTouchEndOrMove()\"\n (contextmenu)=\"onContextMenu($event)\"\n [ngClass]=\"{\n 'rts-message-from-me': message.from.id === messenger.clientId,\n 'rts-message-is-widget': !!message.widget,\n 'rts-message-is-moderation-notice': isModerationNotice\n }\">\n @if (showActionMenu && canReportMessage) {\n <div class=\"rts-message-action-menu\" (click)=\"$event.stopPropagation()\">\n <button\n type=\"button\"\n class=\"rts-message-action-menu-btn\"\n (click)=\"openReportModal($event)\"\n >\n <span class=\"material-icons-outlined\">flag</span>\n <span>Report</span>\n </button>\n </div>\n }\n\n <div class=\"rts-messenger-message\">\n @if (message.widget) {\n <ng-template widgetHost></ng-template>\n }\n @if (!message.widget) {\n <p class=\"rts-messenger-message-text\"\n itemprop=\"text\"\n data-ugc=\"true\"\n rel=\"ugc\"\n >{{ message.text }}</p>\n }\n @if (!isModerationNotice) {\n <div class=\"rts-messenger-message-info\" #rtsMessageInfo>\n @if (canReportMessage) {\n <button\n type=\"button\"\n class=\"rts-message-hover-report-btn\"\n title=\"Report message\"\n (click)=\"openReportModal($event)\"\n >\n <span class=\"material-icons-outlined\">flag</span>\n </button>\n }\n <rtsee-message-time-and-status\n [message]=\"message\"\n [inChat]=\"true\"\n [hideStatus]=\"message.from.id !== messenger.clientId\"\n ></rtsee-message-time-and-status>\n </div>\n }\n </div>\n</div>\n\n@if (showReportModal) {\n <div class=\"rts-moderation-modal-backdrop\" (click)=\"closeReportModal($event)\">\n <div class=\"rts-moderation-modal\" (click)=\"$event.stopPropagation()\">\n <h4>\n <span class=\"material-icons-outlined\" style=\"color: #ff7675\">flag</span>\n <span>Report Message</span>\n </h4>\n @if (reportSubmitted) {\n <p class=\"rts-moderation-modal-desc\" style=\"color: #55efc4; margin-bottom: 0\">\n Thank you. Your report has been submitted for moderation review within 24 hours.\n </p>\n } @else {\n <p class=\"rts-moderation-modal-desc\">\n Select why you are reporting this message. Our moderation team reviews reports promptly.\n </p>\n <div class=\"rts-moderation-field\">\n <label for=\"rts-report-reason-select\">Reason</label>\n <select\n id=\"rts-report-reason-select\"\n [(ngModel)]=\"selectedReportReason\"\n >\n @for (reason of reportReasons; track reason.value) {\n <option [value]=\"reason.value\">{{ reason.label }}</option>\n }\n </select>\n </div>\n <div class=\"rts-moderation-field\">\n <label for=\"rts-report-explanation\">Additional explanation (optional)</label>\n <textarea\n id=\"rts-report-explanation\"\n rows=\"3\"\n maxlength=\"1000\"\n placeholder=\"Provide any relevant context...\"\n [(ngModel)]=\"reportExplanation\"\n ></textarea>\n </div>\n <div class=\"rts-moderation-modal-actions\">\n <button\n type=\"button\"\n class=\"rts-moderation-btn rts-moderation-btn-cancel\"\n [disabled]=\"reportSubmitting\"\n (click)=\"closeReportModal($event)\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n class=\"rts-moderation-btn rts-moderation-btn-danger\"\n [disabled]=\"reportSubmitting || !selectedReportReason\"\n (click)=\"submitReport()\"\n >\n {{ reportSubmitting ? 'Submitting...' : 'Submit Report' }}\n </button>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".rts-message-container{position:relative}.rts-message-hover-report-btn{opacity:0;background:transparent;border:none;color:#ffffff8c;cursor:pointer;padding:2px 4px;border-radius:6px;display:inline-flex;align-items:center;transition:opacity .15s ease,color .15s ease,background .15s ease}.rts-message-container:hover .rts-message-hover-report-btn,.rts-message-hover-report-btn:focus-visible{opacity:1}.rts-message-hover-report-btn:hover{color:#ff7675;background:#ff76751f}.rts-message-hover-report-btn .material-icons-outlined{font-size:14px}.rts-message-action-menu{position:absolute;top:-36px;left:12px;z-index:30;background:#1c1d24;border:1px solid rgba(255,255,255,.16);border-radius:10px;padding:4px;box-shadow:0 8px 24px #00000073;display:inline-flex;gap:4px}.rts-message-from-me .rts-message-action-menu{left:auto;right:12px}.rts-message-action-menu-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border:none;border-radius:7px;background:transparent;color:#ff7675;font-size:13px;font-weight:600;cursor:pointer}.rts-message-action-menu-btn:hover{background:#ff767524}.rts-message-action-menu-btn .material-icons-outlined{font-size:16px}.rts-moderation-modal-backdrop{position:fixed;inset:0;z-index:9999;background:#000000a6;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:16px}.rts-moderation-modal{width:100%;max-width:420px;background:#16171d;color:#f5f6fa;border:1px solid rgba(255,255,255,.14);border-radius:16px;padding:20px;box-shadow:0 20px 50px #0009}.rts-moderation-modal h4{margin:0 0 6px;font-size:17px;font-weight:700;display:flex;align-items:center;gap:8px}.rts-moderation-modal p.rts-moderation-modal-desc{margin:0 0 14px;font-size:13px;color:#ffffffad;line-height:1.45}.rts-moderation-field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}.rts-moderation-field label{font-size:12px;font-weight:600;color:#fffc}.rts-moderation-field select,.rts-moderation-field textarea{width:100%;box-sizing:border-box;background:#22242e;color:#fff;border:1px solid rgba(255,255,255,.18);border-radius:10px;padding:10px 12px;font-size:14px;font-family:inherit}.rts-moderation-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:8px}.rts-moderation-btn{padding:9px 16px;border-radius:10px;font-size:13px;font-weight:600;cursor:pointer;border:1px solid transparent}.rts-moderation-btn-cancel{background:#ffffff14;color:#fff}.rts-moderation-btn-danger{background:#e14b4b;color:#fff}.rts-moderation-btn:disabled{opacity:.6;cursor:not-allowed}:host ::ng-deep .rts-moderation-warning{border-radius:12px;padding:10px 12px;min-width:220px;border:1px solid rgba(255,159,67,.45);background:#ff9f4324;color:#fff}:host ::ng-deep .rts-moderation-blocked{border-color:#eb4d4b80;background:#eb4d4b26}:host ::ng-deep .rts-moderation-warning-header{display:flex;align-items:center;gap:6px;margin-bottom:4px}:host ::ng-deep .rts-moderation-warning-icon{font-size:18px;color:#ff9f43}:host ::ng-deep .rts-moderation-blocked .rts-moderation-warning-icon{color:#ff6b6b}:host ::ng-deep .rts-moderation-warning-title{flex:1;font-size:13px;font-weight:700}:host ::ng-deep .rts-moderation-dismiss-btn{background:transparent;border:none;color:#ffffffb3;cursor:pointer;padding:2px;display:inline-flex}:host ::ng-deep .rts-moderation-dismiss-btn .material-icons-outlined{font-size:16px}:host ::ng-deep .rts-moderation-warning-body{margin:0 0 4px;font-size:13px;line-height:1.4}:host ::ng-deep .rts-moderation-warning-sub{font-size:11px;opacity:.72}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: MessageTimeAndStatusComponent, selector: "rtsee-message-time-and-status", inputs: ["message", "hideStatus", "inChat"] }, { kind: "directive", type: WidgetDirective, selector: "[widgetHost]" }] }); }
|
|
5813
6093
|
}
|
|
5814
6094
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: MessageComponent, decorators: [{
|
|
5815
6095
|
type: Component,
|
|
5816
6096
|
args: [{ selector: 'rtsee-message', imports: [
|
|
5817
6097
|
NgClass,
|
|
6098
|
+
FormsModule,
|
|
5818
6099
|
MessageTimeAndStatusComponent,
|
|
5819
6100
|
WidgetDirective,
|
|
5820
6101
|
RatingComponent,
|
|
5821
|
-
], standalone: true, template: "<div class=\"rts-message-container\" #rtsMessageContainer\n data-ugc=\"true\"\n rel=\"ugc\"\n itemprop=\"comment\"\n itemscope\n itemtype=\"https://schema.org/Comment\"\n [ngClass]=\"{\n
|
|
6102
|
+
], standalone: true, template: "<div class=\"rts-message-container\" #rtsMessageContainer\n data-ugc=\"true\"\n rel=\"ugc\"\n itemprop=\"comment\"\n itemscope\n itemtype=\"https://schema.org/Comment\"\n (touchstart)=\"onTouchStart()\"\n (touchend)=\"onTouchEndOrMove()\"\n (touchmove)=\"onTouchEndOrMove()\"\n (touchcancel)=\"onTouchEndOrMove()\"\n (contextmenu)=\"onContextMenu($event)\"\n [ngClass]=\"{\n 'rts-message-from-me': message.from.id === messenger.clientId,\n 'rts-message-is-widget': !!message.widget,\n 'rts-message-is-moderation-notice': isModerationNotice\n }\">\n @if (showActionMenu && canReportMessage) {\n <div class=\"rts-message-action-menu\" (click)=\"$event.stopPropagation()\">\n <button\n type=\"button\"\n class=\"rts-message-action-menu-btn\"\n (click)=\"openReportModal($event)\"\n >\n <span class=\"material-icons-outlined\">flag</span>\n <span>Report</span>\n </button>\n </div>\n }\n\n <div class=\"rts-messenger-message\">\n @if (message.widget) {\n <ng-template widgetHost></ng-template>\n }\n @if (!message.widget) {\n <p class=\"rts-messenger-message-text\"\n itemprop=\"text\"\n data-ugc=\"true\"\n rel=\"ugc\"\n >{{ message.text }}</p>\n }\n @if (!isModerationNotice) {\n <div class=\"rts-messenger-message-info\" #rtsMessageInfo>\n @if (canReportMessage) {\n <button\n type=\"button\"\n class=\"rts-message-hover-report-btn\"\n title=\"Report message\"\n (click)=\"openReportModal($event)\"\n >\n <span class=\"material-icons-outlined\">flag</span>\n </button>\n }\n <rtsee-message-time-and-status\n [message]=\"message\"\n [inChat]=\"true\"\n [hideStatus]=\"message.from.id !== messenger.clientId\"\n ></rtsee-message-time-and-status>\n </div>\n }\n </div>\n</div>\n\n@if (showReportModal) {\n <div class=\"rts-moderation-modal-backdrop\" (click)=\"closeReportModal($event)\">\n <div class=\"rts-moderation-modal\" (click)=\"$event.stopPropagation()\">\n <h4>\n <span class=\"material-icons-outlined\" style=\"color: #ff7675\">flag</span>\n <span>Report Message</span>\n </h4>\n @if (reportSubmitted) {\n <p class=\"rts-moderation-modal-desc\" style=\"color: #55efc4; margin-bottom: 0\">\n Thank you. Your report has been submitted for moderation review within 24 hours.\n </p>\n } @else {\n <p class=\"rts-moderation-modal-desc\">\n Select why you are reporting this message. Our moderation team reviews reports promptly.\n </p>\n <div class=\"rts-moderation-field\">\n <label for=\"rts-report-reason-select\">Reason</label>\n <select\n id=\"rts-report-reason-select\"\n [(ngModel)]=\"selectedReportReason\"\n >\n @for (reason of reportReasons; track reason.value) {\n <option [value]=\"reason.value\">{{ reason.label }}</option>\n }\n </select>\n </div>\n <div class=\"rts-moderation-field\">\n <label for=\"rts-report-explanation\">Additional explanation (optional)</label>\n <textarea\n id=\"rts-report-explanation\"\n rows=\"3\"\n maxlength=\"1000\"\n placeholder=\"Provide any relevant context...\"\n [(ngModel)]=\"reportExplanation\"\n ></textarea>\n </div>\n <div class=\"rts-moderation-modal-actions\">\n <button\n type=\"button\"\n class=\"rts-moderation-btn rts-moderation-btn-cancel\"\n [disabled]=\"reportSubmitting\"\n (click)=\"closeReportModal($event)\"\n >\n Cancel\n </button>\n <button\n type=\"button\"\n class=\"rts-moderation-btn rts-moderation-btn-danger\"\n [disabled]=\"reportSubmitting || !selectedReportReason\"\n (click)=\"submitReport()\"\n >\n {{ reportSubmitting ? 'Submitting...' : 'Submit Report' }}\n </button>\n </div>\n }\n </div>\n </div>\n}\n", styles: [".rts-message-container{position:relative}.rts-message-hover-report-btn{opacity:0;background:transparent;border:none;color:#ffffff8c;cursor:pointer;padding:2px 4px;border-radius:6px;display:inline-flex;align-items:center;transition:opacity .15s ease,color .15s ease,background .15s ease}.rts-message-container:hover .rts-message-hover-report-btn,.rts-message-hover-report-btn:focus-visible{opacity:1}.rts-message-hover-report-btn:hover{color:#ff7675;background:#ff76751f}.rts-message-hover-report-btn .material-icons-outlined{font-size:14px}.rts-message-action-menu{position:absolute;top:-36px;left:12px;z-index:30;background:#1c1d24;border:1px solid rgba(255,255,255,.16);border-radius:10px;padding:4px;box-shadow:0 8px 24px #00000073;display:inline-flex;gap:4px}.rts-message-from-me .rts-message-action-menu{left:auto;right:12px}.rts-message-action-menu-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border:none;border-radius:7px;background:transparent;color:#ff7675;font-size:13px;font-weight:600;cursor:pointer}.rts-message-action-menu-btn:hover{background:#ff767524}.rts-message-action-menu-btn .material-icons-outlined{font-size:16px}.rts-moderation-modal-backdrop{position:fixed;inset:0;z-index:9999;background:#000000a6;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;padding:16px}.rts-moderation-modal{width:100%;max-width:420px;background:#16171d;color:#f5f6fa;border:1px solid rgba(255,255,255,.14);border-radius:16px;padding:20px;box-shadow:0 20px 50px #0009}.rts-moderation-modal h4{margin:0 0 6px;font-size:17px;font-weight:700;display:flex;align-items:center;gap:8px}.rts-moderation-modal p.rts-moderation-modal-desc{margin:0 0 14px;font-size:13px;color:#ffffffad;line-height:1.45}.rts-moderation-field{display:flex;flex-direction:column;gap:6px;margin-bottom:14px}.rts-moderation-field label{font-size:12px;font-weight:600;color:#fffc}.rts-moderation-field select,.rts-moderation-field textarea{width:100%;box-sizing:border-box;background:#22242e;color:#fff;border:1px solid rgba(255,255,255,.18);border-radius:10px;padding:10px 12px;font-size:14px;font-family:inherit}.rts-moderation-modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:8px}.rts-moderation-btn{padding:9px 16px;border-radius:10px;font-size:13px;font-weight:600;cursor:pointer;border:1px solid transparent}.rts-moderation-btn-cancel{background:#ffffff14;color:#fff}.rts-moderation-btn-danger{background:#e14b4b;color:#fff}.rts-moderation-btn:disabled{opacity:.6;cursor:not-allowed}:host ::ng-deep .rts-moderation-warning{border-radius:12px;padding:10px 12px;min-width:220px;border:1px solid rgba(255,159,67,.45);background:#ff9f4324;color:#fff}:host ::ng-deep .rts-moderation-blocked{border-color:#eb4d4b80;background:#eb4d4b26}:host ::ng-deep .rts-moderation-warning-header{display:flex;align-items:center;gap:6px;margin-bottom:4px}:host ::ng-deep .rts-moderation-warning-icon{font-size:18px;color:#ff9f43}:host ::ng-deep .rts-moderation-blocked .rts-moderation-warning-icon{color:#ff6b6b}:host ::ng-deep .rts-moderation-warning-title{flex:1;font-size:13px;font-weight:700}:host ::ng-deep .rts-moderation-dismiss-btn{background:transparent;border:none;color:#ffffffb3;cursor:pointer;padding:2px;display:inline-flex}:host ::ng-deep .rts-moderation-dismiss-btn .material-icons-outlined{font-size:16px}:host ::ng-deep .rts-moderation-warning-body{margin:0 0 4px;font-size:13px;line-height:1.4}:host ::ng-deep .rts-moderation-warning-sub{font-size:11px;opacity:.72}\n"] }]
|
|
5822
6103
|
}], ctorParameters: () => [{ type: MessageWidgetsService }, { type: i0.ComponentFactoryResolver }, { type: TimeFormatHelperService }], propDecorators: { chat: [{
|
|
5823
6104
|
type: Input
|
|
5824
6105
|
}], message: [{
|
|
@@ -5830,6 +6111,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
5830
6111
|
}], widgetHost: [{
|
|
5831
6112
|
type: ViewChild,
|
|
5832
6113
|
args: [WidgetDirective, { static: false }]
|
|
6114
|
+
}], closeActionMenu: [{
|
|
6115
|
+
type: HostListener,
|
|
6116
|
+
args: ['document:click']
|
|
5833
6117
|
}] } });
|
|
5834
6118
|
|
|
5835
6119
|
const STICK_TO_BOTTOM_THRESHOLD = 32;
|
|
@@ -8165,6 +8449,27 @@ class RtseeEventsDashboardComponent {
|
|
|
8165
8449
|
constructor() {
|
|
8166
8450
|
this.framed = false;
|
|
8167
8451
|
this.isFramed = false;
|
|
8452
|
+
this.activeTab = 'sessions';
|
|
8453
|
+
}
|
|
8454
|
+
get reportsManager() {
|
|
8455
|
+
return this.eventsDashboard?.reports;
|
|
8456
|
+
}
|
|
8457
|
+
selectTab(tab) {
|
|
8458
|
+
this.activeTab = tab;
|
|
8459
|
+
if (tab === 'reports') {
|
|
8460
|
+
this.reportsManager?.loadReports(this.reportsManager.reportsPage || 1);
|
|
8461
|
+
}
|
|
8462
|
+
else if (tab === 'blocks') {
|
|
8463
|
+
this.reportsManager?.loadBlocks(this.reportsManager.blocksPage || 1);
|
|
8464
|
+
}
|
|
8465
|
+
}
|
|
8466
|
+
refreshModerationTab() {
|
|
8467
|
+
if (this.activeTab === 'reports') {
|
|
8468
|
+
this.reportsManager?.loadReports(this.reportsManager.reportsPage || 1);
|
|
8469
|
+
}
|
|
8470
|
+
else if (this.activeTab === 'blocks') {
|
|
8471
|
+
this.reportsManager?.loadBlocks(this.reportsManager.blocksPage || 1);
|
|
8472
|
+
}
|
|
8168
8473
|
}
|
|
8169
8474
|
loadMore() {
|
|
8170
8475
|
if (this.eventsDashboard) {
|
|
@@ -8172,11 +8477,11 @@ class RtseeEventsDashboardComponent {
|
|
|
8172
8477
|
}
|
|
8173
8478
|
}
|
|
8174
8479
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RtseeEventsDashboardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
8175
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RtseeEventsDashboardComponent, isStandalone: true, selector: "rtsee-events-dashboard", inputs: { eventsDashboard: "eventsDashboard", framed: "framed", isFramed: "isFramed" }, ngImport: i0, template: "<div class=\"rtsee-events-dashboard\"\n [ngClass]=\"{\n 'rtsee-events-dashboard-framed': framed || isFramed,\n 'rts-messenger-framed': framed || isFramed\n }\"\n>\n <div class=\"rtsee-events-dashboard-client-thumbnails\">\n
|
|
8480
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: RtseeEventsDashboardComponent, isStandalone: true, selector: "rtsee-events-dashboard", inputs: { eventsDashboard: "eventsDashboard", framed: "framed", isFramed: "isFramed" }, ngImport: i0, template: "<div class=\"rtsee-events-dashboard\"\n [ngClass]=\"{\n 'rtsee-events-dashboard-framed': framed || isFramed,\n 'rts-messenger-framed': framed || isFramed\n }\"\n>\n <div class=\"rtsee-events-dashboard-tabs\">\n <button\n type=\"button\"\n class=\"rtsee-events-dashboard-tab\"\n [class.active]=\"activeTab === 'sessions'\"\n (click)=\"selectTab('sessions')\"\n >\n <span class=\"material-icons-outlined\">sensors</span>\n <span>Sessions</span>\n </button>\n <button\n type=\"button\"\n class=\"rtsee-events-dashboard-tab\"\n [class.active]=\"activeTab === 'reports'\"\n (click)=\"selectTab('reports')\"\n >\n <span class=\"material-icons-outlined\">flag</span>\n <span>Reports</span>\n @if (reportsManager && reportsManager.reportsTotal > 0) {\n <span class=\"rtsee-events-dashboard-badge\">{{ reportsManager.reportsTotal }}</span>\n }\n </button>\n <button\n type=\"button\"\n class=\"rtsee-events-dashboard-tab\"\n [class.active]=\"activeTab === 'blocks'\"\n (click)=\"selectTab('blocks')\"\n >\n <span class=\"material-icons-outlined\">block</span>\n <span>Blocks</span>\n @if (reportsManager && reportsManager.blocksTotal > 0) {\n <span class=\"rtsee-events-dashboard-badge\">{{ reportsManager.blocksTotal }}</span>\n }\n </button>\n\n @if (activeTab !== 'sessions') {\n <button\n type=\"button\"\n class=\"rtsee-events-dashboard-refresh-btn\"\n (click)=\"refreshModerationTab()\"\n title=\"Refresh list\"\n >\n <span class=\"material-icons-outlined\">refresh</span>\n </button>\n }\n </div>\n\n @if (activeTab === 'sessions') {\n <div class=\"rtsee-events-dashboard-client-thumbnails\">\n @for (client of eventsDashboard.clients; track client.id) {\n <div class=\"rtsee-events-dashboard-client-thumbnail-wrapper\">\n <ngx-rtsee-events-dashboard-client-thumbnail\n [client]=\"client\"\n [dashboard]=\"eventsDashboard\"\n ></ngx-rtsee-events-dashboard-client-thumbnail>\n </div>\n }\n </div>\n\n @if (eventsDashboard?.hasMoreClients) {\n <div class=\"rtsee-events-dashboard-load-more\">\n <button\n type=\"button\"\n class=\"rtsee-events-dashboard-load-more-btn\"\n [disabled]=\"eventsDashboard.isLoadingMore\"\n (click)=\"loadMore()\"\n >\n @if (eventsDashboard.isLoadingMore) {\n <span class=\"material-icons-outlined spin-icon\">sync</span>\n <span>Loading...</span>\n } @else {\n <span class=\"material-icons-outlined\">expand_more</span>\n <span>Load More Sessions</span>\n }\n </button>\n </div>\n }\n }\n\n @if (activeTab === 'reports' && reportsManager) {\n <div class=\"rtsee-moderation-panel\">\n @if (reportsManager.reportsLoading) {\n <div class=\"rtsee-moderation-empty\">Loading reports...</div>\n } @else if (!reportsManager.reports.length) {\n <div class=\"rtsee-moderation-empty\">No content reports have been submitted yet.</div>\n } @else {\n <div class=\"rtsee-moderation-list\">\n @for (item of reportsManager.reports; track item.id) {\n <div class=\"rtsee-moderation-card\">\n <div class=\"rtsee-moderation-card-top\">\n <div class=\"rtsee-moderation-actors\">\n <span class=\"actor-label\">Reporter:</span>\n <strong>{{ item.reporter.name }}</strong>\n <span class=\"actor-arrow\">\u2192</span>\n <span class=\"actor-label\">Reported:</span>\n <strong>{{ item.reportedUser?.name || 'Unknown User' }}</strong>\n </div>\n <span class=\"rtsee-moderation-time\">\n {{ item.createdAt | date: 'medium' }}\n </span>\n </div>\n <div class=\"rtsee-moderation-reason-chip\">\n <span class=\"material-icons-outlined\">flag</span>\n <span>{{ item.reason }}</span>\n </div>\n @if (item.explanation) {\n <p class=\"rtsee-moderation-explanation\">\n <strong>Explanation:</strong> {{ item.explanation }}\n </p>\n }\n @if (item.messageText) {\n <div class=\"rtsee-moderation-message-quote\">\n <span>Reported message:</span> \"{{ item.messageText }}\"\n </div>\n }\n </div>\n }\n </div>\n\n <div class=\"rtsee-moderation-pagination\">\n <button\n type=\"button\"\n [disabled]=\"!reportsManager.hasPrevReportsPage || reportsManager.reportsLoading\"\n (click)=\"reportsManager.prevReportsPage()\"\n >\n Previous\n </button>\n <span>\n Page {{ reportsManager.reportsPage }} of {{ reportsManager.reportsTotalPages }}\n ({{ reportsManager.reportsTotal }} total)\n </span>\n <button\n type=\"button\"\n [disabled]=\"!reportsManager.hasNextReportsPage || reportsManager.reportsLoading\"\n (click)=\"reportsManager.nextReportsPage()\"\n >\n Next\n </button>\n </div>\n }\n </div>\n }\n\n @if (activeTab === 'blocks' && reportsManager) {\n <div class=\"rtsee-moderation-panel\">\n @if (reportsManager.blocksLoading) {\n <div class=\"rtsee-moderation-empty\">Loading blocks...</div>\n } @else if (!reportsManager.blocks.length) {\n <div class=\"rtsee-moderation-empty\">No active user blocks recorded.</div>\n } @else {\n <div class=\"rtsee-moderation-list\">\n @for (block of reportsManager.blocks; track block.id) {\n <div class=\"rtsee-moderation-card\">\n <div class=\"rtsee-moderation-card-top\">\n <div class=\"rtsee-moderation-actors\">\n <span class=\"actor-label\">Blocked by:</span>\n <strong>{{ block.blocker.name }}</strong>\n <span class=\"actor-arrow\">\u2192</span>\n <span class=\"actor-label\">Blocked user:</span>\n <strong>{{ block.blockedUser.name }}</strong>\n </div>\n <span class=\"rtsee-moderation-time\">\n {{ block.createdAt | date: 'medium' }}\n </span>\n </div>\n <div class=\"rtsee-moderation-reason-chip rtsee-block-chip\">\n <span class=\"material-icons-outlined\">block</span>\n <span>{{ block.reason }}</span>\n </div>\n @if (block.explanation) {\n <p class=\"rtsee-moderation-explanation\">\n <strong>Explanation:</strong> {{ block.explanation }}\n </p>\n }\n </div>\n }\n </div>\n\n <div class=\"rtsee-moderation-pagination\">\n <button\n type=\"button\"\n [disabled]=\"!reportsManager.hasPrevBlocksPage || reportsManager.blocksLoading\"\n (click)=\"reportsManager.prevBlocksPage()\"\n >\n Previous\n </button>\n <span>\n Page {{ reportsManager.blocksPage }} of {{ reportsManager.blocksTotalPages }}\n ({{ reportsManager.blocksTotal }} total)\n </span>\n <button\n type=\"button\"\n [disabled]=\"!reportsManager.hasNextBlocksPage || reportsManager.blocksLoading\"\n (click)=\"reportsManager.nextBlocksPage()\"\n >\n Next\n </button>\n </div>\n }\n </div>\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: RtseeEventsDashboardClientThumbnailComponent, selector: "ngx-rtsee-events-dashboard-client-thumbnail", inputs: ["dashboard", "client"] }, { kind: "pipe", type: DatePipe, name: "date" }] }); }
|
|
8176
8481
|
}
|
|
8177
8482
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: RtseeEventsDashboardComponent, decorators: [{
|
|
8178
8483
|
type: Component,
|
|
8179
|
-
args: [{ selector: 'rtsee-events-dashboard', imports: [NgClass, RtseeEventsDashboardClientThumbnailComponent], standalone: true, template: "<div class=\"rtsee-events-dashboard\"\n [ngClass]=\"{\n 'rtsee-events-dashboard-framed': framed || isFramed,\n 'rts-messenger-framed': framed || isFramed\n }\"\n>\n <div class=\"rtsee-events-dashboard-client-thumbnails\">\n
|
|
8484
|
+
args: [{ selector: 'rtsee-events-dashboard', imports: [NgClass, DatePipe, RtseeEventsDashboardClientThumbnailComponent], standalone: true, template: "<div class=\"rtsee-events-dashboard\"\n [ngClass]=\"{\n 'rtsee-events-dashboard-framed': framed || isFramed,\n 'rts-messenger-framed': framed || isFramed\n }\"\n>\n <div class=\"rtsee-events-dashboard-tabs\">\n <button\n type=\"button\"\n class=\"rtsee-events-dashboard-tab\"\n [class.active]=\"activeTab === 'sessions'\"\n (click)=\"selectTab('sessions')\"\n >\n <span class=\"material-icons-outlined\">sensors</span>\n <span>Sessions</span>\n </button>\n <button\n type=\"button\"\n class=\"rtsee-events-dashboard-tab\"\n [class.active]=\"activeTab === 'reports'\"\n (click)=\"selectTab('reports')\"\n >\n <span class=\"material-icons-outlined\">flag</span>\n <span>Reports</span>\n @if (reportsManager && reportsManager.reportsTotal > 0) {\n <span class=\"rtsee-events-dashboard-badge\">{{ reportsManager.reportsTotal }}</span>\n }\n </button>\n <button\n type=\"button\"\n class=\"rtsee-events-dashboard-tab\"\n [class.active]=\"activeTab === 'blocks'\"\n (click)=\"selectTab('blocks')\"\n >\n <span class=\"material-icons-outlined\">block</span>\n <span>Blocks</span>\n @if (reportsManager && reportsManager.blocksTotal > 0) {\n <span class=\"rtsee-events-dashboard-badge\">{{ reportsManager.blocksTotal }}</span>\n }\n </button>\n\n @if (activeTab !== 'sessions') {\n <button\n type=\"button\"\n class=\"rtsee-events-dashboard-refresh-btn\"\n (click)=\"refreshModerationTab()\"\n title=\"Refresh list\"\n >\n <span class=\"material-icons-outlined\">refresh</span>\n </button>\n }\n </div>\n\n @if (activeTab === 'sessions') {\n <div class=\"rtsee-events-dashboard-client-thumbnails\">\n @for (client of eventsDashboard.clients; track client.id) {\n <div class=\"rtsee-events-dashboard-client-thumbnail-wrapper\">\n <ngx-rtsee-events-dashboard-client-thumbnail\n [client]=\"client\"\n [dashboard]=\"eventsDashboard\"\n ></ngx-rtsee-events-dashboard-client-thumbnail>\n </div>\n }\n </div>\n\n @if (eventsDashboard?.hasMoreClients) {\n <div class=\"rtsee-events-dashboard-load-more\">\n <button\n type=\"button\"\n class=\"rtsee-events-dashboard-load-more-btn\"\n [disabled]=\"eventsDashboard.isLoadingMore\"\n (click)=\"loadMore()\"\n >\n @if (eventsDashboard.isLoadingMore) {\n <span class=\"material-icons-outlined spin-icon\">sync</span>\n <span>Loading...</span>\n } @else {\n <span class=\"material-icons-outlined\">expand_more</span>\n <span>Load More Sessions</span>\n }\n </button>\n </div>\n }\n }\n\n @if (activeTab === 'reports' && reportsManager) {\n <div class=\"rtsee-moderation-panel\">\n @if (reportsManager.reportsLoading) {\n <div class=\"rtsee-moderation-empty\">Loading reports...</div>\n } @else if (!reportsManager.reports.length) {\n <div class=\"rtsee-moderation-empty\">No content reports have been submitted yet.</div>\n } @else {\n <div class=\"rtsee-moderation-list\">\n @for (item of reportsManager.reports; track item.id) {\n <div class=\"rtsee-moderation-card\">\n <div class=\"rtsee-moderation-card-top\">\n <div class=\"rtsee-moderation-actors\">\n <span class=\"actor-label\">Reporter:</span>\n <strong>{{ item.reporter.name }}</strong>\n <span class=\"actor-arrow\">\u2192</span>\n <span class=\"actor-label\">Reported:</span>\n <strong>{{ item.reportedUser?.name || 'Unknown User' }}</strong>\n </div>\n <span class=\"rtsee-moderation-time\">\n {{ item.createdAt | date: 'medium' }}\n </span>\n </div>\n <div class=\"rtsee-moderation-reason-chip\">\n <span class=\"material-icons-outlined\">flag</span>\n <span>{{ item.reason }}</span>\n </div>\n @if (item.explanation) {\n <p class=\"rtsee-moderation-explanation\">\n <strong>Explanation:</strong> {{ item.explanation }}\n </p>\n }\n @if (item.messageText) {\n <div class=\"rtsee-moderation-message-quote\">\n <span>Reported message:</span> \"{{ item.messageText }}\"\n </div>\n }\n </div>\n }\n </div>\n\n <div class=\"rtsee-moderation-pagination\">\n <button\n type=\"button\"\n [disabled]=\"!reportsManager.hasPrevReportsPage || reportsManager.reportsLoading\"\n (click)=\"reportsManager.prevReportsPage()\"\n >\n Previous\n </button>\n <span>\n Page {{ reportsManager.reportsPage }} of {{ reportsManager.reportsTotalPages }}\n ({{ reportsManager.reportsTotal }} total)\n </span>\n <button\n type=\"button\"\n [disabled]=\"!reportsManager.hasNextReportsPage || reportsManager.reportsLoading\"\n (click)=\"reportsManager.nextReportsPage()\"\n >\n Next\n </button>\n </div>\n }\n </div>\n }\n\n @if (activeTab === 'blocks' && reportsManager) {\n <div class=\"rtsee-moderation-panel\">\n @if (reportsManager.blocksLoading) {\n <div class=\"rtsee-moderation-empty\">Loading blocks...</div>\n } @else if (!reportsManager.blocks.length) {\n <div class=\"rtsee-moderation-empty\">No active user blocks recorded.</div>\n } @else {\n <div class=\"rtsee-moderation-list\">\n @for (block of reportsManager.blocks; track block.id) {\n <div class=\"rtsee-moderation-card\">\n <div class=\"rtsee-moderation-card-top\">\n <div class=\"rtsee-moderation-actors\">\n <span class=\"actor-label\">Blocked by:</span>\n <strong>{{ block.blocker.name }}</strong>\n <span class=\"actor-arrow\">\u2192</span>\n <span class=\"actor-label\">Blocked user:</span>\n <strong>{{ block.blockedUser.name }}</strong>\n </div>\n <span class=\"rtsee-moderation-time\">\n {{ block.createdAt | date: 'medium' }}\n </span>\n </div>\n <div class=\"rtsee-moderation-reason-chip rtsee-block-chip\">\n <span class=\"material-icons-outlined\">block</span>\n <span>{{ block.reason }}</span>\n </div>\n @if (block.explanation) {\n <p class=\"rtsee-moderation-explanation\">\n <strong>Explanation:</strong> {{ block.explanation }}\n </p>\n }\n </div>\n }\n </div>\n\n <div class=\"rtsee-moderation-pagination\">\n <button\n type=\"button\"\n [disabled]=\"!reportsManager.hasPrevBlocksPage || reportsManager.blocksLoading\"\n (click)=\"reportsManager.prevBlocksPage()\"\n >\n Previous\n </button>\n <span>\n Page {{ reportsManager.blocksPage }} of {{ reportsManager.blocksTotalPages }}\n ({{ reportsManager.blocksTotal }} total)\n </span>\n <button\n type=\"button\"\n [disabled]=\"!reportsManager.hasNextBlocksPage || reportsManager.blocksLoading\"\n (click)=\"reportsManager.nextBlocksPage()\"\n >\n Next\n </button>\n </div>\n }\n </div>\n }\n</div>\n" }]
|
|
8180
8485
|
}], propDecorators: { eventsDashboard: [{
|
|
8181
8486
|
type: Input
|
|
8182
8487
|
}], framed: [{
|
|
@@ -12323,6 +12628,8 @@ class RTSeeModule {
|
|
|
12323
12628
|
ContactsMultiselectComponent,
|
|
12324
12629
|
ResetPasswordComponent,
|
|
12325
12630
|
ChatComponent,
|
|
12631
|
+
MessageComponent,
|
|
12632
|
+
MessagesListComponent,
|
|
12326
12633
|
ChatInputComponent,
|
|
12327
12634
|
MessengerComponent,
|
|
12328
12635
|
RTSeeContainerComponent,
|