aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-abuse-list/abuse-details.component.html
blob: 089be501d33b3fc65c32fd3f647ea1f4128e1d8e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<div class="d-flex moderation-expanded">
  <!-- report left part (report details) -->
  <div class="left">

    <!-- report metadata -->
    <div class="d-flex" *ngIf="isAdminView && abuse.reporterAccount">
      <span class="moderation-expanded-label" i18n>Reporter</span>

      <span class="moderation-expanded-text">
        <a [routerLink]="[ '.' ]" [queryParams]="{ 'search': 'reporter:&quot;' + abuse.reporterAccount.displayName + '&quot;' }"
          class="chip"
        >
          <my-actor-avatar size="18" [actor]="abuse.reporterAccount" actorType="account"></my-actor-avatar>
          <div>
            <span class="muted">{{ abuse.reporterAccount.nameWithHost }}</span>
          </div>
        </a>

        <a [routerLink]="[ '.' ]" [queryParams]="{ 'search': 'reporter:&quot;' + abuse.reporterAccount.displayName + '&quot;' }"
          class="ms-auto muted abuse-details-links" i18n
        >
          {abuse.countReportsForReporter, plural, =1 {1 report} other {{{ abuse.countReportsForReporter }} reports}}
          <my-global-icon iconName="flag"></my-global-icon>
        </a>
      </span>
    </div>

    <div class="d-flex" *ngIf="abuse.flaggedAccount">
      <span class="moderation-expanded-label" i18n>Reportee</span>
      <span class="moderation-expanded-text">
        <a [routerLink]="[ '.' ]" [queryParams]="{ 'search': 'reportee:&quot;' +abuse.flaggedAccount.displayName + '&quot;' }"
          class="chip"
        >
          <my-actor-avatar size="18" [actor]="abuse.flaggedAccount" actorType="account"></my-actor-avatar>
          <div>
            <span class="muted">{{ abuse.flaggedAccount ? abuse.flaggedAccount.nameWithHost : '' }}</span>
          </div>
        </a>

        <a *ngIf="isAdminView" [routerLink]="[ '.' ]" [queryParams]="{ 'search': 'reportee:&quot;' +abuse.flaggedAccount.displayName + '&quot;' }"
          class="ms-auto muted abuse-details-links" i18n
        >
          {abuse.countReportsForReportee, plural, =1 {1 report} other {{{ abuse.countReportsForReportee }} reports}}
          <my-global-icon iconName="flag"></my-global-icon>
        </a>
      </span>
    </div>

    <div class="d-flex" *ngIf="abuse.updatedAt">
      <span class="moderation-expanded-label" i18n>Updated</span>
      <time class="moderation-expanded-text abuse-details-date-updated">{{ abuse.updatedAt | date: 'medium' }}</time>
    </div>

    <!-- report text -->
    <div class="mt-3 d-flex">
      <span class="moderation-expanded-label">
        <ng-container i18n>Report</ng-container>
        <a [routerLink]="[ '.' ]" [queryParams]="{ 'search': '#' + abuse.id  }" class="ms-1 muted">#{{ abuse.id }}</a>
      </span>
      <span class="moderation-expanded-text" [innerHTML]="abuse.reasonHtml"></span>
    </div>

    <div *ngIf="predefinedReasons" class="mt-2 d-flex">
      <span>
        <a *ngFor="let reason of predefinedReasons"  [routerLink]="[ '.' ]"
          [queryParams]="{ 'search': 'tag:' + reason.id  }" class="chip rectangular bg-secondary text-light"
        >
          <div>{{ reason.label }}</div>
        </a>
      </span>
    </div>

    <div *ngIf="abuse.video?.startAt" class="mt-2 d-flex">
      <span class="moderation-expanded-label" i18n>Reported part</span>
      <span>
        {{ startAt }}<ng-container *ngIf="abuse.video.endAt"> - {{ endAt }}</ng-container>
      </span>
    </div>

    <div class="mt-3 d-flex" *ngIf="isAdminView && abuse.moderationComment">
      <span class="moderation-expanded-label" i18n>Note</span>
      <span class="moderation-expanded-text d-block" [innerHTML]="abuse.moderationCommentHtml"></span>
    </div>

  </div>

  <!-- report right part (video/comment details) -->
  <div class="right">
    <div *ngIf="abuse.video">
      <div *ngIf="abuse.video.deleted" i18n>The video was deleted</div>
      <my-embed *ngIf="!abuse.video.deleted" [video]="abuse.video"></my-embed>
    </div>

    <div *ngIf="abuse.comment" class="comment-html">
      <div>
        <strong i18n>Comment:</strong>
      </div>

      <div [innerHTML]="abuse.commentHtml"></div>
    </div>
  </div>
</div>