-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: prevent amount to be truncated on transactions headers (#851)
- Loading branch information
1 parent
16c1a45
commit 6b4f2e1
Showing
8 changed files
with
137 additions
and
44 deletions.
There are no files selected for viewing
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
Large diffs are not rendered by default.
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
33 changes: 23 additions & 10 deletions
33
resources/views/components/general/entity-header-item.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 |
---|---|---|
@@ -1,29 +1,42 @@ | ||
<div class="entity-header-item {{ $wrapperClass ?? false }}"> | ||
@unless($withoutIcon ?? false) | ||
@props([ | ||
'title', | ||
'text', | ||
'wrapperClass' => '', | ||
'contentClass' => 'md:ml-4 md:pr-4', | ||
'url' => false, | ||
'withoutIcon' => false, | ||
'icon' => false, | ||
'iconSize' => false, | ||
'avatar' => false, | ||
'truncate' => true, | ||
]) | ||
|
||
<div class="entity-header-item {{ $wrapperClass }}{{ $truncate ? ' overflow-x-auto truncate' : '' }}"> | ||
@unless($withoutIcon) | ||
<div class="hidden items-center md:flex"> | ||
<div class="circled-icon text-theme-secondary-900 border-theme-secondary-900 dark:text-theme-secondary-600 dark:border-theme-secondary-600"> | ||
@if ($icon ?? false) | ||
@if ($iconSize ?? false) | ||
@if ($icon) | ||
@if ($iconSize) | ||
<x-ark-icon :name="$icon" :size="$iconSize" /> | ||
@else | ||
<x-ark-icon :name="$icon" /> | ||
@endif | ||
@elseif ($avatar ?? false) | ||
@elseif ($avatar) | ||
<x-general.avatar-small :identifier="$avatar" /> | ||
@endif | ||
</div> | ||
</div> | ||
@endunless | ||
|
||
<div class="flex flex-col flex-1 justify-between font-semibold truncate space-y-2 p-1 -m-1 {{ $contentClass ?? 'md:ml-4 md:pr-4' }}"> | ||
<div class="text-sm leading-tight text-theme-secondary-500 dark:text-theme-secondary-700">{{ $title }}</div> | ||
<div class="flex flex-col flex-1 justify-between font-semibold space-y-2 p-1 -m-1 {{ $contentClass }}{{ $truncate ? ' overflow-x-auto truncate' : '' }}"> | ||
<div class="text-sm leading-tight text-theme-secondary-500 dark:text-theme-secondary-700{{ $truncate ? ' truncate' : '' }}">{{ $title }}</div> | ||
|
||
@if ($url ?? false) | ||
@if ($url) | ||
<a href="{{ $url }}" class="flex leading-tight link"> | ||
<span class="truncate">{{ $text }}</span> | ||
<span class="{{ $truncate ? 'truncate' : 'whitespace-nowrap' }}">{{ $text }}</span> | ||
</a> | ||
@else | ||
<span class="leading-tight truncate text-theme-secondary-900 dark:text-theme-secondary-200">{{ $text }}</span> | ||
<span class="leading-tight text-theme-secondary-900 dark:text-theme-secondary-200{{ $truncate ? ' truncate' : ' whitespace-nowrap' }} ">{{ $text }}</span> | ||
@endif | ||
</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
63 changes: 35 additions & 28 deletions
63
resources/views/components/page-headers/transaction/fallback.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 |
---|---|---|
@@ -1,34 +1,41 @@ | ||
<x-page-headers.transaction.icon-type :model="$transaction" /> | ||
<div class="flex flex-col space-y-8 sm:flex-row sm:space-y-0 xl:pr-7 xl:border-r xl:border-theme-secondary-300"> | ||
<x-page-headers.transaction.icon-type :model="$transaction" wrapper-class="sm:w-1/2" /> | ||
|
||
<x-general.entity-header-item | ||
:title="trans('pages.transaction.amount')" | ||
icon="app-supply" | ||
> | ||
<x-slot name="text"> | ||
<x-general.amount-fiat-tooltip | ||
:amount="$transaction->amount()" | ||
:fiat="$transaction->amountFiat()" | ||
/> | ||
</x-slot> | ||
</x-general.entity-header-item> | ||
<x-general.entity-header-item | ||
:title="trans('pages.transaction.amount')" | ||
icon="app-supply" | ||
:truncate="false" | ||
> | ||
<x-slot name="text"> | ||
<x-general.amount-fiat-tooltip | ||
:amount="$transaction->amount()" | ||
:fiat="$transaction->amountFiat()" | ||
/> | ||
</x-slot> | ||
</x-general.entity-header-item> | ||
</div> | ||
|
||
<x-general.entity-header-item | ||
:title="trans('pages.transaction.fee')" | ||
icon="app-monitor" | ||
> | ||
<x-slot name="text"> | ||
<x-general.amount-fiat-tooltip | ||
<div class="grid grid-cols-1 gap-y-8 sm:grid-cols-2 xl:pl-7"> | ||
<x-general.entity-header-item | ||
:title="trans('pages.transaction.fee')" | ||
:wrapper-class="$wrapperClass ?? ''" | ||
icon="app-monitor" | ||
> | ||
<x-slot name="text"> | ||
<x-general.amount-fiat-tooltip | ||
:amount="$transaction->fee()" | ||
:fiat="$transaction->feeFiat()" | ||
/> | ||
</x-slot> | ||
</x-general.entity-header-item> | ||
</x-slot> | ||
</x-general.entity-header-item> | ||
|
||
<x-general.entity-header-item | ||
:title="trans('pages.transaction.confirmations')" | ||
icon="app-confirmations" | ||
> | ||
<x-slot name="text"> | ||
<x-number>{{ $transaction->confirmations() }}</x-number> | ||
</x-slot> | ||
</x-general.entity-header-item> | ||
<x-general.entity-header-item | ||
:title="trans('pages.transaction.confirmations')" | ||
:wrapper-class="$wrapperClass ?? ''" | ||
icon="app-confirmations" | ||
> | ||
<x-slot name="text"> | ||
<x-number>{{ $transaction->confirmations() }}</x-number> | ||
</x-slot> | ||
</x-general.entity-header-item> | ||
</div> |
6 changes: 5 additions & 1 deletion
6
resources/views/components/page-headers/transaction/icon-type.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
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