aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+videos/+video-edit/video-add.component.html
diff options
context:
space:
mode:
authorKim <1877318+kimsible@users.noreply.github.com>2020-07-28 15:18:38 +0200
committerGitHub <noreply@github.com>2020-07-28 15:18:38 +0200
commitdfe3f7b72ef46401206f6f461077a7984a0c72f0 (patch)
tree775a747f2dd4bc098afc2ec254792e2e8e8cbbb4 /client/src/app/+videos/+video-edit/video-add.component.html
parent0579dee3b29e301838387f53b91b58bff2ffb19a (diff)
downloadPeerTube-dfe3f7b72ef46401206f6f461077a7984a0c72f0.tar.gz
PeerTube-dfe3f7b72ef46401206f6f461077a7984a0c72f0.tar.zst
PeerTube-dfe3f7b72ef46401206f6f461077a7984a0c72f0.zip
Add alert and hide upload view when no upload is possible (#2966)
* Add alert and hide upload view when no upload is possible * Add about instance link to alert * Hide videos and imports links when no upload is possible * Correct curly spacing lint * Put logic canUpload to User model + add isHidden param to to-menu-dropdown * Use canSeeVideoLinks from user model * Rename and change logic canUpload to isUploadDisabled * Use isDisplayed() method intead of isHidden value * Refactor client and check videos count using quota Co-authored-by: kimsible <kimsible@users.noreply.github.com> Co-authored-by: Chocobozzz <me@florianbigard.com>
Diffstat (limited to 'client/src/app/+videos/+video-edit/video-add.component.html')
-rw-r--r--client/src/app/+videos/+video-edit/video-add.component.html12
1 files changed, 10 insertions, 2 deletions
diff --git a/client/src/app/+videos/+video-edit/video-add.component.html b/client/src/app/+videos/+video-edit/video-add.component.html
index 5690ac37f..14d41f95b 100644
--- a/client/src/app/+videos/+video-edit/video-add.component.html
+++ b/client/src/app/+videos/+video-edit/video-add.component.html
@@ -1,4 +1,12 @@
1<div class="margin-content"> 1<div *ngIf="user.isUploadDisabled()" class="no-upload">
2 <div class="alert alert-warning">
3 <div i18n>Sorry, the upload feature is disabled for your account. If you want to add videos, an admin must unlock your quota.</div>
4 <a i18n routerLink="/about/instance" class="about-link">Read instance rules for help</a>
5 </div>
6 <img src="/client/assets/images/mascot/defeated.svg" alt="defeated mascot">
7</div>
8
9<div *ngIf="!user.isUploadDisabled()" class="margin-content">
2 <div class="alert alert-warning" *ngIf="isRootUser()" i18n> 10 <div class="alert alert-warning" *ngIf="isRootUser()" i18n>
3 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. 11 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.
4 <br /> 12 <br />
@@ -45,4 +53,4 @@
45 </div> 53 </div>
46 54
47 <div [ngbNavOutlet]="nav"></div> 55 <div [ngbNavOutlet]="nav"></div>
48</div> 56</div> \ No newline at end of file