From 07b1363043ced213887685a479e68bb110ea4dce Mon Sep 17 00:00:00 2001 From: duxiaofeng-github Date: Wed, 8 Jan 2025 14:59:29 +0800 Subject: [PATCH] fix styles --- webui/src/components/VaultPage.tsx | 10 ++- webui/src/components/vaultinfo/ClaimForm.tsx | 72 +++++++++---------- .../components/vaultinfo/EligibilityCheck.tsx | 13 ++-- webui/src/index.css | 40 ++++++++++- 4 files changed, 89 insertions(+), 46 deletions(-) diff --git a/webui/src/components/VaultPage.tsx b/webui/src/components/VaultPage.tsx index 588ae13..eb4167e 100644 --- a/webui/src/components/VaultPage.tsx +++ b/webui/src/components/VaultPage.tsx @@ -59,7 +59,15 @@ const VaultPage = (): React.ReactElement => {
- Powered by{" "} + Brought to you by{" "} + + Automata Netowork + {" "} + | Powered by{" "} + <> +
+ { + e.preventDefault(); + props.onMoreInfoDisplay(); + }} + > + More details + export + +
Claimable balance: @@ -109,27 +121,12 @@ const ClaimForm = (props: {
-
- { - e.preventDefault(); - props.onMoreInfoDisplay(); - }} - > - More details - export - -
-
-
- Amount ({chainConfig.TokenName}) -
-
Target Wallet
-
-
-
+
+
+
+ Amount ({chainConfig.TokenName}) +
-
+
+
Target Wallet
) : null} -
-
- requestFunds(evt.target as HTMLButtonElement)} - disabled={claimRequest.isPending} - > - currency-dollar - Request Funds - -
-
+ requestFunds(evt.target as HTMLButtonElement)} + disabled={claimRequest.isPending} + > + currency-dollar + Request Funds +
-
+ ); function requestFunds(button: HTMLButtonElement) { diff --git a/webui/src/components/vaultinfo/EligibilityCheck.tsx b/webui/src/components/vaultinfo/EligibilityCheck.tsx index 401f8a6..5234cdd 100644 --- a/webui/src/components/vaultinfo/EligibilityCheck.tsx +++ b/webui/src/components/vaultinfo/EligibilityCheck.tsx @@ -28,7 +28,14 @@ const EligibilityCheck = (props: { }); if (tokenBalance.isLoading || firstTokenId.isLoading) { - return ; + return ( + + ); } if (tokenBalance.isError) { return ( @@ -64,8 +71,4 @@ const EligibilityCheck = (props: { return ; }; -const Loading = (props: { text: string }) => { - return
{props.text}
; -}; - export default EligibilityCheck; diff --git a/webui/src/index.css b/webui/src/index.css index 39f121a..9782b54 100644 --- a/webui/src/index.css +++ b/webui/src/index.css @@ -83,12 +83,15 @@ input[type=number] { min-height: 64px; justify-content: center; padding: 12px; + font-size: 14px; } .page-block { padding: 24px; text-align: left; max-width: 609px; + overflow: hidden; + width: 100%; } h1 { @@ -345,7 +348,7 @@ button[data-testid="rk-account-button"] > div:nth-child(2) > div:nth-child(1) > } .ata-claim-button { - margin-top: 8px; + margin-top: 24px; } .ata-currency-dollar-icon { @@ -421,6 +424,7 @@ button[data-testid="rk-account-button"] > div:nth-child(2) > div:nth-child(1) > display: flex; flex-direction: column; gap: 4px; + overflow: hidden; } .ata-notification-title { @@ -434,6 +438,8 @@ button[data-testid="rk-account-button"] > div:nth-child(2) > div:nth-child(1) > font-size: 12px; font-weight: 400; line-height: 14px; + text-overflow: ellipsis; + overflow: hidden; } .ata-claim-notification { @@ -492,4 +498,36 @@ button[data-testid="rk-account-button"] > div:nth-child(2) > div:nth-child(1) > .ata-manage-btn .ata-glass-btn-content { font-size: 14px; +} + +.ata-claim-form-fields { + display: flex; + align-items: center; + gap: 24px; +} + +.ata-claim-form-field { + flex-grow: 1; +} + +.ata-claim-form-field-amount { + flex-grow: 0; + width: 150px; +} + +@media (max-width: 1024px) { + .ata-claim-info { + align-items: flex-start; + flex-direction: column; + gap: 8px; + } + + .ata-claim-form-fields { + flex-direction: column; + align-items: stretch; + } + + .ata-claim-form-field-amount { + width: auto; + } } \ No newline at end of file