Added automatic download mechanism
- Added tooltips to options - Updated privacy policy
This commit is contained in:
parent
78f32c4f64
commit
d9e621165d
@ -4,7 +4,7 @@ import {DevelopmentStore} from "../../store/DevelopmentStore";
|
||||
import {FormsModule} from "@angular/forms";
|
||||
import {DecimalPipe, NgClass, NgIf} from "@angular/common";
|
||||
import funfacts from "../../assets/funfacts";
|
||||
import {RouterLink} from "@angular/router";
|
||||
import {ActivatedRoute, RouterLink} from "@angular/router";
|
||||
|
||||
@Component({
|
||||
selector: 'app-download',
|
||||
@ -40,8 +40,21 @@ export class DownloadComponent {
|
||||
funfact: string = "";
|
||||
|
||||
|
||||
constructor(private developmentStore: DevelopmentStore) {
|
||||
constructor(private developmentStore: DevelopmentStore, private activatedRoute: ActivatedRoute) {
|
||||
this.funfact = funfacts[Math.floor(Math.random() * funfacts.length)];
|
||||
|
||||
this.activatedRoute.queryParams.subscribe(params => {
|
||||
const fileId = params['fileId'];
|
||||
const password = params['password'];
|
||||
if(password) {
|
||||
this.filePassword = password;
|
||||
}
|
||||
if(fileId) {
|
||||
this.inputFileId = fileId;
|
||||
this.requestDownload();
|
||||
}
|
||||
});
|
||||
|
||||
this.speedTest();
|
||||
}
|
||||
|
||||
@ -70,6 +83,11 @@ export class DownloadComponent {
|
||||
return;
|
||||
}
|
||||
else if(this.downloadInfo?.passwordProtected) {
|
||||
if(this.filePassword) {
|
||||
console.log("Requesting download with password");
|
||||
this.downloadFile();
|
||||
return;
|
||||
}
|
||||
this.waitingForPassword = true;
|
||||
console.log("Password protected");
|
||||
}
|
||||
|
@ -38,13 +38,13 @@
|
||||
<ol class="list-decimal">
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Uploaded files are stored on a secure server.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Files are stored for a maximum of 24 hours.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Sharepulse tracks your IP address when uploading files.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Sharepulse may track your IP address when downloading files.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Sharepulse does not track you when accessing the website.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Personal information collected by Sharepulse is used solely for data protection and is not processed.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Sharepulse will not sell, rent, or share personal information with third parties without user consent, except as required by law.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Users have the right to request the deletion of their data from Sharepulse's servers at any time.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Sharepulse does not store any cookies on your device.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">SharePulse tracks your IP address when uploading files. This serves as a method of identification, allowing you to check the status of your upload.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">SharePulse may track your IP address when downloading files.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">SharePulse does not track you when accessing the website.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Personal information collected by SharePulse is used solely for data protection and is not processed.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">SharePulse will not sell, rent, or share personal information with third parties without user consent, except as required by law.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Users have the right to request the deletion of their data from SharePulse's servers at any time.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">SharePulse does not store any cookies on your device.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Operators do not view or manipulate uploaded files.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Users are encouraged to review the privacy policy periodically for any changes or updates.</li>
|
||||
</ol>
|
||||
@ -69,12 +69,12 @@
|
||||
<div class="mx-auto my-6">
|
||||
<ol class="list-decimal">
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Users must not upload files that contain malware, illegal content, or violate copyright laws.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Sharepulse is not responsible for the content of the files shared through its service.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">By using Sharepulse, users agree not to attempt to breach the security of the service.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Sharepulse reserves the right to remove any files or suspend users that violate these terms without notice.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">SharePulse is not responsible for the content of the files shared through its service.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">By using SharePulse, users agree not to attempt to breach the security of the service.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">SharePulse reserves the right to remove any files or suspend users that violate these terms without notice.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">The service is provided "as is" without warranty of any kind, express or implied.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Users agree to indemnify and hold harmless Sharepulse from any claims resulting from the use of the service.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Sharepulse reserves the right to modify these terms at any time. Continued use of the service after such changes constitutes acceptance of the new terms.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">Users agree to indemnify and hold harmless SharePulse from any claims resulting from the use of the service.</li>
|
||||
<li class="ml-4 mb-2 text-gray-800 font-semibold">SharePulse reserves the right to modify these terms at any time. Continued use of the service after such changes constitutes acceptance of the new terms.</li>
|
||||
|
||||
</ol>
|
||||
</div>
|
||||
|
@ -29,16 +29,17 @@
|
||||
<label class="block text-gray-700 text-l font-bold mb-4">Options</label>
|
||||
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
|
||||
<div class="flex items-center" >
|
||||
<input id="shortStorage" [(ngModel)]="shortStorage" type="checkbox" class="toggle" checked />
|
||||
<label for="shortStorage" class="ml-2 text-gray-700">Store for only one hour</label>
|
||||
<input id="shortStorage" [(ngModel)]="shortStorage" type="checkbox" class="toggle" [disabled]="true"/>
|
||||
<label for="shortStorage" class="ml-2 text-gray-700 tooltip" data-tip="This feature will be available with the next update!">Store for only one hour</label>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<input id="singleDownload" [(ngModel)]="singleDownload" type="checkbox" class="toggle" />
|
||||
<label for="singleDownload" class="ml-2 text-gray-700">Allow only one download</label>
|
||||
<label for="singleDownload" class="ml-2 text-gray-700 tooltip" data-tip="If enabled, the uploaded file can only be downloaded once.">Allow only one download</label>
|
||||
</div>
|
||||
<div class="flex items-center">
|
||||
<input id="passwordProtected" [(ngModel)]="passwordProtected" type="checkbox" class="toggle" />
|
||||
<label for="passwordProtected" class="ml-2 text-gray-700">Protect download with password</label>
|
||||
<label for="passwordProtected" class="ml-2 text-gray-700 tooltip"
|
||||
data-tip="The password will be generated by the server and is displayed after the upload is finished.">Protect download with password</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -115,14 +115,19 @@ export class UploadComponent {
|
||||
buildFileUrls(fileDetails: FileDetails) {
|
||||
const baseUrl = this.developmentStore.getBaseUrl();
|
||||
const fileId = fileDetails.fileId;
|
||||
const downloadUrl = `${baseUrl}download?fileId=${fileId}`;
|
||||
const deleteUrl = `${baseUrl}api/v1/deletefile?fileId=${fileId}`;
|
||||
const statusUrl = `${baseUrl}status?fileId=${fileId}`;
|
||||
let passwordUrlPart = '';
|
||||
if(fileDetails.passwordProtected) {
|
||||
passwordUrlPart = `&password=${fileDetails.password}`;
|
||||
}
|
||||
const downloadUrl = `${baseUrl}download?fileId=${fileId}${passwordUrlPart}`;
|
||||
const deleteUrl = `${baseUrl}api/v1/deletefile?fileId=${fileId}${passwordUrlPart}`;
|
||||
const statusUrl = `${baseUrl}status?fileId=${fileId}${passwordUrlPart}`;
|
||||
return {
|
||||
downloadUrl,
|
||||
statusUrl,
|
||||
deleteUrl,
|
||||
}; }
|
||||
};
|
||||
}
|
||||
|
||||
buildFormDataObject(): FormData {
|
||||
const formData = new FormData();
|
||||
|
Loading…
x
Reference in New Issue
Block a user