-
-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(home): improve mobile claims ux (#1720)
* feat(home): improve mobile claims ux * feat: add timestamp tooltip to claim table rows * fix: add cursor-help class for title attrs
- Loading branch information
1 parent
762892a
commit c1bb121
Showing
5 changed files
with
65 additions
and
28 deletions.
There are no files selected for viewing
39 changes: 39 additions & 0 deletions
39
resources/views/community/components/claims/claim-mobile-block.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
use App\Community\Enums\ClaimSetType; | ||
use App\Community\Enums\ClaimStatus; | ||
use Illuminate\Support\Carbon; | ||
$claimSetTypeCopy = ClaimSetType::toString(ClaimSetType::NewSet); | ||
if ($claim['SetType'] !== ClaimSetType::NewSet) { | ||
$claimSetTypeCopy = ClaimSetType::toString(ClaimSetType::Revision); | ||
} | ||
$targetTimestamp = $claim['Status'] === ClaimStatus::Active ? $claim['Created'] : $claim['DoneTime']; | ||
$timeAgo = Carbon::createFromFormat("Y-m-d H:i:s", $targetTimestamp)->diffForHumans(); | ||
$gameSystemIconSrc = getSystemIconUrl($claim['ConsoleID']); | ||
?> | ||
|
||
<div class="rounded p-2 bg-embed w-full"> | ||
<div class="flex items-center gap-x-2.5"> | ||
{!! gameAvatar($claim, label: false, iconSize: 48, iconClass: 'border-0 rounded-sm badgeimg') !!} | ||
|
||
<div class="flex flex-col gap-y-0.5 w-full"> | ||
<a class="leading-4 cursor-pointer"> | ||
{!! renderGameTitle($claim['GameTitle']) !!} | ||
</a> | ||
|
||
<div class="flex justify-between w-full text-xs tracking-tighter"> | ||
<div> | ||
<img src="{{ $gameSystemIconSrc }}" width="18" height="18" alt="{{ $claim['ConsoleName'] }} console icon"> | ||
<span>{{ $claim['ConsoleName'] }}</span> | ||
</div> | ||
</div> | ||
|
||
<div class="text-xs flex justify-between"> | ||
{!! userAvatar($claim['User'], iconSize: 14) !!} | ||
<span class="text-xs tracking-tighter">{{ $claimSetTypeCopy }}, {{ $timeAgo }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
resources/views/community/components/claims/new-claim-table-row.blade.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters