Implemented password verification

This commit is contained in:
2024-02-18 11:18:48 +01:00
parent 7f742dac63
commit 690fe5289f
2 changed files with 35 additions and 9 deletions

View File

@ -6,13 +6,24 @@
<p class="text-md text-center text-gray-600 mb-6">Access your files quickly and securely</p>
<div class="bg-white shadow-lg rounded-lg p-6 flex flex-col items-center justify-center">
<img class="w-56 mt-6 mb-6" src="./assets/cloud-arrow-down-solid.svg">
<input type="text" class="input input-bordered text-center w-full max-w-md mb-6" placeholder="Enter download code/link" [(ngModel)]="inputFileId"/>
<input
*ngIf="downloadInfo && downloadInfo.passwordProtected && downloadInfo.downloadable"
type="password" class="input input-bordered text-center w-full max-w-md mb-6" placeholder="Enter file password..." [(ngModel)]="filePassword"/>
<input type="text" class="input input-bordered text-center w-full max-w-md mb-6" placeholder="Enter download code/link"
[(ngModel)]="inputFileId"
(keydown.enter)="requestDownload()"/>
<div class="mb-6 w-full flex flex-col items-center justify-center">
<input
*ngIf="downloadInfo && downloadInfo.passwordProtected && downloadInfo.downloadable"
[ngClass]="{'input-error': passwordWrong}"
type="password"
class="input input-bordered text-center w-full max-w-md"
placeholder="Enter file password..."
[(ngModel)]="filePassword"/>
<div class="label" *ngIf="passwordWrong">
<span class="label-text-alt text-red-500">Password wrong | Check capslock</span>
</div>
</div>
<button class="btn btn-primary w-full max-w-md flex justify-center items-center mb-4" (click)="requestDownload()">
<button class="btn btn-primary w-full max-w-md flex justify-center items-center mb-4 mt-3" (click)="requestDownload()">
Download
</button>
<button