diff --git a/app/Http/Controllers/PhotoController.php b/app/Http/Controllers/PhotoController.php index 70239db..afee5dc 100644 --- a/app/Http/Controllers/PhotoController.php +++ b/app/Http/Controllers/PhotoController.php @@ -4,7 +4,10 @@ use App\Models\Photo; use Illuminate\Http\Request; +use Illuminate\Support\Facades\Auth; +use Illuminate\Support\Facades\Storage; use Inertia\Inertia; +use Illuminate\Support\Str; class PhotoController extends Controller { @@ -14,7 +17,7 @@ class PhotoController extends Controller public function index() { return Inertia::render('Photo/Index', [ - "photos" => Photo::all() + "photos" => Photo::all()->jsonSerialize(), ]); } @@ -23,7 +26,7 @@ public function index() */ public function create() { - // + return Inertia::render('Photo/Create'); } /** @@ -31,23 +34,24 @@ public function create() */ public function store(Request $request) { - // - } - - /** - * Display the specified resource. - */ - public function show(string $id) - { - // - } + $request->validate([ + "name" => "required|string|max:255", + "path" => "required|string", + ]); + + if(!Storage::disk("s3")->exists($request->path)) + return redirect()->back()->withErrors(["path" => "Probleme with the file transfert"]); - /** - * Show the form for editing the specified resource. - */ - public function edit(string $id) - { - // + $uuid = Str::uuid(); + $path = "photos/" . $uuid . "-" . $request->name . "." . pathinfo($request->path, PATHINFO_EXTENSION); + Storage::disk("s3")->move($request->path, $path); + Photo::create([ + "uuid" => $uuid, + "name" => $request->name, + "path" => $path, + "user_id" => Auth::user()->id + ]); + return redirect(route("photo.index"))->with(["message" => "Photo ajouté avec success"]); } /** @@ -55,7 +59,15 @@ public function edit(string $id) */ public function update(Request $request, string $id) { - // + $request->validate([ + "name" => "required|string|max:255", + ]); + $photo = Photo::where("uuid", $request->id)->first(); + if(!$photo) redirect()->back()->withErrors(["uuid" => "Photo introuvable" ]); + $photo->update([ + "name" => $request->name + ]); + return redirect(route("photo.index"))->with(["message" => "Nom de la photo modifié avec success"]); } /** @@ -63,6 +75,9 @@ public function update(Request $request, string $id) */ public function destroy(string $id) { - // + $photo = Photo::where("uuid", $id)->first(); + if(!$photo) redirect()->back()->withErrors(["uuid" => "Photo introuvable" ]); + $photo->delete(); + return redirect(route("photo.index"))->with(["message" => "Photo supprimée avec success"]); } } diff --git a/app/Http/Controllers/S3Controller.php b/app/Http/Controllers/S3Controller.php new file mode 100644 index 0000000..f134bbc --- /dev/null +++ b/app/Http/Controllers/S3Controller.php @@ -0,0 +1,105 @@ +bucket = config("filesystems.disks.s3.bucket"); + } + + private static function NormalizeName($name) { + // Normalize the filename according to the NFC convention + // Requires php-intl module + // More info: https://www.php.net/manual/en/class.normalizer.php + if (class_exists('Normalizer')) { + $normalized_filename = Normalizer::normalize($name, Normalizer::FORM_C); + if ($normalized_filename !== false) { + return $normalized_filename; + } + } else { + // If Normalizer is not installed, we transform the text into an + // ASCII representation without diacritics. + return iconv('UTF-8', 'ASCII//TRANSLIT//IGNORE', $name); + } + + return $name; + } + + + public function GeneratePresignedUrl(Request $request) + { + return response()->json([ "url" => S3::signUrl($request->key) ]); + } + + public function StartMultipartUpload(Request $request) + { + $filename = "tmp/" . Str::random(10) . "_" . Str::replace(" ", "_", $request->filename); + $client = ((object)Storage::disk("s3"))->getClient(); + $result = $client->createMultipartUpload([ + "Bucket" => $this->bucket, + "Key" => $filename, + 'ContentDisposition' => 'inline', + ]); + return response()->json([ + "uploadId" => $result["UploadId"], + "key" => $filename, + ]); + } + + public function GeneratePresignedMultipartUrl(Request $request) + { + $client = ((object)Storage::disk("s3"))->getClient(); + $command = $client->getCommand('UploadPart', [ + "Bucket" => $this->bucket, + "Key" => $request->key, + "UploadId" => $request->uploadId, + "ContentLength" => $request->partLength, + "PartNumber" => $request->partNumber, + ]); + $preSignedUrl = $client->createPresignedRequest($command, Carbon::tomorrow()); + return response()->json([ "url" => (string)$preSignedUrl->getUri() ]); + } + + public function CompleteMultipartUpload(Request $request) + { + $client = ((object)Storage::disk("s3"))->getClient(); + $result = $client->completeMultipartUpload([ + "Bucket" => $this->bucket, + "Key" => $request->key, + "UploadId" => $request->uploadId, + "MultipartUpload" => [ + "Parts" => $request->parts + ] + ]); + return response()->json([ "message" => "Upload completed", "Location" => $result["Location"] ]); + } + + public function ProxyS3(Request $request) + { + $response = Http::withBody($request->getContent(), "binary/octet-stream")->withHeaders([ "Content-Length" => $request->header("Content-Length") ])->put($request->header("X-SignedUrl")); + $ETag = $response->getHeader("ETag") ? $response->getHeader("ETag")[0] : dd($response); + return response(json_encode([ + "ETag" => $ETag + ]), $response->status()); + } + + public function Download(Request $request) + { + $url = S3::signUrl($request->key); + return redirect($url); + } +} + diff --git a/app/Models/Photo.php b/app/Models/Photo.php index eea1962..7e0a80a 100644 --- a/app/Models/Photo.php +++ b/app/Models/Photo.php @@ -2,6 +2,8 @@ namespace App\Models; +use App\Utils\S3; + use Illuminate\Database\Eloquent\Model; class Photo extends Model @@ -9,5 +11,24 @@ class Photo extends Model protected $fillable = [ 'name', 'path', + 'uuid', + 'user_id' ]; + + public function user() + { + return $this->belongsTo(User::class); + } + + public function jsonSerialize():array + { + return [ + 'id' => $this->id, + 'uuid' => $this->uuid, + 'name' => $this->name, + 'path' => S3::signUrl($this->path), + 'user' => $this->user, + ]; + } + } diff --git a/app/Models/User.php b/app/Models/User.php index 01c5d07..df948e0 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -21,7 +21,11 @@ class User extends Authenticatable 'name', 'email', 'password', - 'email_verified_at' + 'email_verified_at', + 'totem', + 'tel', + 'contactable', + 'role', ]; /** @@ -46,4 +50,9 @@ protected function casts(): array 'password' => 'hashed', ]; } + + public function photos() + { + return $this->hasMany(Photo::class); + } } diff --git a/app/Utils/S3.php b/app/Utils/S3.php new file mode 100644 index 0000000..29b5e9e --- /dev/null +++ b/app/Utils/S3.php @@ -0,0 +1,25 @@ +'!', '%2A'=>'*', '%27'=>"'", '%28'=>'(', '%29'=>')', '%2F'=>'/']; + return strtr(rawurlencode($str), $revert); + } + + public static function signUrl($key){ + $client = ((object)Storage::disk("s3"))->getClient(); + $bucket = config("filesystems.disks.s3.bucket"); + $command = $client->getCommand('GetObject', [ + "Bucket" => $bucket, + "Key" => $key + ]); + return (string)$client->createPresignedRequest($command, Carbon::tomorrow())->getUri(); + } +} diff --git a/composer.json b/composer.json index d861f0e..884ea33 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,8 @@ "laravel/framework": "^11.31", "laravel/sanctum": "^4.0", "laravel/tinker": "^2.9", + "league/flysystem": "^3.29", + "league/flysystem-aws-s3-v3": "^3.29", "tightenco/ziggy": "^2.0" }, "require-dev": { diff --git a/composer.lock b/composer.lock index 1c6d254..ad80143 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "00eb55bee5045608ccbc5fe1b47ebac8", + "content-hash": "52a54306259a78af065842cfdf574e84", "packages": [ { "name": "archtechx/enums", @@ -52,6 +52,158 @@ }, "time": "2024-10-29T15:38:32+00:00" }, + { + "name": "aws/aws-crt-php", + "version": "v1.2.7", + "source": { + "type": "git", + "url": "https://github.com/awslabs/aws-crt-php.git", + "reference": "d71d9906c7bb63a28295447ba12e74723bd3730e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/awslabs/aws-crt-php/zipball/d71d9906c7bb63a28295447ba12e74723bd3730e", + "reference": "d71d9906c7bb63a28295447ba12e74723bd3730e", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35||^5.6.3||^9.5", + "yoast/phpunit-polyfills": "^1.0" + }, + "suggest": { + "ext-awscrt": "Make sure you install awscrt native extension to use any of the functionality." + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "AWS SDK Common Runtime Team", + "email": "aws-sdk-common-runtime@amazon.com" + } + ], + "description": "AWS Common Runtime for PHP", + "homepage": "https://github.com/awslabs/aws-crt-php", + "keywords": [ + "amazon", + "aws", + "crt", + "sdk" + ], + "support": { + "issues": "https://github.com/awslabs/aws-crt-php/issues", + "source": "https://github.com/awslabs/aws-crt-php/tree/v1.2.7" + }, + "time": "2024-10-18T22:15:13+00:00" + }, + { + "name": "aws/aws-sdk-php", + "version": "3.337.2", + "source": { + "type": "git", + "url": "https://github.com/aws/aws-sdk-php.git", + "reference": "f885dd803a257da9d54e72a4750bba73e1196aee" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/f885dd803a257da9d54e72a4750bba73e1196aee", + "reference": "f885dd803a257da9d54e72a4750bba73e1196aee", + "shasum": "" + }, + "require": { + "aws/aws-crt-php": "^1.2.3", + "ext-json": "*", + "ext-pcre": "*", + "ext-simplexml": "*", + "guzzlehttp/guzzle": "^6.5.8 || ^7.4.5", + "guzzlehttp/promises": "^1.4.0 || ^2.0", + "guzzlehttp/psr7": "^1.9.1 || ^2.4.5", + "mtdowling/jmespath.php": "^2.6", + "php": ">=7.2.5", + "psr/http-message": "^1.0 || ^2.0" + }, + "require-dev": { + "andrewsville/php-token-reflection": "^1.4", + "aws/aws-php-sns-message-validator": "~1.0", + "behat/behat": "~3.0", + "composer/composer": "^1.10.22", + "dms/phpunit-arraysubset-asserts": "^0.4.0", + "doctrine/cache": "~1.4", + "ext-dom": "*", + "ext-openssl": "*", + "ext-pcntl": "*", + "ext-sockets": "*", + "nette/neon": "^2.3", + "paragonie/random_compat": ">= 2", + "phpunit/phpunit": "^5.6.3 || ^8.5 || ^9.5", + "psr/cache": "^1.0 || ^2.0 || ^3.0", + "psr/simple-cache": "^1.0 || ^2.0 || ^3.0", + "sebastian/comparator": "^1.2.3 || ^4.0", + "yoast/phpunit-polyfills": "^1.0" + }, + "suggest": { + "aws/aws-php-sns-message-validator": "To validate incoming SNS notifications", + "doctrine/cache": "To use the DoctrineCacheAdapter", + "ext-curl": "To send requests using cURL", + "ext-openssl": "Allows working with CloudFront private distributions and verifying received SNS messages", + "ext-sockets": "To use client-side monitoring" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + }, + "autoload": { + "files": [ + "src/functions.php" + ], + "psr-4": { + "Aws\\": "src/" + }, + "exclude-from-classmap": [ + "src/data/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Amazon Web Services", + "homepage": "http://aws.amazon.com" + } + ], + "description": "AWS SDK for PHP - Use Amazon Web Services in your PHP project", + "homepage": "http://aws.amazon.com/sdkforphp", + "keywords": [ + "amazon", + "aws", + "cloud", + "dynamodb", + "ec2", + "glacier", + "s3", + "sdk" + ], + "support": { + "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", + "issues": "https://github.com/aws/aws-sdk-php/issues", + "source": "https://github.com/aws/aws-sdk-php/tree/3.337.2" + }, + "time": "2025-01-17T19:10:04+00:00" + }, { "name": "brick/math", "version": "0.12.1", @@ -3452,6 +3604,61 @@ }, "time": "2024-10-08T08:58:34+00:00" }, + { + "name": "league/flysystem-aws-s3-v3", + "version": "3.29.0", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/flysystem-aws-s3-v3.git", + "reference": "c6ff6d4606e48249b63f269eba7fabdb584e76a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/flysystem-aws-s3-v3/zipball/c6ff6d4606e48249b63f269eba7fabdb584e76a9", + "reference": "c6ff6d4606e48249b63f269eba7fabdb584e76a9", + "shasum": "" + }, + "require": { + "aws/aws-sdk-php": "^3.295.10", + "league/flysystem": "^3.10.0", + "league/mime-type-detection": "^1.0.0", + "php": "^8.0.2" + }, + "conflict": { + "guzzlehttp/guzzle": "<7.0", + "guzzlehttp/ringphp": "<1.1.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "League\\Flysystem\\AwsS3V3\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Frank de Jonge", + "email": "info@frankdejonge.nl" + } + ], + "description": "AWS S3 filesystem adapter for Flysystem.", + "keywords": [ + "Flysystem", + "aws", + "file", + "files", + "filesystem", + "s3", + "storage" + ], + "support": { + "source": "https://github.com/thephpleague/flysystem-aws-s3-v3/tree/3.29.0" + }, + "time": "2024-08-17T13:10:48+00:00" + }, { "name": "league/flysystem-local", "version": "3.29.0", @@ -3660,6 +3867,72 @@ ], "time": "2024-11-12T13:57:08+00:00" }, + { + "name": "mtdowling/jmespath.php", + "version": "2.8.0", + "source": { + "type": "git", + "url": "https://github.com/jmespath/jmespath.php.git", + "reference": "a2a865e05d5f420b50cc2f85bb78d565db12a6bc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jmespath/jmespath.php/zipball/a2a865e05d5f420b50cc2f85bb78d565db12a6bc", + "reference": "a2a865e05d5f420b50cc2f85bb78d565db12a6bc", + "shasum": "" + }, + "require": { + "php": "^7.2.5 || ^8.0", + "symfony/polyfill-mbstring": "^1.17" + }, + "require-dev": { + "composer/xdebug-handler": "^3.0.3", + "phpunit/phpunit": "^8.5.33" + }, + "bin": [ + "bin/jp.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "files": [ + "src/JmesPath.php" + ], + "psr-4": { + "JmesPath\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Declaratively specify how to extract elements from a JSON document", + "keywords": [ + "json", + "jsonpath" + ], + "support": { + "issues": "https://github.com/jmespath/jmespath.php/issues", + "source": "https://github.com/jmespath/jmespath.php/tree/2.8.0" + }, + "time": "2024-09-04T18:46:31+00:00" + }, { "name": "nesbot/carbon", "version": "3.8.2", diff --git a/database/migrations/2025_01_19_150608_add_column_uuid_to_table_photo.php b/database/migrations/2025_01_19_150608_add_column_uuid_to_table_photo.php new file mode 100644 index 0000000..35acd09 --- /dev/null +++ b/database/migrations/2025_01_19_150608_add_column_uuid_to_table_photo.php @@ -0,0 +1,28 @@ +uuid('uuid')->unique()->after('id'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('photos', function (Blueprint $table) { + $table->dropColumn("uuid"); + }); + } +}; diff --git a/database/migrations/2025_01_19_205249_add_columns_users.php b/database/migrations/2025_01_19_205249_add_columns_users.php new file mode 100644 index 0000000..6ffdb54 --- /dev/null +++ b/database/migrations/2025_01_19_205249_add_columns_users.php @@ -0,0 +1,32 @@ +string("totem", 100)->default(""); + $table->string("tel", 25)->default(""); + $table->string("role", 255)->default(""); + $table->tinyInteger("contactable")->default(0); + $table->string("path")->default("profiles/none.png"); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table("users", function (Blueprint $table) { + $table->dropColumns(["totem", "tel", "role"]); + }); + } +}; diff --git a/database/migrations/2025_01_19_205325_add_relation_user_photo.php b/database/migrations/2025_01_19_205325_add_relation_user_photo.php new file mode 100644 index 0000000..160accd --- /dev/null +++ b/database/migrations/2025_01_19_205325_add_relation_user_photo.php @@ -0,0 +1,27 @@ +unsignedBigInteger("user_id"); + $table->foreign("user_id")->references("id")->on("users"); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + // + } +}; diff --git a/public/icons/account.svg b/public/icons/account.svg new file mode 100644 index 0000000..b836ddf --- /dev/null +++ b/public/icons/account.svg @@ -0,0 +1,2 @@ + +Account Settings \ No newline at end of file diff --git a/public/img/add-image.svg b/public/icons/add-image.svg similarity index 100% rename from public/img/add-image.svg rename to public/icons/add-image.svg diff --git a/public/icons/add.svg b/public/icons/add.svg new file mode 100644 index 0000000..cfe315d --- /dev/null +++ b/public/icons/add.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/public/icons/admin.svg b/public/icons/admin.svg new file mode 100644 index 0000000..11fdae0 --- /dev/null +++ b/public/icons/admin.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/archive.svg b/public/icons/archive.svg new file mode 100644 index 0000000..edca59a --- /dev/null +++ b/public/icons/archive.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/public/icons/block-content.svg b/public/icons/block-content.svg new file mode 100644 index 0000000..3f1788d --- /dev/null +++ b/public/icons/block-content.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/img/block-quote.svg b/public/icons/block-quote.svg similarity index 100% rename from public/img/block-quote.svg rename to public/icons/block-quote.svg diff --git a/public/icons/block-relance.svg b/public/icons/block-relance.svg new file mode 100644 index 0000000..33797c2 --- /dev/null +++ b/public/icons/block-relance.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/public/img/bold.svg b/public/icons/bold.svg similarity index 100% rename from public/img/bold.svg rename to public/icons/bold.svg diff --git a/public/icons/cancel.svg b/public/icons/cancel.svg new file mode 100644 index 0000000..1a97ad4 --- /dev/null +++ b/public/icons/cancel.svg @@ -0,0 +1,6 @@ + + + +cancel2 + + \ No newline at end of file diff --git a/public/icons/chats-notif.png b/public/icons/chats-notif.png new file mode 100644 index 0000000..fc7078c Binary files /dev/null and b/public/icons/chats-notif.png differ diff --git a/public/icons/chats.png b/public/icons/chats.png new file mode 100644 index 0000000..3865c68 Binary files /dev/null and b/public/icons/chats.png differ diff --git a/public/icons/communications.svg b/public/icons/communications.svg new file mode 100644 index 0000000..f5498fa --- /dev/null +++ b/public/icons/communications.svg @@ -0,0 +1,15 @@ + + + + communication / 2 - communication, email, envelope, mail, message icon + + + + + + + + + + + \ No newline at end of file diff --git a/public/icons/cross.svg b/public/icons/cross.svg new file mode 100644 index 0000000..066b7ef --- /dev/null +++ b/public/icons/cross.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/dark-messagerie-notif.png b/public/icons/dark-messagerie-notif.png new file mode 100644 index 0000000..2f5d4d8 Binary files /dev/null and b/public/icons/dark-messagerie-notif.png differ diff --git a/public/icons/darkmode.svg b/public/icons/darkmode.svg new file mode 100644 index 0000000..967fb3a --- /dev/null +++ b/public/icons/darkmode.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/public/icons/delete.png b/public/icons/delete.png new file mode 100644 index 0000000..db136c8 Binary files /dev/null and b/public/icons/delete.png differ diff --git a/public/icons/done.svg b/public/icons/done.svg new file mode 100644 index 0000000..100a62f --- /dev/null +++ b/public/icons/done.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/public/icons/download.png b/public/icons/download.png new file mode 100644 index 0000000..f86fcdb Binary files /dev/null and b/public/icons/download.png differ diff --git a/public/icons/dropdown-arrow.svg b/public/icons/dropdown-arrow.svg new file mode 100644 index 0000000..985dc5f --- /dev/null +++ b/public/icons/dropdown-arrow.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/dwg.png b/public/icons/dwg.png new file mode 100644 index 0000000..58072c1 Binary files /dev/null and b/public/icons/dwg.png differ diff --git a/public/icons/entreprise.svg b/public/icons/entreprise.svg new file mode 100644 index 0000000..10a295b --- /dev/null +++ b/public/icons/entreprise.svg @@ -0,0 +1,2 @@ + +enterprise \ No newline at end of file diff --git a/public/icons/error.svg b/public/icons/error.svg new file mode 100644 index 0000000..1c4b64b --- /dev/null +++ b/public/icons/error.svg @@ -0,0 +1,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/icons/excel.png b/public/icons/excel.png new file mode 100644 index 0000000..99eae73 Binary files /dev/null and b/public/icons/excel.png differ diff --git a/public/img/facebook.svg b/public/icons/facebook.svg similarity index 100% rename from public/img/facebook.svg rename to public/icons/facebook.svg diff --git a/public/icons/fichier.png b/public/icons/fichier.png new file mode 100644 index 0000000..708ae45 Binary files /dev/null and b/public/icons/fichier.png differ diff --git a/public/icons/file-upload.svg b/public/icons/file-upload.svg new file mode 100644 index 0000000..7e02b27 --- /dev/null +++ b/public/icons/file-upload.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/public/icons/filter.svg b/public/icons/filter.svg new file mode 100644 index 0000000..3af7394 --- /dev/null +++ b/public/icons/filter.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/public/icons/full-screen.svg b/public/icons/full-screen.svg new file mode 100644 index 0000000..db8c33e --- /dev/null +++ b/public/icons/full-screen.svg @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/public/icons/hide.svg b/public/icons/hide.svg new file mode 100644 index 0000000..e283a02 --- /dev/null +++ b/public/icons/hide.svg @@ -0,0 +1,13 @@ + + + + + + + + \ No newline at end of file diff --git a/public/icons/historique.png b/public/icons/historique.png new file mode 100644 index 0000000..3d7b97d Binary files /dev/null and b/public/icons/historique.png differ diff --git a/public/icons/home.svg b/public/icons/home.svg new file mode 100644 index 0000000..64f2481 --- /dev/null +++ b/public/icons/home.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/img/instagram.svg b/public/icons/instagram.svg similarity index 100% rename from public/img/instagram.svg rename to public/icons/instagram.svg diff --git a/public/img/italic.svg b/public/icons/italic.svg similarity index 100% rename from public/img/italic.svg rename to public/icons/italic.svg diff --git a/public/img/list.svg b/public/icons/list.svg similarity index 100% rename from public/img/list.svg rename to public/icons/list.svg diff --git a/public/icons/loaded.svg b/public/icons/loaded.svg new file mode 100644 index 0000000..b3b76db --- /dev/null +++ b/public/icons/loaded.svg @@ -0,0 +1,19 @@ + + + + + file_done [#1705] + Created with Sketch. + + + + + + + + + + + + + \ No newline at end of file diff --git a/public/icons/loading.svg b/public/icons/loading.svg new file mode 100644 index 0000000..1edc422 --- /dev/null +++ b/public/icons/loading.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/public/icons/logout.svg b/public/icons/logout.svg new file mode 100644 index 0000000..9ff3310 --- /dev/null +++ b/public/icons/logout.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/img/mail.svg b/public/icons/mail.svg similarity index 100% rename from public/img/mail.svg rename to public/icons/mail.svg diff --git a/public/icons/menu.svg b/public/icons/menu.svg new file mode 100644 index 0000000..335cb31 --- /dev/null +++ b/public/icons/menu.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/messagerie-notif.png b/public/icons/messagerie-notif.png new file mode 100644 index 0000000..f3271fa Binary files /dev/null and b/public/icons/messagerie-notif.png differ diff --git a/public/icons/messagerie.png b/public/icons/messagerie.png new file mode 100644 index 0000000..bd9c892 Binary files /dev/null and b/public/icons/messagerie.png differ diff --git a/public/icons/model.svg b/public/icons/model.svg new file mode 100644 index 0000000..2395bd0 --- /dev/null +++ b/public/icons/model.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/public/icons/modify.svg b/public/icons/modify.svg new file mode 100644 index 0000000..681c13e --- /dev/null +++ b/public/icons/modify.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/public/icons/more.svg b/public/icons/more.svg new file mode 100644 index 0000000..f507aa3 --- /dev/null +++ b/public/icons/more.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/next.svg b/public/icons/next.svg new file mode 100644 index 0000000..dd9f9ad --- /dev/null +++ b/public/icons/next.svg @@ -0,0 +1,13 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/icons/pdf.png b/public/icons/pdf.png new file mode 100644 index 0000000..81e7cfa Binary files /dev/null and b/public/icons/pdf.png differ diff --git a/public/icons/pdf_download.png b/public/icons/pdf_download.png new file mode 100644 index 0000000..2494076 Binary files /dev/null and b/public/icons/pdf_download.png differ diff --git a/public/icons/photo.svg b/public/icons/photo.svg new file mode 100644 index 0000000..c4131ee --- /dev/null +++ b/public/icons/photo.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/project.svg b/public/icons/project.svg new file mode 100644 index 0000000..90317d2 --- /dev/null +++ b/public/icons/project.svg @@ -0,0 +1,12 @@ + + + + project + + + + + + + + \ No newline at end of file diff --git a/public/icons/projects.svg b/public/icons/projects.svg new file mode 100644 index 0000000..117f2b0 --- /dev/null +++ b/public/icons/projects.svg @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/public/icons/projet.png b/public/icons/projet.png new file mode 100644 index 0000000..73fb8cf Binary files /dev/null and b/public/icons/projet.png differ diff --git a/public/icons/relance.svg b/public/icons/relance.svg new file mode 100644 index 0000000..eedc867 --- /dev/null +++ b/public/icons/relance.svg @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/public/icons/reopen.svg b/public/icons/reopen.svg new file mode 100644 index 0000000..ca78989 --- /dev/null +++ b/public/icons/reopen.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/reset-password.svg b/public/icons/reset-password.svg new file mode 100644 index 0000000..6eda0bb --- /dev/null +++ b/public/icons/reset-password.svg @@ -0,0 +1,14 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/icons/search.svg b/public/icons/search.svg new file mode 100644 index 0000000..aaebb5c --- /dev/null +++ b/public/icons/search.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/public/icons/sections.svg b/public/icons/sections.svg new file mode 100644 index 0000000..cf6dcac --- /dev/null +++ b/public/icons/sections.svg @@ -0,0 +1,12 @@ + + + + group + + + + + + + + \ No newline at end of file diff --git a/public/icons/send.svg b/public/icons/send.svg new file mode 100644 index 0000000..b464bf8 --- /dev/null +++ b/public/icons/send.svg @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/public/icons/settings.svg b/public/icons/settings.svg new file mode 100644 index 0000000..0c2c378 --- /dev/null +++ b/public/icons/settings.svg @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/public/icons/show.svg b/public/icons/show.svg new file mode 100644 index 0000000..2a00ea5 --- /dev/null +++ b/public/icons/show.svg @@ -0,0 +1,10 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/icons/slider.svg b/public/icons/slider.svg new file mode 100644 index 0000000..639c3fc --- /dev/null +++ b/public/icons/slider.svg @@ -0,0 +1,15 @@ + + + + Slide-show + + + + + + + + + + + \ No newline at end of file diff --git a/public/icons/step.png b/public/icons/step.png new file mode 100644 index 0000000..71d34c7 Binary files /dev/null and b/public/icons/step.png differ diff --git a/public/icons/success.svg b/public/icons/success.svg new file mode 100644 index 0000000..7078284 --- /dev/null +++ b/public/icons/success.svg @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/public/img/title.svg b/public/icons/title.svg similarity index 100% rename from public/img/title.svg rename to public/icons/title.svg diff --git a/public/icons/type.svg b/public/icons/type.svg new file mode 100644 index 0000000..37b832b --- /dev/null +++ b/public/icons/type.svg @@ -0,0 +1,15 @@ + + + + category + + + + + + + + + + + \ No newline at end of file diff --git a/public/icons/unity.svg b/public/icons/unity.svg new file mode 100644 index 0000000..7841453 --- /dev/null +++ b/public/icons/unity.svg @@ -0,0 +1,6 @@ + + + +unity + + \ No newline at end of file diff --git a/public/icons/utilisateurs.png b/public/icons/utilisateurs.png new file mode 100644 index 0000000..ce6e3d9 Binary files /dev/null and b/public/icons/utilisateurs.png differ diff --git a/public/icons/word.png b/public/icons/word.png new file mode 100644 index 0000000..06908c1 Binary files /dev/null and b/public/icons/word.png differ diff --git a/public/icons/zip.png b/public/icons/zip.png new file mode 100644 index 0000000..42fe1c3 Binary files /dev/null and b/public/icons/zip.png differ diff --git a/public/img/background.svg b/public/img/background.svg deleted file mode 100644 index 53c922b..0000000 --- a/public/img/background.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/img/sarasin.jpg b/public/img/sarasin.jpg new file mode 100644 index 0000000..beebc6b Binary files /dev/null and b/public/img/sarasin.jpg differ diff --git a/public/img/sarasin.png b/public/img/sarasin.png new file mode 100644 index 0000000..9edb4e2 Binary files /dev/null and b/public/img/sarasin.png differ diff --git a/resources/css/app.css b/resources/css/app.css index b9013f4..97fd799 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -129,6 +129,57 @@ @layer utilities { } } + .cart-in { + animation-name: cart-in; + animation-duration: 0.1s; + animation-timing-function: ease-in; + animation-fill-mode: forwards; + } + + @keyframes cart-in { + from { + border-radius: 0px; + } + + to { + border-radius: 8px; + } + } + + .cart-out { + animation-name: cart-out; + animation-duration: 0.1s; + animation-timing-function: ease-in; + animation-fill-mode: forwards; + } + + @keyframes cart-out { + from { + border-radius: 8px; + } + + to { + border-radius: 0px; + } + } + + .load-rotate { + animation-name: rotate; + animation-duration: 3s; + animation-timing-function: linear; + animation-iteration-count: infinite; + } + + @keyframes rotate { + from { + transform: rotate(0deg); + } + + to { + transform: rotate(360deg); + } + } + .icon-in { animation: 0.2s icon-in-anim ease-out forwards; } diff --git a/resources/js/Components/Dropzone.vue b/resources/js/Components/Dropzone.vue new file mode 100644 index 0000000..866f8fe --- /dev/null +++ b/resources/js/Components/Dropzone.vue @@ -0,0 +1,142 @@ + + + diff --git a/resources/js/Layouts/GuestLayout.vue b/resources/js/Layouts/GuestLayout.vue index f09989d..72f63ea 100644 --- a/resources/js/Layouts/GuestLayout.vue +++ b/resources/js/Layouts/GuestLayout.vue @@ -1,11 +1,13 @@