Skip to content

Commit

Permalink
bugfix/LIVE-3322-back-to-edit-fees
Browse files Browse the repository at this point in the history
adjust text and remove console.log

update screenshots (ubuntu-latest)

update screenshots (windows-latest)

update screenshots (macos-latest)

Smartling translations are completed for PR#908 from bugfix/LIVE-3322-back-to-edit-fees (#1080)

* File apps/ledger-live-desktop/static/i18n/en/app.json was translated to ru-RU locale

* File apps/ledger-live-desktop/static/i18n/en/app.json was translated to de-DE locale

* File apps/ledger-live-desktop/static/i18n/en/app.json was translated to ko-KR locale

* File apps/ledger-live-desktop/static/i18n/en/app.json was translated to pt-BR locale

* File apps/ledger-live-desktop/static/i18n/en/app.json was translated to es-ES locale

* File apps/ledger-live-desktop/static/i18n/en/app.json was translated to tr-TR locale

* File apps/ledger-live-desktop/static/i18n/en/app.json was translated to ar-AE locale

* File apps/ledger-live-desktop/static/i18n/en/app.json was translated to fr-FR locale

* File apps/ledger-live-desktop/static/i18n/en/app.json was translated to zh-CN locale

* File apps/ledger-live-desktop/static/i18n/en/app.json was translated to ja-JP locale

* File apps/ledger-live-mobile/src/locales/en/common.json was translated to ru-RU locale

* File apps/ledger-live-mobile/src/locales/en/common.json was translated to de-DE locale

* File apps/ledger-live-mobile/src/locales/en/common.json was translated to ko-KR locale

* File apps/ledger-live-mobile/src/locales/en/common.json was translated to pt-BR locale

* File apps/ledger-live-mobile/src/locales/en/common.json was translated to es-ES locale

* File apps/ledger-live-mobile/src/locales/en/common.json was translated to tr-TR locale

* File apps/ledger-live-mobile/src/locales/en/common.json was translated to ar-AE locale

* File apps/ledger-live-mobile/src/locales/en/common.json was translated to fr-FR locale

* File apps/ledger-live-mobile/src/locales/en/common.json was translated to zh-CN locale

* File apps/ledger-live-mobile/src/locales/en/common.json was translated to ja-JP locale

Revert "update screenshots (windows-latest)"

This reverts commit 68ff4e473209618040723253885e78dde3e109b9.

Revert "update screenshots (ubuntu-latest)"

This reverts commit e37df600fa947ee6ab4998e79c7ce96ab88f481b.

Revert "update screenshots (macos-latest)"

This reverts commit 9a15ace50e9b1bc4a27db16335b5c19e4c8e10c1.

update screenshot


Revert "Smartling translations are completed for PR#908 from bugfix/LIVE-3322-back-to-edit-fees (#1080)"

This reverts commit 8d992be74a46ef66e5449d311f3164e1f1b08031.

Smartling update
  • Loading branch information
henri-ly committed Sep 16, 2022
1 parent 241788b commit 6065c3f
Show file tree
Hide file tree
Showing 17 changed files with 45 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/two-dancers-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"ledger-live-desktop": minor
---

Change back button to edit fees in platform modal
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ type Props = {
renderProps?: RenderProps,
noScroll?: boolean,
refocusWhenChange?: any,
backButtonComponent?: React$Node,
};

class ModalBody extends PureComponent<Props> {
Expand All @@ -35,6 +36,7 @@ class ModalBody extends PureComponent<Props> {
render() {
const {
onBack,
backButtonComponent,
onClose,
title,
subTitle,
Expand All @@ -50,7 +52,13 @@ class ModalBody extends PureComponent<Props> {
const renderedFooter = renderFooter && renderFooter(renderProps);
return (
<>
<ModalHeader subTitle={subTitle} onBack={onBack} onClose={onClose} style={headerStyle}>
<ModalHeader
subTitle={subTitle}
onBack={onBack}
onClose={onClose}
style={headerStyle}
backButtonComponent={backButtonComponent}
>
{title || null}
</ModalHeader>
<ModalContent ref={this._content} noScroll={noScroll}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ const ModalHeader = ({
children,
subTitle,
onBack,
backButtonComponent,
onClose,
style = {},
}: {
Expand All @@ -106,16 +107,21 @@ const ModalHeader = ({
onBack?: void => void,
onClose?: void => void,
style?: *,
backButtonComponent?: React$Node,
}) => {
const { t } = useTranslation();
return (
<Container hasTitle={Boolean(children || subTitle)} style={style}>
{onBack ? (
<ModalHeaderAction onClick={onBack} data-test-id="modal-back-button">
<IconAngleLeft size={12} />
<Text ff="Inter|Medium" fontSize={4} color="palette.text.shade40">
{t("common.back")}
</Text>
{backButtonComponent ? (
backButtonComponent
) : (
<Text ff="Inter|Medium" fontSize={4} color="palette.text.shade40">
{t("common.back")}
</Text>
)}
</ModalHeaderAction>
) : (
<div />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export type Step<T, StepProps> = {
component: React$ComponentType<StepProps>,
footer?: React$ComponentType<StepProps>,
onBack?: ?(StepProps) => void,
backButtonComponent?: React$Node,
noScroll?: boolean,
};

Expand Down Expand Up @@ -82,7 +83,7 @@ const Stepper = <T, StepProps>({

invariant(step, "Stepper: step %s doesn't exists", stepId);

const { component: StepComponent, footer: StepFooter, onBack, noScroll } = step;
const { component: StepComponent, footer: StepFooter, onBack, noScroll, backButtonComponent } = step;

// $FlowFixMe we'll need to improve this. also ...props is bad practice...
const stepProps: StepProps = {
Expand All @@ -97,6 +98,7 @@ const Stepper = <T, StepProps>({
refocusWhenChange={stepId}
onClose={hideCloseButton || deviceBlocked ? undefined : onClose}
onBack={onBack && !deviceBlocked ? () => onBack(stepProps) : undefined}
backButtonComponent={backButtonComponent}
title={title}
noScroll={noScroll}
render={() => (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import StepConfirmation, { StepConfirmationFooter } from "./steps/StepConfirmati
import type { St, StepId } from "./types";
import { getAccountBridge } from "@ledgerhq/live-common/bridge/index";
import logger from "~/logger/logger";
import Text from "~/renderer/components/Text";

type Props = {|
stepId: StepId,
Expand Down Expand Up @@ -52,6 +53,13 @@ function useSteps(canEditFees = false): St[] {
component: StepSummary,
footer: StepSummaryFooter,
onBack: canEditFees ? ({ transitionTo }) => transitionTo("amount") : null,
backButtonComponent: canEditFees ? (
<Text ff="Inter|Bold" fontSize={4} color="palette.primary.main">
{t("common.adjustFees")}
</Text>
) : (
undefined
),
},
{
id: "device",
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/static/i18n/ar/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"lock" : "إقفال",
"showMore" : "عرض المزيد",
"back" : "عودة",
"adjustFees" : "تعديل الرسوم",
"reset" : "إعادة تعيين",
"retry" : "إعادة المحاولة",
"range" : "نطاق زمني",
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/static/i18n/de/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"lock" : "Sperren",
"showMore" : "Mehr anzeigen",
"back" : "Zurück",
"adjustFees" : "Gebühren anpassen",
"reset" : "Zurücksetzen",
"retry" : "Wiederholen",
"range" : "Spanne",
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/static/i18n/en/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"lock": "Lock",
"showMore": "Show more",
"back": "Back",
"adjustFees": "Adjust fees",
"reset": "Reset",
"retry": "Retry",
"range": "Range",
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/static/i18n/es/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"lock" : "Bloquear",
"showMore" : "Ver más",
"back" : "Atrás",
"adjustFees" : "Ajustar tarifas",
"reset" : "Restablecer",
"retry" : "Reintentar",
"range" : "Rango",
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/static/i18n/fr/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"lock" : "Verrouiller",
"showMore" : "Afficher plus",
"back" : "Retour",
"adjustFees" : "Modifier les frais",
"reset" : "Réinitialiser",
"retry" : "Réessayer",
"range" : "Période",
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/static/i18n/ja/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"lock" : "ロック",
"showMore" : "さらに表示",
"back" : "戻る",
"adjustFees" : "手数料を調整する",
"reset" : "リセット",
"retry" : "再試行",
"range" : "表示範囲",
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/static/i18n/ko/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"lock" : "잠금",
"showMore" : "자세히 표시",
"back" : "뒤로",
"adjustFees" : "수수료 조정",
"reset" : "재설정",
"retry" : "다시 시도",
"range" : "범위",
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/static/i18n/pt-BR/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"lock" : "Bloquear",
"showMore" : "Mostrar Mais",
"back" : "Voltar",
"adjustFees" : "Ajustar Taxas",
"reset" : "Redefinir",
"retry" : "Tentar novamente",
"range" : "Intervalo",
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/static/i18n/ru/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"lock" : "Заблокировать",
"showMore" : "Показать больше",
"back" : "Назад",
"adjustFees" : "Изменить комиссию",
"reset" : "Сбросить",
"retry" : "Повторить",
"range" : "Период",
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/static/i18n/tr/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"lock" : "Kilitle",
"showMore" : "Daha fazla göster",
"back" : "Geri",
"adjustFees" : "Ücretleri ayarlayın",
"reset" : "Sıfırla",
"retry" : "Tekrar dene",
"range" : "Dönem",
Expand Down
1 change: 1 addition & 0 deletions apps/ledger-live-desktop/static/i18n/zh/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
"lock" : "锁定",
"showMore" : "显示更多",
"back" : "返回",
"adjustFees" : "调整费用",
"reset" : "重置",
"retry" : "重试",
"range" : "范围",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6065c3f

Please sign in to comment.