Skip to content
Permalink
Browse files

Merge branch 'develop' into chore/ddw-656-log-daedalus-state-snapshot

  • Loading branch information...
DeeJayElly committed Jul 11, 2019
2 parents 59b983c + 06c7b3a commit cff9d70d56716d534aa10227227178ff0186bbe1
@@ -5,6 +5,7 @@ Changelog

### Features

- Implemented the animated Daedalus logo on the "Loading" screens ([PR 1457](https://github.com/input-output-hk/daedalus/pull/1457))
- Implemented "Delegation Setup wizard" steps 3 & 4 UI ([PR 1439](https://github.com/input-output-hk/daedalus/pull/1439))
- Improved "Connectivity/Sync trouble notification" ([PR 1453](https://github.com/input-output-hk/daedalus/pull/1453))
- Implemented "Delegation Setup wizard" step 2 UI ([PR 1430](https://github.com/input-output-hk/daedalus/pull/1430))
@@ -52,6 +53,8 @@ Changelog

### Chores

- Improved the "Ada redemption" menu item UX by disabling the option while Daedalus is out of sync ([PR 1458](https://github.com/input-output-hk/daedalus/pull/1458))
- Added `themes:check` script for checking missing definitions on createTheme object ([PR 1424](https://github.com/input-output-hk/daedalus/pull/1424))
- Refactored the Loading screen, adding containers for each overlay ([PR 1446](https://github.com/input-output-hk/daedalus/pull/1446))
- Added button to open local state directory on Daedalus Diagnostics Screen ([PR 1438](https://github.com/input-output-hk/daedalus/pull/1438))
- Updated the list of contributors on the "About" screen ([PR 1450](https://github.com/input-output-hk/daedalus/pull/1450))
@@ -3,6 +3,7 @@ const webpack = require('webpack');
const webpackStream = require('webpack-stream');
const shell = require('gulp-shell');
const electronConnect = require('electron-connect');
const flowRemoveTypes = require('gulp-flow-remove-types');
const mainWebpackConfig = require('./source/main/webpack.config');
const rendererWebpackConfig = require('./source/renderer/webpack.config');

@@ -113,6 +114,30 @@ gulp.task('build:renderer:watch', buildRendererWatch());

gulp.task('build', gulp.series('clean:dist', 'build:main', 'build:renderer'));

gulp.task('prepare:themes:utils', () =>
gulp
.src([
'source/renderer/app/themes/utils/checkCreateTheme.js',
'source/renderer/app/themes/utils/constants.js',
'source/renderer/app/themes/utils/createTheme.js',
'source/renderer/app/themes/utils/createShades.js',
'source/renderer/app/themes/utils/index.js',
])
.pipe(flowRemoveTypes())
.pipe(gulp.dest('dist/utils'))
);

gulp.task('prepare:themes:daedalus', () =>
gulp
.src([
'source/renderer/app/themes/daedalus/cardano.js',
'source/renderer/app/themes/daedalus/dark-blue.js',
'source/renderer/app/themes/daedalus/light-blue.js',
])
.pipe(flowRemoveTypes())
.pipe(gulp.dest('dist/daedalus'))
);

gulp.task(
'build:watch',
gulp.series(
@@ -124,6 +149,11 @@ gulp.task(
)
);

gulp.task(
'build:themes',
gulp.series('clean:dist', 'prepare:themes:utils', 'prepare:themes:daedalus')
);

gulp.task(
'test:e2e:nodemon',
shell.task(
@@ -28,6 +28,7 @@
"manage:translations": "gulp purge:translations && gulp clear:cache && gulp build && node ./translations/translation-runner.js",
"storybook": "start-storybook -p 6006 -c storybook",
"storybook:build": "build-storybook -c storybook -o dist/storybook",
"themes:check": "gulp build:themes && node -r esm ./dist/utils/index.js",
"clear:cache": "gulp clear:cache",
"nix:dev": "nix-shell --arg autoStartBackend true --arg allowFaultInjection true --arg systemStart",
"nix:staging": "nix-shell --arg autoStartBackend true --argstr cluster staging"
@@ -61,6 +62,7 @@
"bufferutil": "4.0.0",
"cache-loader": "2.0.1",
"chai": "4.2.0",
"chalk": "2.4.2",
"concurrently": "4.1.0",
"cross-env": "5.2.0",
"css-loader": "2.0.1",
@@ -85,9 +87,11 @@
"eslint-plugin-jsx-a11y": "6.1.2",
"eslint-plugin-promise": "4.0.1",
"eslint-plugin-react": "7.11.1",
"esm": "3.2.25",
"faker": "4.1.0",
"file-loader": "2.0.0",
"flow-bin": "0.98.1",
"gulp-flow-remove-types": "1.0.0",
"gulp-shell": "0.6.5",
"hash.js": "1.1.7",
"html-loader": "0.5.5",
@@ -162,6 +166,7 @@
"react-dom": "16.6.3",
"react-dropzone": "4.2.3",
"react-intl": "2.7.2",
"react-lottie": "1.2.3",
"react-markdown": "3.1.0",
"react-number-format": "3.0.3",
"react-polymorph": "0.8.7",
@@ -20,6 +20,7 @@ export const osxMenu = (
actions: MenuActions,
translations: {},
supportRequestData: SupportRequests,
isNodeInSync: boolean,
translation: Function = getTranslation(translations, id)
) => [
{
@@ -33,6 +34,7 @@ export const osxMenu = (
},
{
label: translation('daedalus.adaRedemption'),
enabled: isNodeInSync,
click() {
actions.openAdaRedemptionScreen();
},
@@ -20,6 +20,7 @@ export const winLinuxMenu = (
actions: MenuActions,
translations: {},
supportRequestData: SupportRequests,
isNodeInSync: boolean,
translation: Function = getTranslation(translations, id)
) => [
{
@@ -33,6 +34,7 @@ export const winLinuxMenu = (
},
{
label: translation('daedalus.adaRedemption'),
enabled: isNodeInSync,
click() {
actions.openAdaRedemptionScreen();
},
@@ -1,5 +1,6 @@
// @flow
import { app, globalShortcut, Menu, BrowserWindow } from 'electron';
import { get } from 'lodash';
import { environment } from '../environment';
import { winLinuxMenu } from '../menus/win-linux';
import { osxMenu } from '../menus/osx';
@@ -92,9 +93,17 @@ export const buildAppMenus = async (

// Build app menus
let menu;
const isNodeInSync = get(cardanoNode, 'status.isNodeInSync', false);
if (isMacOS) {
menu = Menu.buildFromTemplate(
osxMenu(app, mainWindow, menuActions, translations, supportRequestData)
osxMenu(
app,
mainWindow,
menuActions,
translations,
supportRequestData,
isNodeInSync
)
);
Menu.setApplicationMenu(menu);
} else {
@@ -104,7 +113,8 @@ export const buildAppMenus = async (
mainWindow,
menuActions,
translations,
supportRequestData
supportRequestData,
isNodeInSync
)
);
mainWindow.setMenu(menu);
@@ -1,37 +1,58 @@
// @flow
import React from 'react';
import React, { Component } from 'react';
import SVGInline from 'react-svg-inline';
import classNames from 'classnames';
import Lottie from 'react-lottie';
import styles from './LogosDisplay.scss';
import adaLogo from '../../../assets/images/ada-logo.inline.svg';
import daedalusLogo from '../../../assets/images/daedalus-logo-loading-grey.inline.svg';
import cardanoLogo from '../../../assets/images/cardano-logo.inline.svg';
import animationData from './logo-animation-data.json';

type Props = {
isConnected: boolean,
};

const LogosDisplay = ({ isConnected }: Props) => {
const currencyLogoStyles = classNames([
styles['ada-logo'],
!isConnected ? styles.connectingLogo : styles.syncingLogo,
]);
const daedalusLogoStyles = classNames([
styles.daedalusLogo,
!isConnected ? styles.connectingLogo : styles.syncingLogo,
]);
const apiLogoStyles = classNames([
styles['ada-apiLogo'],
!isConnected ? styles.connectingLogo : styles.syncingLogo,
]);

return (
<div className={styles.component}>
<SVGInline svg={adaLogo} className={currencyLogoStyles} />
<SVGInline svg={daedalusLogo} className={daedalusLogoStyles} />
<SVGInline svg={cardanoLogo} className={apiLogoStyles} />
</div>
);
const logoAnimationOptionsLottie = {
loop: true,
autoplay: true,
animationData,
rendererSettings: {
preserveAspectRatio: 'xMidYMid slice',
},
};

export default LogosDisplay;
export default class LogosDisplay extends Component<Props> {
componentDidMount() {
// Manual adjustment due to `logo-animation-data.json` canvas size
const svg: Object = document.querySelector(
'.LogosDisplay_daedalusLogo svg'
);
svg.setAttribute('viewBox', '534 250 212 220');
}

render() {
const { isConnected } = this.props;
const currencyLogoStyles = classNames([
styles['ada-logo'],
!isConnected ? styles.connectingLogo : styles.syncingLogo,
]);
const daedalusLogoStyles = classNames([
styles.daedalusLogo,
!isConnected ? styles.connectingLogo : styles.syncingLogo,
]);
const apiLogoStyles = classNames([
styles['ada-apiLogo'],
!isConnected ? styles.connectingLogo : styles.syncingLogo,
]);

return (
<div className={styles.component}>
<SVGInline svg={adaLogo} className={currencyLogoStyles} />
<div className={daedalusLogoStyles}>
<Lottie options={logoAnimationOptionsLottie} />
</div>
<SVGInline svg={cardanoLogo} className={apiLogoStyles} />
</div>
);
}
}
@@ -27,19 +27,21 @@ $adaLogoWidth: 43px;
}

.daedalusLogo {
& > svg {
display: block;
width: 173px;
height: 135px;
margin: 0 114px;
svg {
width: 173px;
margin: 0 114px;
height: 135px;
}
}

.connectingLogo {
& > svg path {
& svg > g > g path {
fill: var(--theme-icon-connecting-logo-color);
}
}

.syncingLogo svg path {
.syncingLogo svg > g > g path {
fill: var(--theme-icon-syncing-logo-color);
}

0 comments on commit cff9d70

Please sign in to comment.
You can’t perform that action at this time.