Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[DDW-857] Initial setup
  • Loading branch information
renanvalentin committed Jan 13, 2022
1 parent 66f9ea0 commit 0a357d0
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 54 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/chromatic.yml
@@ -0,0 +1,29 @@
name: 'Chromatic'
on: push
jobs:
chromatic-deployment:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install dependencies
uses: actions/setup-node@v2
with:
node-version: "14"
run: yarn install
- name: Publish to Chromatic
if: github.ref != 'refs/heads/develop'
uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
exitZeroOnChanges: true
- name: Publish to Chromatic and auto accept changes
if: github.ref == 'refs/heads/develop'
uses: chromaui/action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
autoAcceptChanges: true
Expand Up @@ -11,14 +11,14 @@ import Dialog from '../../widgets/Dialog';
import iconCopy from '../../../assets/images/clipboard-ic.inline.svg';
import styles from './PublicKeyQRCodeDialog.scss';
import globalMessages from '../../../i18n/global-messages';
import type { ReactIntlMessage } from '../../../types/i18nTypes';

import { messages } from './ICOPublicKeyQRCodeDialog.messages';

type Props = {
walletName: string,
walletPublicKey: string,
onCopyWalletPublicKey: Function,
onClose: Function,
messages: { [string]: ReactIntlMessage },
derivationPath: string,
intl: intlShape.isRequired,
};
Expand All @@ -29,7 +29,6 @@ const ICOPublicKeyQRCodeDialog = observer((props: Props) => {
walletPublicKey,
onCopyWalletPublicKey,
onClose,
messages,
derivationPath,
intl,
} = props;
Expand Down
@@ -0,0 +1,23 @@
// @flow
import { defineMessages } from 'react-intl';
import type { ReactIntlMessage } from '../../../types/i18nTypes';

export const messages: {
[string]: ReactIntlMessage,
} = defineMessages({
dialogTitle: {
id: 'wallet.settings.icoPublicKey',
defaultMessage: '!!!ICO Public Key',
description: 'Title for the "ICO Public Key QR Code" dialog.',
},
copyPublicKeyLabel: {
id: 'wallet.settings.copyICOPublicKey',
defaultMessage: '!!!Copy ICO public key',
description: 'Copy ICO public key label.',
},
derivationPathTooltip: {
id: 'wallet.settings.dialog.derivationPathTooltip',
defaultMessage: '!!!Derivation path',
description: 'Tooltip for the derivation path',
},
});
Expand Up @@ -33,26 +33,6 @@ const walletMessages: {
},
});

const icoMessages: {
[string]: ReactIntlMessage,
} = defineMessages({
dialogTitle: {
id: 'wallet.settings.icoPublicKey',
defaultMessage: '!!!ICO Public Key',
description: 'Title for the "ICO Public Key QR Code" dialog.',
},
copyPublicKeyLabel: {
id: 'wallet.settings.copyICOPublicKey',
defaultMessage: '!!!Copy ICO public key',
description: 'Copy ICO public key label.',
},
derivationPathTooltip: {
id: 'wallet.settings.dialog.derivationPathTooltip',
defaultMessage: '!!!Derivation path',
description: 'Tooltip for the derivation path',
},
});

type Props = InjectedProps;

@inject('actions', 'stores')
Expand Down Expand Up @@ -107,7 +87,6 @@ export default class PublicKeyQRCodeDialogContainer extends Component<Props> {
onClose={() => {
actions.dialogs.closeActiveDialog.trigger();
}}
messages={icoMessages}
derivationPath={ICO_PUBLIC_KEY_DERIVATION_PATH}
/>
);
Expand Down
79 changes: 49 additions & 30 deletions source/renderer/app/i18n/locales/defaultMessages.json
Expand Up @@ -11714,6 +11714,53 @@
],
"path": "source/renderer/app/components/wallet/settings/ICOPublicKeyDialog.json"
},
{
"descriptors": [
{
"defaultMessage": "!!!ICO Public Key",
"description": "Title for the \"ICO Public Key QR Code\" dialog.",
"end": {
"column": 3,
"line": 12
},
"file": "source/renderer/app/components/wallet/settings/ICOPublicKeyQRCodeDialog.messages.js",
"id": "wallet.settings.icoPublicKey",
"start": {
"column": 15,
"line": 8
}
},
{
"defaultMessage": "!!!Copy ICO public key",
"description": "Copy ICO public key label.",
"end": {
"column": 3,
"line": 17
},
"file": "source/renderer/app/components/wallet/settings/ICOPublicKeyQRCodeDialog.messages.js",
"id": "wallet.settings.copyICOPublicKey",
"start": {
"column": 22,
"line": 13
}
},
{
"defaultMessage": "!!!Derivation path",
"description": "Tooltip for the derivation path",
"end": {
"column": 3,
"line": 22
},
"file": "source/renderer/app/components/wallet/settings/ICOPublicKeyQRCodeDialog.messages.js",
"id": "wallet.settings.dialog.derivationPathTooltip",
"start": {
"column": 25,
"line": 18
}
}
],
"path": "source/renderer/app/components/wallet/settings/ICOPublicKeyQRCodeDialog.messages.json"
},
{
"descriptors": [
{
Expand Down Expand Up @@ -17524,41 +17571,13 @@
"description": "Tooltip for the derivation path",
"end": {
"column": 3,
"line": 53
"line": 33
},
"file": "source/renderer/app/containers/wallet/dialogs/settings/PublicKeyQRCodeDialogContainer.js",
"id": "wallet.settings.dialog.derivationPathTooltip",
"start": {
"column": 25,
"line": 49
}
},
{
"defaultMessage": "!!!ICO Public Key",
"description": "Title for the \"ICO Public Key QR Code\" dialog.",
"end": {
"column": 3,
"line": 43
},
"file": "source/renderer/app/containers/wallet/dialogs/settings/PublicKeyQRCodeDialogContainer.js",
"id": "wallet.settings.icoPublicKey",
"start": {
"column": 15,
"line": 39
}
},
{
"defaultMessage": "!!!Copy ICO public key",
"description": "Copy ICO public key label.",
"end": {
"column": 3,
"line": 48
},
"file": "source/renderer/app/containers/wallet/dialogs/settings/PublicKeyQRCodeDialogContainer.js",
"id": "wallet.settings.copyICOPublicKey",
"start": {
"column": 22,
"line": 44
"line": 29
}
}
],
Expand Down

0 comments on commit 0a357d0

Please sign in to comment.