From 067615afc2f217c532ffb12568eb0a8568618056 Mon Sep 17 00:00:00 2001 From: jessop Date: Thu, 2 Apr 2020 14:45:21 -0400 Subject: [PATCH 1/2] style and limit height of errors on tip unlock modal --- static/app-strings.json | 11 ++- ui/component/supportsLiquidate/view.jsx | 102 +++++++++++++----------- ui/scss/init/_gui.scss | 6 ++ 3 files changed, 70 insertions(+), 49 deletions(-) diff --git a/static/app-strings.json b/static/app-strings.json index 2981c0ccd..f974fb1de 100644 --- a/static/app-strings.json +++ b/static/app-strings.json @@ -1116,8 +1116,15 @@ "Repost %count%": "Repost %count%", "File Description": "File Description", "View %count% reposts": "View %count% reposts", - "Preparing your content": "Preparing your content", "Already have an account? %sign_in%": "Already have an account? %sign_in%", "Sign in with a password (optional)": "Sign in with a password (optional)", - "Don't have an account? %sign_up%": "Don't have an account? %sign_up%" + "Don't have an account? %sign_up%": "Don't have an account? %sign_up%", + "Preparing your content": "Preparing your content", + "File Details": "File Details", + "You can unlock all or some of this LBC at any time.": "You can unlock all or some of this LBC at any time.", + "Keeping it locked improves the trust and discoverability of your content.": "Keeping it locked improves the trust and discoverability of your content.", + "It's usually only worth unlocking what you intend to use immediately. %learn_more%": "It's usually only worth unlocking what you intend to use immediately. %learn_more%", + "%amount% available to unlock": "%amount% available to unlock", + "%message% hihi": "%message% hihi", + "Comrade Yrbl, we have a problem": "Comrade Yrbl, we have a problem" } diff --git a/ui/component/supportsLiquidate/view.jsx b/ui/component/supportsLiquidate/view.jsx index 20da319a5..ec6307869 100644 --- a/ui/component/supportsLiquidate/view.jsx +++ b/ui/component/supportsLiquidate/view.jsx @@ -107,60 +107,68 @@ const SupportsLiquidate = (props: Props) => { } body={ - <> -
- - - - ), - }} - > - %amount% available to unlock - -
-
- {previewBalance === 0 &&

{__('No unlockable tips available')}

} - {previewBalance === undefined &&

{__('Loading...')}

} - {previewBalance && ( -
- - = 0 ? amount : previewBalance / 4} // by default, set it to 25% of available - onChange={e => handleChange(e.target.value)} - /> - - = 0 ? amount || '' : previewBalance && previewBalance / 4} - helper={message} - onChange={e => handleChange(e.target.value)} - /> - - )} -
- + !abandonClaimError && ( + <> +
+ + + + ), + }} + > + %amount% available to unlock + +
+
+ {previewBalance === 0 &&

{__('No unlockable tips available')}

} + {previewBalance === undefined &&

{__('Loading...')}

} + {previewBalance && ( +
+ + = 0 ? amount : previewBalance / 4} // by default, set it to 25% of available + onChange={e => handleChange(e.target.value)} + /> + + = 0 ? amount || '' : previewBalance && previewBalance / 4} + helper={message} + onChange={e => handleChange(e.target.value)} + /> + + )} +
+ + ) } actions={ {abandonClaimError ? ( <> -
{__('%message%', { message: abandonClaimError })}
-