]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - client/src/app/+videos/+video-edit/video-add.component.html
Alert user for low quota and video auto-block on upload page (#4336)
[github/Chocobozzz/PeerTube.git] / client / src / app / +videos / +video-edit / video-add.component.html
1 <ng-template #AlertButtons>
2 <a i18n routerLink="/about/instance" *ngIf="!isContactFormEnabled" class="about-link">Read instance rules for help</a>
3 <a i18n routerLink="/about/contact" *ngIf="isContactFormEnabled" class="contact-link">Contact us</a>
4 </ng-template>
5
6 <ng-container *ngIf="user.isUploadDisabled()">
7 <div class="upload-message upload-disabled alert alert-warning">
8 <div>{{ uploadMessages.noQuota }}</div>
9 <ng-template [ngTemplateOutlet]="AlertButtons"></ng-template>
10 </div>
11
12 <div class="upload-image">
13 <img src="/client/assets/images/mascot/defeated.svg" alt="defeated mascot">
14 </div>
15 </ng-container>
16
17 <ng-container *ngIf="!user.isUploadDisabled()">
18 <div *ngIf="user.isAutoBlocked()" class="upload-message auto-blocked alert alert-warning">
19 <div>{{ uploadMessages.autoBlock }}</div>
20 <ng-template [ngTemplateOutlet]="AlertButtons" *ngIf="!user.hasNoQuotaLeft() && !user.hasNoQuotaLeftDaily()"></ng-template>
21 </div>
22
23 <div *ngIf="user.hasNoQuotaLeft()" class="upload-message quota-daily-left alert alert-warning">
24 <div>{{ uploadMessages.quotaLeftDaily }}</div>
25 <ng-template [ngTemplateOutlet]="AlertButtons" *ngIf="!user.hasNoQuotaLeft()"></ng-template>
26 </div>
27
28 <div *ngIf="user.hasNoQuotaLeft()" class="upload-message quota-left alert alert-warning">
29 <div>{{ uploadMessages.quotaLeft }}</div>
30 <ng-template [ngTemplateOutlet]="AlertButtons"></ng-template>
31 </div>
32
33 <div *ngIf="isRootUser()" class="upload-message root-user alert alert-warning" i18n>
34 We recommend you to not use the <strong>root</strong> user to publish your videos, since it's the super-admin account of your instance.
35 <br />
36 Instead, <a routerLink="/admin/users">create a dedicated account</a> to upload your videos.
37 </div>
38 </ng-container>
39
40 <div *ngIf="!user.isUploadDisabled()" class="margin-content">
41 <my-user-quota *ngIf="!isInSecondStep() || secondStepType === 'go-live'" [user]="user" [userInformationLoaded]="userInformationLoaded"></my-user-quota>
42
43 <div class="title-page title-page-single" *ngIf="isInSecondStep()">
44 <ng-container *ngIf="secondStepType === 'import-url' || secondStepType === 'import-torrent'" i18n>Import {{ videoName }}</ng-container>
45 <ng-container *ngIf="secondStepType === 'upload'" i18n>Upload {{ videoName }}</ng-container>
46 </div>
47
48 <div ngbNav #nav="ngbNav" class="nav-tabs video-add-nav" [activeId]="activeNav" (activeIdChange)="onNavChange($event)" [ngClass]="{ 'hide-nav': !!secondStepType }">
49 <ng-container ngbNavItem="upload">
50 <a ngbNavLink>
51 <span i18n>Upload a file</span>
52 </a>
53
54 <ng-template ngbNavContent>
55 <my-video-upload #videoUpload (firstStepDone)="onFirstStepDone('upload', $event)" (firstStepError)="onError()"></my-video-upload>
56 </ng-template>
57 </ng-container>
58
59 <ng-container ngbNavItem="import-url" *ngIf="isVideoImportHttpEnabled()">
60 <a ngbNavLink>
61 <span i18n>Import with URL</span>
62 </a>
63
64 <ng-template ngbNavContent>
65 <my-video-import-url #videoImportUrl (firstStepDone)="onFirstStepDone('import-url', $event)" (firstStepError)="onError()"></my-video-import-url>
66 </ng-template>
67 </ng-container>
68
69 <ng-container ngbNavItem="import-torrent" *ngIf="isVideoImportTorrentEnabled()">
70 <a ngbNavLink>
71 <span i18n>Import with torrent</span>
72 </a>
73
74 <ng-template ngbNavContent>
75 <my-video-import-torrent #videoImportTorrent (firstStepDone)="onFirstStepDone('import-torrent', $event)" (firstStepError)="onError()"></my-video-import-torrent>
76 </ng-template>
77 </ng-container>
78
79 <ng-container ngbNavItem="go-live" *ngIf="isVideoLiveEnabled()">
80 <a ngbNavLink>
81 <span i18n>Go live</span>
82 </a>
83
84 <ng-template ngbNavContent>
85 <my-video-go-live #videoGoLive (firstStepDone)="onFirstStepDone('go-live', $event)" (firstStepError)="onError()"></my-video-go-live>
86 </ng-template>
87 </ng-container>
88 </div>
89
90 <div [ngbNavOutlet]="nav"></div>
91 </div>