Skip to content

Commit

Permalink
Add tooltip on task status + increase lenth of profile photo path
Browse files Browse the repository at this point in the history
  • Loading branch information
Ortiix85 committed Jan 21, 2024
1 parent 7115037 commit c25ea3e
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/Http/Requests/UpdateProfileRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function rules() {
'email' => ['required', 'email'],
'password' => ['required', 'min:'.self::$minPasswordLength, 'regex:/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).+$/'],
'password_confirm' => ['required', 'same:password'],
'image_url' => ['required', 'url', 'max:255'],
'image_url' => ['required', 'url', 'max:500'],
];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function up(): void
$table->string('last_name');
$table->string('email')->unique();
$table->string('password');
$table->string('profile_photo_path')->nullable();
$table->longText('profile_photo_path')->nullable();
$table->timestamps();
});
}
Expand Down
2 changes: 1 addition & 1 deletion resources/views/components/project-card/circle.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<img draggable="false" src="{{$url}}" class="w-full h-full object-cover rounded-full" alt="Image">
@endif
@if($tooltip)
<x-ui.tooltip text="{{$name}}"/>
<x-ui.tooltip text="{{$name}}" bottom="2"/>
@endif

</div>
9 changes: 8 additions & 1 deletion resources/views/components/task/priority.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,28 @@
switch ($priority) {
case 0:
$color="bg-green-600";
$tooltip = "Moderate";
break;
case 1:
$color="bg-amber-600";
$tooltip = "High Priority";
break;
case 2:
$color="bg-red";
$tooltip = "Urgent";
break;
default:
$color="bg-grey-600";
$tooltip = "";
break;
}
}
@endphp

@if(isset($priority))
<div class="h-5 w-5 rounded-full {{$color}} "></div>
<div class="relative inline-block group">
<div class="h-5 w-5 rounded-full {{$color}} "></div>
<x-ui.tooltip text="{{$tooltip}}" bottom="1.5"/>
</div>
@endif
2 changes: 1 addition & 1 deletion resources/views/components/ui/people.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

@if($moreCircles)
<div class="h-9 w-9 -ml-3 rounded-full flex items-center justify-center bg-gray-300 text-sm relative inline-block group">+{{($users->count())-$displayedCircles}}
<x-ui.tooltip text="{{$namesString}}"/>
<x-ui.tooltip text="{{$namesString}}" bottom="2"/>
</div>
@endif
</div>
Expand Down
5 changes: 3 additions & 2 deletions resources/views/components/ui/tooltip.blade.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
@props([
'text' => null
'text' => null,
'bottom' => "2.5"
])

@if($text != null)
<div class="hidden absolute z-10 group-hover:flex bg-white rounded-xl p-2 left-1/2 -translate-x-1/2 bottom-[2.5rem] w-fit-content flex flex-col items-center justify-center gap-1 cursor-pointer shadow-box inline-block whitespace-nowrap">
<div class="hidden absolute z-10 group-hover:flex bg-white rounded-xl p-2 left-1/2 -translate-x-1/2 bottom-[{{$bottom}}rem] w-fit-content flex flex-col items-center justify-center gap-1 cursor-pointer shadow-box inline-block whitespace-nowrap">
<p class="text-xs">{{$text}}</p>
</div>
@endif

0 comments on commit c25ea3e

Please sign in to comment.