Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(bridge-ui-v2): minor styling fixes for mobile #15495

Merged
merged 1 commit into from
Jan 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
};
</script>

<Icon type="circle" fillClass={typeMap[type]} />
<Icon type="circle" fillClass={typeMap[type]} class="min-w-[20px] max-w-[20px]" />
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
<!-- svelte-ignore a11y-no-static-element-interactions -->
<div class="flex text-primary-content md:h-[80px] h-[45px] w-full my-[10px] md:my-[0px]">
{#if isDesktopOrLarger}
<button class="w-2/6 py-2 flex flex-row space-x-[8px]" on:click={() => (nftInfoOpen = true)}>
<button class="w-3/12 py-2 flex flex-row space-x-[8px]" on:click={() => (nftInfoOpen = true)}>
{#if loading}
<div class="rounded-[10px] w-[50px] h-[50px] bg-neutral flex items-center justify-center">
<Spinner />
Expand All @@ -141,18 +141,18 @@
{/if}
</button>

<div class="w-1/6 py-2 flex flex-row">
<div class="w-2/12 py-2 flex flex-row">
<ChainSymbolName chainId={item.srcChainId} />
</div>
<div class="w-1/6 py-2 flex flex-row">
<div class="w-2/12 py-2 flex flex-row">
<ChainSymbolName chainId={item.destChainId} />
</div>
<div class="w-1/6 py-2 flex flex-col justify-center">
<div class="w-1/12 py-2 flex flex-col self-center">
{itemAmountDisplay}
</div>
{:else}
<div class="flex text-primary-content w-full">
<button class="space-x-[8px]" on:click={() => (nftInfoOpen = true)}>
<div class="flex text-primary-content w-full justify-content-left">
<button class="space-x-[8px] w-1/4" on:click={() => (nftInfoOpen = true)}>
{#if loading}
<div class="rounded-[10px] w-[50px] h-[50px] bg-neutral flex items-center justify-center">
<Spinner />
Expand Down Expand Up @@ -185,12 +185,26 @@
{/if}
</div>
{/if}
<div class="flex" {...attrs} tabindex="0" on:click={handleClick} on:keydown={handlePress}>
<div
class="flex md:w-2/12 py-2 flex flex-col justify-center text-center"
{...attrs}
tabindex="0"
on:click={handleClick}
on:keydown={handlePress}>
<Status
on:click={isDesktopOrLarger ? undefined : openDetails}
bridgeTx={item}
on:insufficientFunds={handleInsufficientFunds} />
</div>
<div class="hidden md:flex grow py-2 flex flex-col justify-center">
<a
class="flex justify-center py-3 link"
href={`${chainConfig[Number(item.srcChainId)].urls.explorer}/tx/${item.hash}`}
target="_blank">
{$t('transactions.link.explorer')}
<Icon type="arrow-top-right" fillClass="fill-primary-link" />
</a>
</div>
</div>
{:else}
<!-- We disable these warnings as we dynamically add the role -->
Expand Down Expand Up @@ -244,7 +258,6 @@
on:click={isDesktopOrLarger ? undefined : openDetails}
bridgeTx={item}
on:insufficientFunds={handleInsufficientFunds} />
<!-- <div class="btn btn-primary" on:click={isDesktopOrLarger ? undefined : openDetails}></div> -->
</div>
<div class="hidden md:flex w-1/5 py-2 flex flex-col justify-center">
<a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,17 @@
</div>
<div class="w-1/5 py-2 text-secondary-content">{$t('transactions.header.explorer')}</div>
{:else if $activeBridge === BridgeTypes.NFT}
<div class="w-2/6 py-2 text-secondary-content">Item</div>
<div class="w-1/6 py-2 text-secondary-content">{$t('transactions.header.from')}</div>
<div class="w-1/6 py-2 text-secondary-content">{$t('transactions.header.to')}</div>
<div class="w-1/6 py-2 text-secondary-content">{$t('transactions.header.amount')}</div>
<div class="w-1/6 py-2 text-secondary-content flex flex-row">
<div class="w-3/12 content-center py-2 text-secondary-content">{$t('transactions.header.item')}</div>
<div class="w-2/12 content-center py-2 text-secondary-content">{$t('transactions.header.from')}</div>
<div class="w-2/12 content-center py-2 text-secondary-content">{$t('transactions.header.to')}</div>
<div class="w-1/12 content-center py-2 text-secondary-content">{$t('transactions.header.amount')}</div>
<div class="w-2/12 py-2 text-secondary-content flex flex-row">
{$t('transactions.header.status')}
<StatusInfoDialog />
</div>
<div class="w-1/6 py-2 text-secondary-content">{$t('transactions.header.explorer')}</div>
<div class="grow py-2 text-secondary-content flex justify-center">
{$t('transactions.header.explorer')}
</div>
{/if}
</div>
<div class="h-sep !mb-0" />
Expand Down
3 changes: 2 additions & 1 deletion packages/bridge-ui-v2/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,12 @@
"amount": "Amount",
"explorer": "Explorer",
"from": "From",
"item": "Item",
"status": "Status",
"to": "To"
},
"link": {
"explorer": "View details",
"explorer": "Details",
"explorer_short": "View"
},
"no_transactions": "No transactions found",
Expand Down
Loading