mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-31 03:50:08 -07:00
fix: fixed the templateref issue
This commit is contained in:
parent
26bcf1e4e1
commit
5a0a051de1
2 changed files with 25 additions and 22 deletions
|
@ -75,10 +75,10 @@
|
||||||
{{'Common.Request' | translate }}
|
{{'Common.Request' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<!-- 4k Status -->
|
<!-- 4k Status -->
|
||||||
<span *role="roleName4k">
|
<span *permission="roleName4k">
|
||||||
<button mat-raised-button class="btn-green btn-spacing" id="availableBtn" *ngIf="movie.available4K && !movie.plexUrl && !movie.embyUrl && !movie.jellyfinUrl"> {{
|
<button mat-raised-button class="btn-green btn-spacing" id="availableBtn" *ngIf="movie.available4K && !movie.plexUrl && !movie.embyUrl && !movie.jellyfinUrl"> {{
|
||||||
'Common.Available4K' | translate }}</button>
|
'Common.Available4K' | translate }}</button>
|
||||||
<span *ngIf="!movie.available4K">
|
<span *ngIf="!movie.available4K">
|
||||||
|
@ -110,34 +110,37 @@
|
||||||
<button id="approveBtn" *ngIf="!movie.approved && movie.requested" (click)="approve(false)" mat-raised-button class="btn-spacing" color="accent">
|
<button id="approveBtn" *ngIf="!movie.approved && movie.requested" (click)="approve(false)" mat-raised-button class="btn-spacing" color="accent">
|
||||||
<i class="fas fa-plus"></i> {{ 'Common.Approve' | translate }}
|
<i class="fas fa-plus"></i> {{ 'Common.Approve' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button *role="roleName4k" id="approve4kBtn" *ngIf="!movie.approved4K && movie.has4KRequest" (click)="approve(true)" mat-raised-button class="btn-spacing" color="accent">
|
|
||||||
<i class="fas fa-plus"></i> {{ 'Common.Approve4K' | translate }}
|
|
||||||
</button>
|
|
||||||
<button id="markAvailableBtn" *ngIf="!movie.available && movie.requested" (click)="markAvailable(false)" mat-raised-button class="btn-spacing"
|
<button id="markAvailableBtn" *ngIf="!movie.available && movie.requested" (click)="markAvailable(false)" mat-raised-button class="btn-spacing"
|
||||||
color="accent">
|
color="accent">
|
||||||
<i class="fas fa-plus"></i> {{ 'Requests.MarkAvailable' | translate }}
|
<i class="fas fa-plus"></i> {{ 'Requests.MarkAvailable' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button *role="roleName4k" id="markAvailable4kBtn" *ngIf="!movie.available4K && movie.has4KRequest" (click)="markAvailable(true)" mat-raised-button class="btn-spacing"
|
|
||||||
color="accent">
|
|
||||||
<i class="fas fa-plus"></i> {{ 'Requests.MarkAvailable4K' | translate }}
|
|
||||||
</button>
|
|
||||||
|
|
||||||
<button id="markUnavailableBtn" *ngIf="movie.available && movie.requested" (click)="markUnavailable(false)" mat-raised-button class="btn-spacing"
|
<button id="markUnavailableBtn" *ngIf="movie.available && movie.requested" (click)="markUnavailable(false)" mat-raised-button class="btn-spacing"
|
||||||
color="accent">
|
color="accent">
|
||||||
<i class="fas fa-minus"></i> {{ 'Requests.MarkUnavailable' | translate }}
|
<i class="fas fa-minus"></i> {{ 'Requests.MarkUnavailable' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button *role="roleName4k" id="markUnavailable4kBtn" *ngIf="movie.available4K" (click)="markUnavailable(true)" mat-raised-button class="btn-spacing"
|
|
||||||
color="accent">
|
<!-- 4k -->
|
||||||
<i class="fas fa-minus"></i> {{ 'Requests.MarkUnavailable4K' | translate }}
|
<span *permission="roleName4k">
|
||||||
|
<button id="approve4kBtn" *ngIf="!movie.approved4K && movie.has4KRequest" (click)="approve(true)" mat-raised-button class="btn-spacing" color="accent">
|
||||||
|
<i class="fas fa-plus"></i> {{ 'Common.Approve4K' | translate }}
|
||||||
|
</button>
|
||||||
|
<button id="markAvailable4kBtn" *ngIf="!movie.available4K && movie.has4KRequest" (click)="markAvailable(true)" mat-raised-button class="btn-spacing"
|
||||||
|
color="accent">
|
||||||
|
<i class="fas fa-plus"></i> {{ 'Requests.MarkAvailable4K' | translate }}
|
||||||
|
</button>
|
||||||
|
<button id="markUnavailable4kBtn" *ngIf="movie.available4K" (click)="markUnavailable(true)" mat-raised-button class="btn-spacing"
|
||||||
|
color="accent">
|
||||||
|
<i class="fas fa-minus"></i> {{ 'Requests.MarkUnavailable4K' | translate }}
|
||||||
|
</button>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<button id="denyBtn" *ngIf="!movieRequest.denied && movie.requested" mat-raised-button class="btn-spacing" color="warn" (click)="deny(false)">
|
||||||
|
<i class="fas fa-times"></i> {{'Requests.Deny' | translate }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button id="denyBtn" *ngIf="!movieRequest.denied && movie.requested" mat-raised-button class="btn-spacing" color="warn" (click)="deny(false)">
|
<button id="deniedButton" *ngIf="movieRequest && movieRequest.denied" [matTooltip]="movieRequest.deniedReason" mat-raised-button class="btn-spacing" color="warn">
|
||||||
<i class="fas fa-times"></i> {{'Requests.Deny' | translate }}
|
<i class="fas fa-times"></i> {{'MediaDetails.Denied' | translate }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button id="deniedButton" *ngIf="movieRequest && movieRequest.denied" [matTooltip]="movieRequest.deniedReason" mat-raised-button class="btn-spacing" color="warn">
|
|
||||||
<i class="fas fa-times"></i> {{'MediaDetails.Denied' | translate }}
|
|
||||||
</button>
|
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<button id="reportIssueBtn" mat-raised-button class="btn-spacing" color="danger" (click)="issue()" *ngIf="issuesEnabled">
|
<button id="reportIssueBtn" mat-raised-button class="btn-spacing" color="danger" (click)="issue()" *ngIf="issuesEnabled">
|
||||||
|
|
|
@ -2,14 +2,14 @@ import { Directive, Input, OnInit, TemplateRef, ViewContainerRef } from "@angula
|
||||||
import { AuthService } from "../../auth/auth.service";
|
import { AuthService } from "../../auth/auth.service";
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[role]',
|
selector: '[permission]',
|
||||||
})
|
})
|
||||||
export class RoleDirective implements OnInit {
|
export class RoleDirective implements OnInit {
|
||||||
private roleName: string;
|
private roleName: string;
|
||||||
|
|
||||||
private isHidden = true;
|
private isHidden = true;
|
||||||
|
|
||||||
@Input() public set role(val: string) {
|
@Input() public set permission(val: string) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.roleName = val;
|
this.roleName = val;
|
||||||
this.updateView();
|
this.updateView();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue