aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin/moderation/video-abuse-list/video-abuse-details.component.html
blob: 5512bb1dea80f7f77e7dfbd091ef32df52035991 (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
<div class="d-flex moderation-expanded">
  <!-- report left part (report details) -->
  <div class="col-8">

    <!-- report metadata -->
    <div class="d-flex">
      <span class="col-3 moderation-expanded-label" i18n>Reporter</span>
      <span class="col-9 moderation-expanded-text">
        <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reporter:&quot;' + videoAbuse.reporterAccount.displayName + '&quot;' }" class="chip">
          <img
            class="avatar"
            [src]="videoAbuse.reporterAccount.avatar?.path"
            (error)="switchToDefaultAvatar($event)"
            alt="Avatar"
          >
          <div>
            <span class="text-muted">{{ videoAbuse.reporterAccount.nameWithHost }}</span>
          </div>
        </a>
        <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reportee:&quot;' + videoAbuse.reporterAccount.displayName + '&quot;' }" class="ml-auto text-muted video-details-links" i18n>
          {videoAbuse.countReportsForReporter, plural, =1 {1 report} other {{{ videoAbuse.countReportsForReporter }} reports}}<span class="ml-1 glyphicon glyphicon-flag"></span>
        </a>
      </span>
    </div>

    <div class="d-flex">
      <span class="col-3 moderation-expanded-label" i18n>Reportee</span>
      <span class="col-9 moderation-expanded-text">
        <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reportee:&quot;' +videoAbuse.video.channel.ownerAccount.displayName + '&quot;' }" class="chip">
          <img
            class="avatar"
            [src]="videoAbuse.video.channel.ownerAccount?.avatar?.path"
            (error)="switchToDefaultAvatar($event)"
            alt="Avatar"
          >
          <div>
            <span class="text-muted">{{ videoAbuse.video.channel.ownerAccount ? videoAbuse.video.channel.ownerAccount.nameWithHost : '' }}</span>
          </div>
        </a>
        <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'reportee:&quot;' +videoAbuse.video.channel.ownerAccount.displayName + '&quot;' }" class="ml-auto text-muted video-details-links" i18n>
          {videoAbuse.countReportsForReportee, plural, =1 {1 report} other {{{ videoAbuse.countReportsForReportee }} reports}}<span class="ml-1 glyphicon glyphicon-flag"></span>
        </a>
      </span>
    </div>

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

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

    <div *ngIf="getPredefinedReasons()" class="mt-2 d-flex">
      <span class="col-3"></span>
      <span class="col-9">
        <a [routerLink]="[ '/admin/moderation/video-abuses/list' ]" [queryParams]="{ 'search': 'tag:' + reason.id  }" class="chip rectangular bg-secondary text-light" *ngFor="let reason of getPredefinedReasons()">
          <div>{{ reason.label }}</div>
        </a>
      </span>
    </div>

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

    <div class="mt-3 d-flex" *ngIf="videoAbuse.moderationComment">
      <span class="col-3 moderation-expanded-label" i18n>Note</span>
      <span class="col-9 moderation-expanded-text" [innerHTML]="videoAbuse.moderationCommentHtml"></span>
    </div>

  </div>

  <!-- report right part (video details) -->
  <div class="col-4">
    <div class="screenratio">
      <div *ngIf="videoAbuse.video.deleted || videoAbuse.video.blacklisted">
        <span i18n *ngIf="videoAbuse.video.deleted">The video was deleted</span>
        <span i18n *ngIf="!videoAbuse.video.deleted">The video was blocked</span>
      </div>
      <div *ngIf="!videoAbuse.video.deleted && !videoAbuse.video.blacklisted" [innerHTML]="videoAbuse.embedHtml"></div>
    </div>
  </div>
</div>