From 537ca0fdf5259610ccf35ab742d25b62ed8b4c81 Mon Sep 17 00:00:00 2001 From: jessop Date: Fri, 17 Apr 2020 12:06:49 -0400 Subject: [PATCH 1/8] modify status hiding in txolist --- ui/component/txoList/view.jsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/ui/component/txoList/view.jsx b/ui/component/txoList/view.jsx index 2b637c1c3..61fbcc1a0 100644 --- a/ui/component/txoList/view.jsx +++ b/ui/component/txoList/view.jsx @@ -44,9 +44,7 @@ function TxoList(props: Props) { }; const hideStatus = - type === TXO.SENT || - (currentUrlParams.type === TXO.RECEIVED && - (currentUrlParams.subtype === TXO.PAYMENT || currentUrlParams.subtype === TXO.PURCHASE)); + type === TXO.SENT || (currentUrlParams.type === TXO.RECEIVED && currentUrlParams.subtype !== TXO.TIP); const params = {}; if (currentUrlParams.type) { -- 2.45.3 From f77439708eb29eed7140dbc6e15b24e1e98fa97d Mon Sep 17 00:00:00 2001 From: SleepingFox Date: Thu, 2 Apr 2020 19:09:59 -0400 Subject: [PATCH 2/8] hidden label parent of button content visually on the page, label needs to be centered inside of largestLabel --- ui/component/button/view.jsx | 21 ++++++++++++++++----- ui/component/subscribeButton/view.jsx | 1 + 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/ui/component/button/view.jsx b/ui/component/button/view.jsx index e99323388..d621f446d 100644 --- a/ui/component/button/view.jsx +++ b/ui/component/button/view.jsx @@ -14,6 +14,7 @@ type Props = { href: ?string, title: ?string, label: ?string, + largestLabel: ?string, icon: ?string, iconRight: ?string, disabled: ?boolean, @@ -47,6 +48,7 @@ const Button = forwardRef((props: Props, ref: any) => { href, title, label, + largestLabel, icon, // This should rarely be used. Regular buttons should just use `icon` // `iconRight` is used for the header (home) button with the LBRY icon and external links that are displayed inline @@ -90,8 +92,17 @@ const Button = forwardRef((props: Props, ref: any) => { const content = ( - {icon && } - {label && {label}} + {icon && } + { +

+ {largestLabel} + {label && ( + + {label} + + )} +

+ } {children && children} {iconRight && }
@@ -127,7 +138,7 @@ const Button = forwardRef((props: Props, ref: any) => { return ( { + onClick={(e) => { e.stopPropagation(); }} to={`/$/${PAGES.AUTH}?redirect=${pathname}`} @@ -147,7 +158,7 @@ const Button = forwardRef((props: Props, ref: any) => { to={path} title={title} disabled={disabled} - onClick={e => { + onClick={(e) => { e.stopPropagation(); if (onClick) { onClick(); @@ -165,7 +176,7 @@ const Button = forwardRef((props: Props, ref: any) => { title={title} aria-label={description || label || title} className={combinedClassName} - onClick={e => { + onClick={(e) => { if (onClick) { e.stopPropagation(); onClick(e); diff --git a/ui/component/subscribeButton/view.jsx b/ui/component/subscribeButton/view.jsx index 57ecda021..331c634a9 100644 --- a/ui/component/subscribeButton/view.jsx +++ b/ui/component/subscribeButton/view.jsx @@ -50,6 +50,7 @@ export default function SubscribeButton(props: Props) {