Skip to content

Commit 2d3ed95

Browse files
committed
Merge branch 'develop' into feature/ddw-738-implement-discreet-mode
2 parents 601814b + 87feb8e commit 2d3ed95

File tree

6 files changed

+310
-82
lines changed

6 files changed

+310
-82
lines changed

CHANGELOG.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
- Added jest library for unit testing ([PR 2633](https://github.com/input-output-hk/daedalus/pull/2633))
88
- Updated `cardano-launcher` to version `0.20211105.1` and added Cardano Node RTS flags which improve resource usage ([PR 2735](https://github.com/input-output-hk/daedalus/pull/2735), [PR 2741](https://github.com/input-output-hk/daedalus/pull/2741))
99

10+
### Features
11+
12+
- Implemented "discreet mode" ([PR 2723](https://github.com/input-output-hk/daedalus/pull/2723), [PR 2724](https://github.com/input-output-hk/daedalus/pull/2724), [PR 2725](https://github.com/input-output-hk/daedalus/pull/2725), [PR 2742](https://github.com/input-output-hk/daedalus/pull/2742), [PR 2740](https://github.com/input-output-hk/daedalus/pull/2740), [PR 2756](https://github.com/input-output-hk/daedalus/pull/2756))
13+
- Updated slider component to only execute onAfterChange if slider had moved ([PR 2766](https://github.com/input-output-hk/daedalus/pull/2766))
14+
15+
### Fixes
16+
17+
- Fixed app update for specific platform ([PR 2759](https://github.com/input-output-hk/daedalus/pull/2759))
18+
1019
## 4.5.2
1120

1221
### Fixes
@@ -25,7 +34,6 @@
2534

2635
### Features
2736

28-
- Implemented "discreet mode" ([PR 2723](https://github.com/input-output-hk/daedalus/pull/2723), [PR 2724](https://github.com/input-output-hk/daedalus/pull/2724), [PR 2725](https://github.com/input-output-hk/daedalus/pull/2725), [PR 2742](https://github.com/input-output-hk/daedalus/pull/2742), [PR 2740](https://github.com/input-output-hk/daedalus/pull/2740), [PR 2756](https://github.com/input-output-hk/daedalus/pull/2756))
2937
- Implemented "Catalyst Fund7" voting registration changes ([PR 2732](https://github.com/input-output-hk/daedalus/pull/2732))
3038
- Added "Over-saturation" warning in the delegation wizard ([PR 2733](https://github.com/input-output-hk/daedalus/pull/2733), [PR 2738](https://github.com/input-output-hk/daedalus/pull/2738))
3139
- Added Catalyst footer links ([PR 2721](https://github.com/input-output-hk/daedalus/pull/2721))

source/renderer/app/components/staking/stake-pools/StakePoolsRanking.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import { withDiscreetMode } from '../../../features/discreet-mode';
3232
import type { DiscreetModeFeature } from '../../../features/discreet-mode';
3333
import WalletsDropdown from '../../widgets/forms/WalletsDropdown';
3434
import ButtonLink from '../../widgets/ButtonLink';
35-
import Slider from '../../widgets/Slider';
35+
import { Slider } from '../../widgets/Slider';
3636
import styles from './StakePoolsRanking.scss';
3737

3838
const messages = defineMessages({
Lines changed: 62 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// @flow
2-
import React, { Component } from 'react';
2+
import React, { useState } from 'react';
33
import { observer } from 'mobx-react';
44
import BigNumber from 'bignumber.js';
55
import RcSlider from 'rc-slider';
@@ -45,63 +45,69 @@ type Props = {
4545
ariaValueTextFormatterForHandle?: Function,
4646
};
4747

48-
@observer
49-
export default class Slider extends Component<Props> {
50-
static defaultProps = {
51-
min: 0,
52-
max: 100,
53-
value: 0,
54-
};
48+
export const Slider = observer((props: Props) => {
49+
const [initialValue, setInitialValue] = useState<number | null>(null);
50+
const {
51+
showTooltip,
52+
minTooltip,
53+
maxTooltip,
54+
minDisplayValue,
55+
maxDisplayValue,
56+
displayValue,
57+
showRawValue,
58+
...rest
59+
} = props;
60+
const { min, max, value } = rest;
5561

56-
render() {
57-
const {
58-
showTooltip,
59-
minTooltip,
60-
maxTooltip,
61-
minDisplayValue,
62-
maxDisplayValue,
63-
displayValue,
64-
showRawValue,
65-
...rest
66-
} = this.props;
67-
const { min, max, value } = rest;
62+
const valueMarkLeftPosition =
63+
max === min ? `0` : `${((value - min) / (max - min)) * 100}%`;
64+
const valueMarkStyle = { left: valueMarkLeftPosition };
65+
const formattedValue = showRawValue
66+
? displayValue || value
67+
: new BigNumber(value).toFormat(0);
6868

69-
const valueMarkLeftPosition =
70-
max === min ? `0` : `${((value - min) / (max - min)) * 100}%`;
71-
const valueMarkStyle = { left: valueMarkLeftPosition };
72-
const formattedValue = showRawValue
73-
? displayValue || value
74-
: new BigNumber(value).toFormat(0);
75-
76-
return (
77-
<div className={styles.component}>
78-
<div className={styles.upperMarks}>
79-
<div className={styles.minMark}>
80-
{showTooltip ? (
81-
<PopOver content={minTooltip}>
82-
{shortNumber(minDisplayValue || min)}
83-
</PopOver>
84-
) : (
85-
shortNumber(minDisplayValue || min)
86-
)}
87-
</div>
88-
<div className={styles.maxMark}>
89-
{showTooltip ? (
90-
<PopOver content={maxTooltip}>
91-
{shortNumber(maxDisplayValue || max)}
92-
</PopOver>
93-
) : (
94-
shortNumber(maxDisplayValue || max)
95-
)}
96-
</div>
69+
return (
70+
<div className={styles.component}>
71+
<div className={styles.upperMarks}>
72+
<div className={styles.minMark}>
73+
{showTooltip ? (
74+
<PopOver content={minTooltip}>
75+
{shortNumber(minDisplayValue || min)}
76+
</PopOver>
77+
) : (
78+
shortNumber(minDisplayValue || min)
79+
)}
80+
</div>
81+
<div className={styles.maxMark}>
82+
{showTooltip ? (
83+
<PopOver content={maxTooltip}>
84+
{shortNumber(maxDisplayValue || max)}
85+
</PopOver>
86+
) : (
87+
shortNumber(maxDisplayValue || max)
88+
)}
9789
</div>
98-
<RcSlider {...rest} />
99-
<div className={styles.lowerMarks}>
100-
<div className={styles.valueMark} style={valueMarkStyle}>
101-
{formattedValue}
102-
</div>
90+
</div>
91+
<RcSlider
92+
{...rest}
93+
onBeforeChange={(e: number) => {
94+
if (!initialValue) setInitialValue(e);
95+
}}
96+
onChange={(e: number) => {
97+
rest.onChange(e);
98+
}}
99+
onAfterChange={(e: number) => {
100+
if (e !== initialValue && !!rest.onAfterChange) {
101+
rest.onAfterChange(e);
102+
}
103+
setInitialValue(null);
104+
}}
105+
/>
106+
<div className={styles.lowerMarks}>
107+
<div className={styles.valueMark} style={valueMarkStyle}>
108+
{formattedValue}
103109
</div>
104110
</div>
105-
);
106-
}
107-
}
111+
</div>
112+
);
113+
});
Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
{
2+
"updatedAt": 1637233200000,
3+
"items": [
4+
{
5+
"title": {
6+
"en-US": "NEW Daedalus 5.1.0 update",
7+
"ja-JP": "最新更新版Daedalus 5.1.0配信"
8+
},
9+
"content": {
10+
"en-US": "Daedalus 5.1.0 for the Cardano mainnet has an improved voting screen layout, which now includes continuous registration for Catalyst projects and footer links. The update also adds a pool over-saturation warning.\n\nPlease read the [release notes](https://iohk.zendesk.com/hc/en-us/articles/4409360119449) for more information.",
11+
"ja-JP": "Cardanoメインネット用Daedalus 5.1.0は、投票画面のレイアウトを改良し、Catalystプロジェクトとフッターのリンクに継続登録を追加しました。この更新ではさらに、プールの過剰飽和警告も追加されました。\n\n詳細は[リリースノート](https://iohk.zendesk.com/hc/ja/articles/4409360119449)をご覧ください。"
12+
},
13+
"target": {
14+
"daedalusVersion": ">=2.3.0 <5.1.0",
15+
"platforms":["win32","darwin","linux"]
16+
},
17+
"action": {
18+
"label": {
19+
"en-US": "",
20+
"ja-JP": ""
21+
},
22+
"url": {
23+
"en-US": "",
24+
"ja-JP": ""
25+
}
26+
},
27+
"date": 1637233200000,
28+
"type": "software-update",
29+
"softwareUpdate": {
30+
"linux": {
31+
"version": "5.1.0",
32+
"hash": "611adbfe653ca8c559e3733559590851018d6914800ac3460854f457651e9c10",
33+
"url": "https://update-cardano-mainnet.iohk.io/daedalus-4.5.0-mainnet-19689.bin"
34+
},
35+
"darwin": {
36+
"version": "5.1.0",
37+
"hash": "2c2e7e46719cf56505a6acaaac8da80345cc3b9c16ed2129489f55dc3f4969e2",
38+
"url": "https://update-cardano-mainnet.iohk.io/daedalus-4.5.0-mainnet-19689.pkg"
39+
},
40+
"win32": {
41+
"version": "5.1.0",
42+
"hash": "2c2e7e46719cf56505a6acaaac8da80345cc3b9c16ed2129489f55dc3f4969e2",
43+
"url": "https://update-cardano-mainnet.iohk.io/daedalus-4.5.0-mainnet-19689.pkg"
44+
}
45+
}
46+
},
47+
{
48+
"title": {
49+
"en-US": "NEW Daedalus 5.1.1 update",
50+
"ja-JP": "最新更新版Daedalus 5.1.1配信"
51+
},
52+
"content": {
53+
"en-US": "Daedalus 5.1.1 for the Cardano mainnet has an improved voting screen layout, which now includes continuous registration for Catalyst projects and footer links. The update also adds a pool over-saturation warning.\n\nPlease read the [release notes](https://iohk.zendesk.com/hc/en-us/articles/4409360119449) for more information.",
54+
"ja-JP": "Cardanoメインネット用Daedalus 5.1.1は、投票画面のレイアウトを改良し、Catalystプロジェクトとフッターのリンクに継続登録を追加しました。この更新ではさらに、プールの過剰飽和警告も追加されました。\n\n詳細は[リリースノート](https://iohk.zendesk.com/hc/ja/articles/4409360119449)をご覧ください。"
55+
},
56+
"target": {
57+
"daedalusVersion": ">=5.1.0 <5.1.1",
58+
"platforms":["win32"]
59+
},
60+
"action": {
61+
"label": {
62+
"en-US": "",
63+
"ja-JP": ""
64+
},
65+
"url": {
66+
"en-US": "",
67+
"ja-JP": ""
68+
}
69+
},
70+
"date": 1637233200001,
71+
"type": "software-update",
72+
"softwareUpdate": {
73+
"win32": {
74+
"version": "5.1.1",
75+
"hash": "50af385a0c12f86fc812e08eda8741f4ccd32367ed421fcaf4cbcea2c57e1b4e",
76+
"url": "https://update-cardano-mainnet.iohk.io/daedalus-4.5.1-mainnet-19689.exe"
77+
}
78+
}
79+
},
80+
{
81+
"title": {
82+
"en-US": "Daedalus 5.1.0 - Release notes",
83+
"ja-JP": "Daedalus 5.1.0 - リリースノート"
84+
},
85+
"content": {
86+
"en-US": "Daedalus 5.1.0 for the Cardano mainnet has an improved voting screen layout, which now includes continuous registration for Catalyst projects and footer links. The update also adds a pool over-saturation warning.",
87+
"ja-JP": "Cardanoメインネット用Daedalus 5.1.0は、投票画面のレイアウトを改良し、Catalystプロジェクトとフッターのリンクに継続登録を追加しました。この更新ではさらに、プールの過剰飽和警告も追加されました。"
88+
},
89+
"target": {
90+
"daedalusVersion": "5.1.0",
91+
"platforms":["darwin","win32","linux"]
92+
},
93+
"action": {
94+
"label": {
95+
"en-US": "Release notes",
96+
"ja-JP": "リリースノート"
97+
},
98+
"url": {
99+
"en-US": "https://iohk.zendesk.com/hc/en-us/articles/4409360119449",
100+
"ja-JP": "https://iohk.zendesk.com/hc/ja/articles/4409360119449"
101+
}
102+
},
103+
"date": 1637233200000,
104+
"type": "announcement"
105+
},
106+
{
107+
"title": {
108+
"en-US": "Daedalus 5.1.1 - Release notes",
109+
"ja-JP": "Daedalus 5.1.1 - リリースノート"
110+
},
111+
"content": {
112+
"en-US": "Daedalus 5.1.1 for the Cardano mainnet has an improved voting screen layout, which now includes continuous registration for Catalyst projects and footer links. The update also adds a pool over-saturation warning.",
113+
"ja-JP": "Cardanoメインネット用Daedalus 5.1.1は、投票画面のレイアウトを改良し、Catalystプロジェクトとフッターのリンクに継続登録を追加しました。この更新ではさらに、プールの過剰飽和警告も追加されました。"
114+
},
115+
"target": {
116+
"daedalusVersion": "5.1.1",
117+
"platforms":["darwin","win32","linux"]
118+
},
119+
"action": {
120+
"label": {
121+
"en-US": "Release notes",
122+
"ja-JP": "リリースノート"
123+
},
124+
"url": {
125+
"en-US": "https://iohk.zendesk.com/hc/en-us/articles/4409360119449",
126+
"ja-JP": "https://iohk.zendesk.com/hc/ja/articles/4409360119449"
127+
}
128+
},
129+
"date": 1637233200001,
130+
"type": "announcement"
131+
},
132+
{
133+
"title": {
134+
"en-US": "Stay safe from scammers - some important advice",
135+
"ja-JP": "詐欺にご注意ください - 重要なアドバイス"
136+
},
137+
"content": {
138+
"en-US": "Read the post on how to stay safe and spot potential Daedalus and Cardano scams.",
139+
"ja-JP": "安全性に注意する方法、そして、DaedalusとCardanoの詐欺の可能性を見抜く方法についての記事をご覧ください。"
140+
},
141+
"target": {
142+
"daedalusVersion": ">=3.0.0",
143+
"platforms":["win32", "darwin", "linux"]
144+
},
145+
"action": {
146+
"label": {
147+
"en-US": "Read the post",
148+
"ja-JP": "記事を読む(英語のみ)"
149+
},
150+
"url": {
151+
"en-US": "https://www.reddit.com/r/cardano/comments/lccorg/psa_there_is_no_such_thing_as_cardano_giveaways/",
152+
"ja-JP": "https://www.reddit.com/r/cardano/comments/lccorg/psa_there_is_no_such_thing_as_cardano_giveaways/"
153+
}
154+
},
155+
"date": 1613757600000,
156+
"type": "announcement"
157+
},
158+
{
159+
"title": {
160+
"en-US": "Catalyst Fund6 Results and Feedback",
161+
"ja-JP": "Catalyst Fund6の結果とフィードバック"
162+
},
163+
"content": {
164+
"en-US": "Fund6 is now finished, congratulations to all who were successful. For more details, read the [funded proposal results](https://mailchi.mp/iohk/g6qpccne38-674338).\n\nWe would now like to invite you to complete the [Fund6 exit survey](https://forms.gle/7FYP2MRaGrVDAUh87). Please let us know what you felt went well, where we could improve, and share any other ideas with us.\n\nHelp us understand where we should focus our attention and how to prioritize our future actions. We value your feedback.\n\nThank you for taking the time to improve the governance processes for Cardano.",
165+
"ja-JP": "Fund6は終了しました。良い結果を得た皆様、おめでとうございます。詳細は、[資金調達対象となる提案の結果](https://mailchi.mp/iohk/g6qpccne38-674338)をご覧ください。\n\n皆様には、[Fund6に関するアンケート](https://forms.gle/7FYP2MRaGrVDAUh87)へのご協力をお願いいたします。良かった点、改善すべき点、その他ご意見をお聞かせください。\n\n皆様からの貴重なご意見は、どこに焦点を置くべきか、今後のアクションの優先順位についての理解を深める助けとなります。\n\nCardanoガバナンスプロセスの向上にお時間をいただき、ありがとうございます。"
166+
},
167+
"target": {
168+
"daedalusVersion": ">=4.4.0",
169+
"platforms":["win32", "darwin", "linux"]
170+
},
171+
"action": {
172+
"label": {
173+
"en-US": "Fund6 Feedback Form",
174+
"ja-JP": "Fund6フィードバックフォーム"
175+
},
176+
"url": {
177+
"en-US": "https://forms.gle/7FYP2MRaGrVDAUh87",
178+
"ja-JP": "https://forms.gle/7FYP2MRaGrVDAUh87"
179+
}
180+
},
181+
"date": 1636383600000,
182+
"type": "announcement"
183+
}
184+
]
185+
}

0 commit comments

Comments
 (0)