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

feat: change iota icon in ledger tips #7615

Merged
merged 4 commits into from
Nov 2, 2023
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
18 changes: 16 additions & 2 deletions packages/desktop/components/popups/LedgerAppGuidePopup.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import { LedgerAppName, ledgerAppName } from '@core/ledger'
import { localize } from '@core/i18n'
import { IllustrationEnum } from '@auxiliary/illustration'
import { Icon } from '@auxiliary/icon'

let stepIndex = 0
const stepAnimations = [
const stepIlustrations = [
IllustrationEnum.LedgerLiveUpdatedDesktop,
IllustrationEnum.LedgerConnected2Desktop,
$ledgerAppName === LedgerAppName.Shimmer
Expand All @@ -16,6 +17,14 @@
IllustrationEnum.LedgerCloseLiveDesktop,
]

const stepIconWithIlustrations = [
undefined,
undefined,
undefined,
$ledgerAppName === LedgerAppName.Shimmer ? Icon.Shimmer : Icon.Iota,
undefined,
]

function changeIndex(increment: number): void {
stepIndex += increment
}
Expand All @@ -29,7 +38,12 @@
{localize('popups.ledgerAppGuide.title', { values: { legacy: $ledgerAppName } })}
</Text>
<div class="w-full flex flex-row flex-wrap">
<LedgerAnimation illustration={stepAnimations[stepIndex]} classes="illustration-wrapper" bgClasses="top-6" />
<LedgerAnimation
illustration={stepIlustrations[stepIndex]}
iconNetwork={stepIconWithIlustrations[stepIndex]}
classes="illustration-wrapper"
bgClasses="top-6"
/>
<div class="w-full text-center my-9 px-10">
<Text secondary>
{localize(`popups.ledgerAppGuide.steps.${stepIndex}`, { values: { legacy: $ledgerAppName } })}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,24 @@
import { closePopup } from '@auxiliary/popup'
import { localize } from '@core/i18n'
import { IllustrationEnum } from '@auxiliary/illustration'
import { ledgerAppName } from '@core/ledger'
import { LedgerAppName, ledgerAppName } from '@core/ledger'
import { Icon } from '@auxiliary/icon'

let stepIndex = 0
const stepAnimations = [
const stepIllustrations = [
IllustrationEnum.LedgerBackgroundLiveDesktop,
IllustrationEnum.LedgerPinDesktop,
IllustrationEnum.LedgerOpenAppDesktop,
IllustrationEnum.LedgerSupport,
]

const stepIconWithIlustrations = [
undefined,
undefined,
$ledgerAppName === LedgerAppName.Shimmer ? Icon.Shimmer : Icon.Iota,
undefined,
]

function changeIndex(increment: number): void {
stepIndex += increment
}
Expand All @@ -25,7 +33,12 @@

<Text type={TextType.h4} classes="mb-6">{localize('popups.ledgerConnectionGuide.title')}</Text>
<div class="w-full flex flex-row flex-wrap relative z-0">
<LedgerAnimation illustration={stepAnimations[stepIndex]} classes="illustration-wrapper" bgClasses="top-7" />
<LedgerAnimation
illustration={stepIllustrations[stepIndex]}
iconNetwork={stepIconWithIlustrations[stepIndex]}
classes="illustration-wrapper"
bgClasses="top-7"
/>
<div class="w-full text-center my-9 px-10 z-10">
{#if typeof localize(`popups.ledgerConnectionGuide.steps.${stepIndex}`) === 'string'}
<Text secondary classes="inline-block"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading