Merge pull request 'feature/clean-navbar' (#10) from feature/clean-navbar into main

Reviewed-on: https://git.walzen665.de/Walzen665/fileshare-service/pulls/10
This commit is contained in:
2024-02-21 21:51:23 +00:00
8 changed files with 106 additions and 23 deletions

View File

@ -0,0 +1,31 @@
name: SharePulse Build
on:
push:
branches:
- main
jobs:
build-jar:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v2
with:
java-version: '21'
distribution: 'adopt'
- name: Grant execute permission for gradlew
run: chmod +x ./gradlew
- name: Build .jar with Maven
run: ./gradlew clean bootJar
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: jar-artifact
path: build/libs/*.jar

View File

@ -1,27 +1,27 @@
<div class="flex flex-col items-center justify-center min-h-fit p-4 lg:p-28">
<div class="flex items-center justify-center mb-3">
<a href="/" class="flex items-center justify-center">
<a href="/" class="flex items-center justify-center hover:scale-150 transition-transform duration-100">
<img src="./assets/cloud-solid.svg" class="mr-3 w-24 animate-bounce ease-out" alt="SharePulse Logo" />
<span class="self-center text-4xl font-semibold whitespace-nowrap">SharePulse</span>
</a>
</div>
<h2 class="text-2xl font-semibold text-gray-800 mb-10 text-center">
<h2 class="text-2xl font-semibold text-gray-800 mb-10 text-center hover:scale-150 transition-transform duration-100">
Upload a file. Share the URL/link. Download the file. Simple as that.
</h2>
<div class="space-y-4 text-xl mb-20">
<div class="grid grid-cols-1 sm:grid-cols-4 items-center gap-4">
<div class="grid grid-cols-1 sm:grid-cols-4 items-center gap-4 hover:scale-125 transition-transform duration-100">
<h3 class="font-semibold text-gray-800 sm:col-span-2 md:text-right">Developer:</h3>
<p class="text-gray-800 sm:col-span-2 sm:text-left">Walzen665</p>
</div>
<div class="grid grid-cols-1 sm:grid-cols-4 items-center gap-4">
<div class="grid grid-cols-1 sm:grid-cols-4 items-center gap-4 hover:scale-125 transition-transform duration-100">
<h3 class="font-semibold text-gray-800 sm:col-span-2 md:text-right">Version:</h3>
<p class="text-gray-800 sm:col-span-2 sm:text-left">1.0.0</p>
</div>
<div class="grid grid-cols-1 sm:grid-cols-4 items-center gap-4">
<div class="grid grid-cols-1 sm:grid-cols-4 items-center gap-4 hover:scale-125 transition-transform duration-100">
<h3 class="font-semibold text-gray-800 sm:col-span-2 md:text-right">API-Status:</h3>
<p class="sm:col-span-2 sm:text-left text-green-600">online</p>
</div>
<div class="grid grid-cols-1 sm:grid-cols-4 items-center gap-4">
<div class="grid grid-cols-1 sm:grid-cols-4 items-center gap-4 hover:scale-125 transition-transform duration-100">
<h3 class=" font-semibold text-gray-800 sm:col-span-2 md:text-right">Libraries:</h3>
<p class="text-gray-800 sm:col-span-2 sm:text-left">
<a href="https://fontawesome.com/" class="text-indigo-600 hover:text-indigo-800">Fontawesome</a>,

View File

@ -23,12 +23,12 @@
</div>
</div>
<button class="btn btn-primary w-full max-w-md flex justify-center items-center mb-4 mt-3" (click)="requestDownload()">
<button class="btn btn-primary w-full max-w-md flex justify-center items-center mb-4 mt-3 hover:scale-105 transition-transform duration-100" (click)="requestDownload()">
Download
</button>
<button
(click)="download_not_possible.showModal()"
class="btn btn-secondary btn-outline w-full max-w-md flex justify-center items-center mb-4">
class="btn btn-secondary btn-outline w-full max-w-md flex justify-center items-center mb-4 hover:scale-105 transition-transform duration-100">
Reset
</button>
<p class="text-gray-600 text-center w-2/3">Files are available for a limited time. Ensure the code or link is correct and the file is still downloadable.</p>
@ -52,10 +52,10 @@
<p class="text-xl font-bold text-center text-gray-800 mb-6">Download complete!</p>
<p class="text-gray-600 text-center w-2/3 mb-3">File <strong>{{ fileName }}</strong> has been downloaded and saved to your drive.</p>
<p class="text-gray-600 text-center w-2/3 mb-6">The download took {{ downloadDuration }} seconds.</p>
<button class="btn btn-primary w-full max-w-md flex justify-center items-center mb-4" >
<button class="btn btn-primary w-full max-w-md flex justify-center items-center mb-4 hover:scale-105 transition-transform duration-100" >
Save to disk (again)
</button>
<button class="btn btn-primary w-full max-w-md flex justify-center items-center mb-4" routerLink="/home">
<button class="btn btn-primary w-full max-w-md flex justify-center items-center mb-4 hover:scale-105 transition-transform duration-100" routerLink="/home">
Back to home
</button>
</div>

View File

@ -1,6 +1,6 @@
<div class="container mx-auto p-4 mt-4 overflow-visible md:overflow-hidden">
<h1 class="text-4xl font-bold text-center text-gray-800 mb-10">Welcome to SharePulse</h1>
<p class="text-xl text-center text-gray-800 mb-10">Where sharing files is easier than finding a matching sock on laundry day!</p>
<p class="text-xl text-center text-gray-800 mb-10">{{ slogan }}</p>
<div class="grid md:grid-cols-2 gap-4">
<!-- Downloading Section -->
<div class="bg-white shadow-lg rounded-lg p-6 flex flex-col items-center justify-center text-center ">
@ -8,7 +8,7 @@
<h2 class="text-2xl font-bold text-gray-700 mb-4">Download File</h2>
<p class="text-gray-600 mb-4">Access and download shared files quickly.</p>
<div class="divider mb-10">QUICK LINK</div>
<button routerLink="/download" class="btn btn-primary w-full max-w-xs">Download</button>
<button routerLink="/download" class="btn btn-primary w-full max-w-xs hover:scale-105 transition-transform duration-100">Download</button>
</div>
<!-- Uploading Section -->
@ -17,7 +17,7 @@
<h2 class="text-2xl font-bold text-gray-700 mb-4 text-center">Upload File</h2>
<p class="text-gray-600 mb-4 text-center ">Easily share your files with anyone by uploading them here.</p>
<div class="divider mb-10">QUICK LINK</div>
<button routerLink="/upload" class="btn btn-primary w-full max-w-xs">Upload</button>
<button routerLink="/upload" class="btn btn-primary w-full max-w-xs hover:scale-105 transition-transform duration-100">Upload</button>
</div>
</div>
<div class="bg-white shadow-lg rounded-lg p-6 mt-10 animate-in fade-in slide-in-from-bottom duration-500">

View File

@ -2,6 +2,7 @@ import {Component, ElementRef, ViewChild} from '@angular/core';
import {RouterLink} from "@angular/router";
import {FormsModule} from "@angular/forms";
import {LegalService} from "../../service/legalService";
import slogans from "../../assets/slogans";
@Component({
selector: 'app-home',
@ -14,7 +15,10 @@ import {LegalService} from "../../service/legalService";
styleUrl: './home.component.scss'
})
export class HomeComponent {
slogan: string = "";
constructor(private legalService: LegalService) {
this.slogan = slogans[Math.floor(Math.random() * slogans.length)];
}
openPrivacyPolicyModal() {

View File

@ -1,12 +1,12 @@
<header>
<nav class="bg-white border-gray-200 px-4 lg:px-6 py-2.5 border-b-2 border-accent-content/5" [ngClass]="{'navbar-shadow': isMenuOpen}">
<div class="flex flex-wrap justify-between items-center mx-auto max-w-screen-xl">
<a routerLink="/" class="flex items-center">
<a routerLink="/" class="flex items-center hover:scale-110 transition-transform duration-100">
<img src="./assets/cloud-solid.svg" class="mr-3 h-6 sm:h-9 animate-in fade-in slide-in-from-top duration-500" alt="Flowbite Logo" />
<span class="self-center text-xl font-semibold whitespace-nowrap">SharePulse</span>
</a>
<div class="flex items-center lg:order-2">
<a routerLink="/credits" class="flex justify-center items-center text-gray-800 font-medium rounded-lg text-sm px-5 py-2 lg:py-2.5 lg:px-5 mr-2" style="min-width: 9rem;"><!--Administration-->About</a>
<a routerLink="/credits" class="hover:scale-125 transition-transform duration-100 lg:visible invisible flex justify-center items-center text-gray-800 font-medium rounded-lg text-sm px-5 py-2 lg:py-2.5 lg:px-5 mr-2" style="min-width: 9rem;"><!--Administration-->About</a>
<button (click)="toggleMenu()" type="button" class="inline-flex items-center p-2 ml-1 text-sm text-gray-500 rounded-lg lg:hidden hover:bg-gray-100 " aria-controls="mobile-menu-2" aria-expanded="false">
<span class="sr-only">Open main menu</span>
<svg class="w-6 h-6" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" d="M3 5a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 10a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1zM3 15a1 1 0 011-1h12a1 1 0 110 2H4a1 1 0 01-1-1z" clip-rule="evenodd"></path></svg>
@ -16,10 +16,13 @@
<div [ngClass]="{'hidden': !isMenuOpen, 'flex': isMenuOpen}" class="justify-between items-center w-full lg:flex lg:w-auto lg:order-1" id="mobile-menu-2">
<ul class="flex flex-col mt-4 font-medium lg:flex-row lg:space-x-8 lg:mt-0">
<li>
<a routerLink="/download" class="block py-2 pr-4 pl-3 rounded bg-primary-700 lg:bg-transparent lg:text-primary-700 lg:p-0" aria-current="page">Download</a>
<a routerLink="/download" class="hover:scale-125 transition-transform duration-100 block py-2 pr-4 pl-3 rounded bg-primary-700 lg:bg-transparent lg:text-primary-700 lg:p-0" aria-current="page">Download</a>
</li>
<li>
<a routerLink="/upload" class="block py-2 pr-4 pl-3 rounded bg-primary-700 lg:bg-transparent lg:text-primary-700 lg:p-0" aria-current="page">Upload</a>
<a routerLink="/upload" class="hover:scale-125 transition-transform duration-100 block py-2 pr-4 pl-3 rounded bg-primary-700 lg:bg-transparent lg:text-primary-700 lg:p-0" aria-current="page">Upload</a>
</li>
<li class="lg:hidden visible">
<a routerLink="/credits" class="hover:scale-125 transition-transform duration-100 block py-2 pr-4 pl-3 rounded bg-primary-700 lg:bg-transparent lg:text-primary-700 lg:p-0" aria-current="page">About</a>
</li>
</ul>
</div>

View File

@ -44,7 +44,7 @@
</div>
</div>
<!-- Upload Button -->
<button class="btn btn-primary w-full max-w-xs" (click)="startUpload()">Upload File</button>
<button class="btn btn-primary w-full max-w-xs hover:scale-105 transition-transform duration-100" (click)="startUpload()">Upload File</button>
<p class="text-gray-600 text-center mt-6">Drag and drop files, or click to select the files you want to share.</p>
</div>
<!-- Upload Progress -->
@ -63,7 +63,7 @@
<div class="flex flex-wrap mt-5 mb-5" *ngIf="uploadData && fileUrls">
<div class="w-full px-4">
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 items-center">
<div class="text-gray-600 lg:text-right">File Name:</div>
<div class="text-gray-600 lg:text-right">File name:</div>
<div>{{uploadData.fileName}}</div>
<div class="text-gray-600 lg:text-right mt-1 lg:mt-0">Is password protected:</div>
@ -77,7 +77,7 @@
<input type="checkbox" class="checkbox checkbox-primary" [checked]="uploadData.singleDownload" (click)="$event.preventDefault()"/>
<span>{{uploadData.singleDownload ? 'Yes' : 'No'}}</span>
</label>
<div class="text-gray-600 lg:text-right mt-1 lg:mt-0">Download Password:</div>
<div class="text-gray-600 lg:text-right mt-1 lg:mt-0">Download password:</div>
<div>{{uploadData.password || 'N/A'}}</div>
<div class="text-gray-600 lg:text-right mt-1 lg:mt-0">File ID:</div>
@ -86,8 +86,12 @@
<div class="text-gray-600 lg:text-right mt-1 lg:mt-0">Download URL:</div>
<div><a href="{{fileUrls.downloadUrl}}" target="_blank">{{fileUrls.downloadUrl}}</a></div>
<!--
Currently disabled because the status page is not available yet
<div class="text-gray-600 lg:text-right mt-1 lg:mt-0">File Status URL:</div>
<div><a href="{{fileUrls.statusUrl}}" target="_blank">{{fileUrls.statusUrl}}</a></div>
-->
</div>
</div>
</div>
@ -99,12 +103,12 @@
<p class="text-sm text-gray-500 mt-1">Your file is now securely stored on our servers.</p>
<div class="mt-4 flex flex-col w-full items-center">
<button class="btn btn-success w-full max-w-xs text-white" (click)="copyUrlToClipboard(this.fileUrls?.downloadUrl)">
<button class="btn btn-success w-full max-w-xs text-white hover:scale-105 transition-transform duration-100" (click)="copyUrlToClipboard(this.fileUrls?.downloadUrl)">
<div *ngIf="!urlCopied">Copy Download URL</div>
<div *ngIf="urlCopied"><img width="20" src="./assets/check-solid.svg" alt="kk"></div>
</button>
<button class="btn btn-primary mt-2 w-full max-w-xs" routerLink="/home">Home</button>
<button class="btn btn-outline btn-secondary mt-2 w-full max-w-xs" disabled>Delete this file</button>
<button class="btn btn-primary mt-2 w-full max-w-xs hover:scale-105 transition-transform duration-100" routerLink="/home">Home</button>
<button class="btn btn-outline btn-secondary mt-2 w-full max-w-xs hover:scale-105 transition-transform duration-100" disabled>Delete this file</button>
</div>
</div>

View File

@ -0,0 +1,41 @@
let slogans = [
"Where files meet freedom, and lost socks are forgotten!",
"Where sending files is as easy as pie minus the baking part.",
"Like finding money in your pocket, but for files.",
"Making file sharing as easy as falling off a log (without the bruises).",
"Sending files, as effortless as finding water in the ocean!",
"Sharing files made so simple, even your grandma is doing it in her sleep!",
"Where sharing files is easier than choosing a movie on movie night.",
"Where sharing files is quicker than making instant noodles, and way more satisfying.",
"Sharing files, as straightforward as a one-way street but with no traffic.",
"File sharing, smoother than a freshly paved road.",
"Sharing files like hitting every green light on your way home.",
"Sharing files made easier than getting a cat to ignore a laser pointer.",
"Sharing files so easy, you'd think we found a cheat code for the internet.",
"Where files fly faster than jokes at a family dinner.",
"Sharing files made simpler than a two-piece puzzle.",
"File sharing as easy as getting sand at the beach but without the cleanup.",
"Like a hot knife through butter, but for your files.",
"Where sending files is easier than finding a parking spot on a busy day!",
"Where sending files is easier than picking a Netflix show on a Friday night!",
"Where sending files is easier than saying no to an extra slice of pizza!",
"Where sending files is easier than finding a needle in a haystack — because who does that anyway?",
"Where sending files is easier than getting out of bed on a Monday morning!",
"Where sending files is easier than keeping a plant alive!",
"Where sending files is easier than resisting hitting snooze on your alarm!",
"Where sending files is easier than deciding what to have for dinner!",
"Where sending files is easier than folding a fitted sheet properly!",
"Where sending files is easier than finding someone who dislikes puppies!",
"Where sending files is easier than trying to remember your passwords!",
"Where sending files is easier than trying to drink water while wearing a facemask!",
"Where sending files is easier than figuring out what your cat is thinking!",
"Where sending files is easier than avoiding spoilers for your favorite show!",
"Where sending files is easier than choosing the perfect emoji for any situation!",
"Where sending files is easier than trying to say 'toy boat' five times fast!",
"Where sending files is easier than finding your way out of an IKEA!",
"Where sending files is easier than putting a USB in the right way on the first try!",
"Where sending files is easier than untangling headphones!",
"Where sending files is easier than finding a matching pair of socks on laundry day—wait, we've been here before!",
"Where sharing files is easier than finding a matching sock on laundry day!"
]
export default slogans;