Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[DDW-1042]: Implement network splash screen (#1655)
* [DDW-1042]: Initial Network splash screen component * [DDW-1042]: Implement network splash screen * [DDW-1042]: Add network splash screen story * [DDW-1042]: Add network splash screen japanese translations * [DDW-1042]: Fix fonts on network splash screen * [DDW-1042]: Fix network splash screen story * [DDW-1042] Adds CHANGELOG entry * [DDW-1042]: Fix splash variable name and function call hander * [DDW-1042]: Hide network splash in test env * [DDW-1042]: Apply max height limitation on network splash description * [DDW-1042]: Update theme variables on network splash screen
- Loading branch information
1 parent
0b3ad51
commit 3dde29b
Showing
28 changed files
with
767 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
source/renderer/app/assets/images/splash-network-bg-faded.inline.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,101 @@ | |||
// @flow | |||
import React, { Component } from 'react'; | |||
import { defineMessages, intlShape, FormattedHTMLMessage } from 'react-intl'; | |||
import SVGInline from 'react-svg-inline'; | |||
import { Button } from 'react-polymorph/lib/components/Button'; | |||
import { ButtonSkin } from 'react-polymorph/lib/skins/simple/ButtonSkin'; | |||
import backgroundImage from '../../assets/images/splash-network-bg-faded.inline.svg'; | |||
import daedalusIcon from '../../assets/images/daedalus-logo-loading-grey.inline.svg'; | |||
import externalLinkIcon from '../../assets/images/link-ic.inline.svg'; | |||
import styles from './Network.scss'; | |||
|
|||
const messages = defineMessages({ | |||
title: { | |||
id: 'static.splash.network.title', | |||
defaultMessage: '!!!Daedalus', | |||
description: 'Daedalus', | |||
}, | |||
incentivizedTestnet: { | |||
id: 'static.splash.network.incentivizedTestnet', | |||
defaultMessage: '!!!Incentivized Testnet', | |||
description: 'Incentivized Testnet', | |||
}, | |||
balanceCheck: { | |||
id: 'static.splash.network.balanceCheck', | |||
defaultMessage: '!!!Balance Check', | |||
description: 'Balance Check', | |||
}, | |||
incentivizedTestnetDescription: { | |||
id: 'static.splash.network.incentivizedTestnetDescription', | |||
defaultMessage: | |||
'!!!This version of Daedalus has been created specifically for the balance check, the first stage in the roll-out of the Incentivized Testnet. It is not compatible with the Cardano mainnet. The balance check is a practice run for the official balance snapshot that is currently planned for later in November. This initial test will allow us to test core functionality, while enabling users to validate that the value of their mainnet ada balances is accurately captured ahead of the Incentivized Testnet.', | |||
description: | |||
'This version of Daedalus has been created specifically for the balance check, the first stage in the roll-out of the Incentivized Testnet. It is not compatible with the Cardano mainnet. The balance check is a practice run for the official balance snapshot that is currently planned for later in November. This initial test will allow us to test core functionality, while enabling users to validate that the value of their mainnet ada balances is accurately captured ahead of the Incentivized Testnet.', | |||
}, | |||
actionLabel: { | |||
id: 'static.splash.network.actionLabel', | |||
defaultMessage: '!!!I understand', | |||
description: 'I understand', | |||
}, | |||
learnMore: { | |||
id: 'static.splash.network.learnMore', | |||
defaultMessage: '!!!Learn more', | |||
description: 'Learn more', | |||
}, | |||
}); | |||
|
|||
type Props = { | |||
isIncentivizedTestnet: boolean, | |||
onClose: Function, | |||
onLearnMoreClick: Function, | |||
}; | |||
|
|||
export default class SplashNetwork extends Component<Props> { | |||
static contextTypes = { | |||
intl: intlShape.isRequired, | |||
}; | |||
|
|||
render() { | |||
const { intl } = this.context; | |||
const { isIncentivizedTestnet, onClose, onLearnMoreClick } = this.props; | |||
const title = intl.formatMessage(messages.title); | |||
const subTitle1 = intl.formatMessage(messages.incentivizedTestnet); | |||
const subTitle2 = intl.formatMessage(messages.balanceCheck); | |||
const description = ( | |||
<FormattedHTMLMessage {...messages.incentivizedTestnetDescription} /> | |||
); | |||
const actionLabel = intl.formatMessage(messages.actionLabel); | |||
|
|||
return ( | |||
<div className={styles.component}> | |||
<div className={styles.backgroundContainer}> | |||
{isIncentivizedTestnet && ( | |||
<> | |||
<div className={styles.backgroundOverlay} /> | |||
<SVGInline | |||
svg={backgroundImage} | |||
className={styles.backgroundImage} | |||
/> | |||
</> | |||
)} | |||
</div> | |||
<div className={styles.content}> | |||
<SVGInline svg={daedalusIcon} className={styles.daedalusIcon} /> | |||
<div className={styles.title}>{title}</div> | |||
<div className={styles.subTitle1}>{subTitle1}</div> | |||
<div className={styles.subTitle2}>{subTitle2}</div> | |||
<div className={styles.description}>{description}</div> | |||
<div className={styles.action}> | |||
<Button label={actionLabel} onClick={onClose} skin={ButtonSkin} /> | |||
</div> | |||
<div className={styles.learnMore}> | |||
<button onClick={onLearnMoreClick}> | |||
{intl.formatMessage(messages.learnMore)} | |||
<SVGInline svg={externalLinkIcon} /> | |||
</button> | |||
</div> | |||
</div> | |||
</div> | |||
); | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,169 @@ | |||
@import '../../themes/mixins/link'; | |||
|
|||
.component { | |||
height: 100%; | |||
padding: 16px; | |||
position: relative; | |||
width: 100%; | |||
|
|||
.backgroundContainer { | |||
background-color: var(--theme-splash-network-background-color); | |||
height: 100%; | |||
left: 0; | |||
object-fit: contain; | |||
overflow: hidden; | |||
position: absolute; | |||
top: 0; | |||
width: 100%; | |||
z-index: 1000; | |||
|
|||
.backgroundOverlay { | |||
background-image: linear-gradient( | |||
0deg, | |||
var(--theme-splash-network-background-color1) 0%, | |||
var(--theme-splash-network-background-color2) 10%, | |||
var(--theme-splash-network-background-color3) 16%, | |||
var(--theme-splash-network-background-color4) 20%, | |||
var(--theme-splash-network-background-color5) 80%, | |||
var(--theme-splash-network-background-color6) 84%, | |||
var(--theme-splash-network-background-color7) 90%, | |||
var(--theme-splash-network-background-color8) 100% | |||
); | |||
height: 100%; | |||
position: absolute; | |||
width: 100%; | |||
z-index: 1500; | |||
} | |||
|
|||
.backgroundImage { | |||
display: block; | |||
height: 100%; | |||
opacity: 0.1; | |||
position: relative; | |||
width: 100%; | |||
|
|||
& > svg { | |||
display: block; | |||
left: 50%; | |||
position: absolute; | |||
top: 50%; | |||
transform: translate(-50%, -50%); | |||
width: 1186px; | |||
} | |||
} | |||
} | |||
|
|||
.content { | |||
align-items: center; | |||
display: flex; | |||
flex-direction: column; | |||
font-family: var(--font-regular); | |||
height: 100%; | |||
justify-content: center; | |||
left: 0; | |||
position: absolute; | |||
top: 0; | |||
width: 100%; | |||
z-index: 2000; | |||
|
|||
.daedalusIcon { | |||
height: 135px; | |||
object-fit: contain; | |||
width: 173px; | |||
|
|||
svg { | |||
path { | |||
fill: var(--theme-splash-network-logo-fill-color); | |||
} | |||
} | |||
} | |||
.title { | |||
color: var(--theme-splash-network-title-color); | |||
font-size: 20px; | |||
font-weight: 600; | |||
line-height: 1.2; | |||
letter-spacing: 1px; | |||
margin-bottom: 5px; | |||
margin-top: 30px; | |||
text-transform: uppercase; | |||
} | |||
.subTitle1 { | |||
color: var(--theme-splash-network-subTitle1-color); | |||
font-size: 20px; | |||
font-weight: 600; | |||
letter-spacing: 1px; | |||
line-height: 1.2; | |||
margin-bottom: 5px; | |||
text-transform: uppercase; | |||
} | |||
.subTitle2 { | |||
color: var(--theme-splash-network-subTitle2-color); | |||
font-size: 16px; | |||
font-weight: 600; | |||
letter-spacing: 0.8px; | |||
line-height: 1.38; | |||
margin-bottom: 20px; | |||
text-transform: uppercase; | |||
} | |||
.description { | |||
background-color: var( | |||
--theme-splash-network-description-background-color | |||
); | |||
border-radius: 4px; | |||
color: var(--theme-splash-network-description-color); | |||
font-size: 14px; | |||
line-height: 1.43; | |||
margin-bottom: 30px; | |||
max-height: 190px; | |||
max-width: 608px; | |||
overflow-y: scroll; | |||
padding: 12px 24px; | |||
|
|||
p { | |||
margin-bottom: 12px; | |||
|
|||
&:last-child { | |||
margin-bottom: 0; | |||
} | |||
} | |||
} | |||
.action { | |||
button { | |||
min-height: 50px; | |||
} | |||
} | |||
.learnMore { | |||
margin-top: 20px; | |||
|
|||
button { | |||
align-items: center; | |||
border-bottom: 1px solid var(--theme-splash-network-learn-more-color); | |||
color: var(--theme-splash-network-learn-more-color); | |||
cursor: pointer; | |||
display: flex; | |||
font-size: 14px; | |||
line-height: 1.36; | |||
opacity: 0.8; | |||
padding-bottom: 1px; | |||
|
|||
:global { | |||
.SVGInline { | |||
height: 15px; | |||
} | |||
} | |||
|
|||
svg { | |||
height: 13px; | |||
margin-left: 2px; | |||
object-fit: contain; | |||
width: 13px; | |||
|
|||
& > g { | |||
fill: transparent; | |||
stroke: var(--theme-splash-network-learn-more-color); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.