Skip to content

Commit

Permalink
Merge branch 'develop' into chore/ddw-656-log-daedalus-state-snapshot
Browse files Browse the repository at this point in the history
# Conflicts:
#	source/main/menus/osx.js
#	source/main/menus/win-linux.js
  • Loading branch information
DeeJayElly committed Jul 11, 2019
2 parents d9648c1 + ff9816c commit 55d2407
Show file tree
Hide file tree
Showing 56 changed files with 812 additions and 532 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -34,6 +34,8 @@ Changelog

### Fixes

- Fixed Staking screen ([PR 1461](https://github.com/input-output-hk/daedalus/pull/1461))
- Improved small UI and copy elements ([PR 1459](https://github.com/input-output-hk/daedalus/pull/1459))
- Fixed shutting down screen top priority ([PR 1428](https://github.com/input-output-hk/daedalus/pull/1428))
- Fixed screen flashes during Daedalus loading ([PR 1444](https://github.com/input-output-hk/daedalus/pull/1444))
- Removes files pushed without running Prettier ([PR 1445](https://github.com/input-output-hk/daedalus/pull/1445))
Expand Down
37 changes: 20 additions & 17 deletions source/main/locales/en-US.json
Expand Up @@ -2,35 +2,38 @@
"menu.daedalus": "Daedalus",
"menu.daedalus.about": "About Daedalus",
"menu.daedalus.adaRedemption": "Ada Redemption",
"menu.daedalus.daedalusDiagnostics": "Daedalus Diagnostics",
"menu.daedalus.blockConsolidationStatus": "Block Consolidation Status",
"menu.daedalus.quit": "Quit",
"menu.daedalus.hideDaedalus": "Hide Daedalus",
"menu.daedalus.hideOthers": "Hide Others",
"menu.daedalus.showAll": "Show All",
"menu.daedalus.close": "Close",
"menu.daedalus.quit": "Quit",
"menu.edit": "Edit",
"menu.edit.undo": "Undo",
"menu.edit.redo": "Redo",
"menu.edit.cut": "Cut",
"menu.edit.copy": "Copy",
"menu.edit.cut": "Cut",
"menu.edit.paste": "Paste",
"menu.edit.redo": "Redo",
"menu.edit.selectAll": "Select All",
"menu.helpSupport": "Help and Support",
"menu.helpSupport.gpuSafeMode": "GPU Safe Mode",
"menu.helpSupport.gpuSafeModeDialogTitle": "Turn off 'GPU safe mode'?",
"menu.helpSupport.nonGpuSafeModeDialogTitle": "Turn on 'GPU safe mode'?",
"menu.helpSupport.gpuSafeModeDialogMessage": "Turn off 'GPU safe mode'? \n \nYou are about to disable 'GPU safe mode' which will improve the performance of user interface rendering. \n \nClick on 'Yes' to restart Daedalus with 'GPU safe mode' disabled. \n \n If you see a blank screen instead of Daedalus user interface after Daedalus restarts, please turn 'GPU safe mode' back on.",
"menu.helpSupport.nonGpuSafeModeDialogMessage": "Turn on 'GPU safe mode'? \n \nYou are about to enable 'GPU safe mode' which will reduce the performance of user interface rendering. \n \nYou should enable this only if you are seeing a blank screen instead of Daedalus user interface. If Daedalus is working properly for you, please click the 'No'. Otherwise, click 'Yes' to restart Daedalus with 'GPU safe mode' enabled.",
"menu.edit.undo": "Undo",
"menu.helpSupport": "Help",
"menu.helpSupport.blockConsolidationStatus": "Block Consolidation Status",
"menu.helpSupport.daedalusDiagnostics": "Daedalus Diagnostics",
"menu.helpSupport.downloadLogs": "Download Logs",
"menu.helpSupport.blankScreenFix": "Blank Screen Fix",
"menu.helpSupport.gpuSafeModeDialogCancel": "Cancel",
"menu.helpSupport.gpuSafeModeDialogConfirm": "Yes",
"menu.helpSupport.gpuSafeModeDialogMessage": "Turn off 'Blank screen fix'? \n \nDisabling the blank screen fix setting will improve the performance of user interface rendering by enabling graphics acceleration, however, some users may find that Daedalus runs better with this setting enabled. If you see a blank screen instead of the Daedalus user interface after disabling this setting and restarting Daedalus, please turn this setting back on. \n \nDo you want to disable this setting and restart Daedalus?",
"menu.helpSupport.gpuSafeModeDialogNo": "No",
"menu.helpSupport.gpuSafeModeDialogCancel": "Cancel",
"menu.helpSupport.downloadLogs": "Download Logs",
"menu.helpSupport.supportRequest": "Support Request",
"menu.helpSupport.supportRequestUrl": "https://iohk.zendesk.com/hc/en-us/requests/new/",
"menu.helpSupport.gpuSafeModeDialogTitle": "Turn off 'Blank screen fix'?",
"menu.helpSupport.knownIssues": "Known Issues",
"menu.helpSupport.knownIssuesUrl": "https://daedaluswallet.io/known-issues/",
"menu.helpSupport.nonGpuSafeModeDialogMessage": "Turn on 'Blank screen fix'? \n \nIf the Daedalus user interface is failing to load then enabling this setting may fix the problem. It will reduce the performance of user interface rendering by disabling graphics acceleration, but some users may find that Daedalus runs better with this setting enabled. \n \nEnable this setting only if the Daedalus user interface is failing to load. If Daedalus is working properly, please click ‘No’. Otherwise, click ‘Yes’ to restart Daedalus with the blank screen fix setting enabled. \n \nDo you want to enable this setting and restart Daedalus?",
"menu.helpSupport.nonGpuSafeModeDialogTitle": "Turn on 'Blank screen fix'?",
"menu.helpSupport.supportRequest": "Support Request",
"menu.helpSupport.supportRequestUrl": "https://iohk.zendesk.com/hc/en-us/requests/new/",
"menu.view": "View",
"menu.view.reload": "Reload",
"menu.view.toggleDeveloperTools": "Toggle Developer Tools",
"menu.view.toggleFullScreen": "Toggle Full Screen",
"menu.view.toggleMaximumWindowSize": "Toggle Maximum Window Size",
"menu.view.toggleDeveloperTools": "Toggle Developer Tools",
"window.title.gpuSafeMode": "[GPU Safe Mode]"
}
37 changes: 20 additions & 17 deletions source/main/locales/ja-JP.json
Expand Up @@ -2,35 +2,38 @@
"menu.daedalus": "Daedalus",
"menu.daedalus.about": "このDaedalusについて",
"menu.daedalus.adaRedemption": "Adaの還元",
"menu.daedalus.daedalusDiagnostics": "Daedalus診断",
"menu.daedalus.blockConsolidationStatus": "ブロック統合状況",
"menu.daedalus.quit": "終了",
"menu.daedalus.hideDaedalus": "Daedalusを非表示",
"menu.daedalus.hideOthers": "他を非表示",
"menu.daedalus.showAll": "すべてを表示",
"menu.daedalus.close": "閉じる",
"menu.daedalus.quit": "終了",
"menu.edit": "編集",
"menu.edit.undo": "元に戻す",
"menu.edit.redo": "やり直し",
"menu.edit.cut": "カット",
"menu.edit.copy": "コピー",
"menu.edit.cut": "カット",
"menu.edit.paste": "ペースト",
"menu.edit.redo": "やり直し",
"menu.edit.selectAll": "すべて選択",
"menu.helpSupport": "ヘルプとサポート",
"menu.helpSupport.gpuSafeMode": "GPUセーフモード",
"menu.helpSupport.gpuSafeModeDialogTitle": "「GPUセーフモード」を解除しますか?",
"menu.helpSupport.nonGpuSafeModeDialogTitle": "「GPUセーフモード」を設定しますか?",
"menu.helpSupport.gpuSafeModeDialogMessage": "「GPUセーフモード」を解除しますか? \n \n「GPUセーフモード」を解除します。ユーザーインターフェイスのレンダリングパフォーマンスが向上します。 \n \n「はい」をクリックしてDaedalusを再起動し、「GPUセーフモード」を解除してください。\n \n Daedalusを再起動した際にDaedalusユーザーインターフェイスの代わりにブランクスクリーンが表示される場合は、「GPUセーフモード」に戻してください。",
"menu.helpSupport.nonGpuSafeModeDialogMessage": "「GPUセーフモード」を設定しますか? \n \n「GPUセーフモード」を設定します。ユーザーインターフェイスのレンダリングパフォーマンスが低下します。 \n \nDaedalusユーザーインターフェイスの代わりにブランクスクリーンが表示される場合にのみ設定してください。Daedalusが通常通りに動作している場合は、「いいえ」をクリックしてください。その他の場合は「はい」をクリックしてDaedalusを再起動し、「GPUセーフモード」を設定してください。",
"menu.edit.undo": "元に戻す",
"menu.helpSupport": "ヘルプ",
"menu.helpSupport.blockConsolidationStatus": "ブロック統合状況",
"menu.helpSupport.daedalusDiagnostics": "Daedalus診断",
"menu.helpSupport.downloadLogs": "ログのダウンロード",
"menu.helpSupport.blankScreenFix": "ブランク画面修正",
"menu.helpSupport.gpuSafeModeDialogCancel": "キャンセル",
"menu.helpSupport.gpuSafeModeDialogConfirm": "はい",
"menu.helpSupport.gpuSafeModeDialogMessage": "「ブランク画面修正」を無効にしますか? \n \nブランク画面修正設定を無効にすると、グラフィックアクセラレーションが有効化されてユーザーインターフェイスのレンダリングパフォーマンスが向上しますが、この設定を有効にした方がDaedalusがスムーズに作動する場合があります。この設定を無効にしてDaedalusを再起動した際にDaedalusユーザーインターフェイスの代わりにブランク画面が表示される場合は、この設定をもう一度有効にしてください。 \n \nこの設定を無効にしてDaedalusを再起動しますか。",
"menu.helpSupport.gpuSafeModeDialogNo": "いいえ",
"menu.helpSupport.gpuSafeModeDialogCancel": "キャンセル",
"menu.helpSupport.downloadLogs": "ログのダウンロード",
"menu.helpSupport.supportRequest": "サポートリクエスト",
"menu.helpSupport.supportRequestUrl": "https://iohk.zendesk.com/hc/ja/requests/new/",
"menu.helpSupport.gpuSafeModeDialogTitle": "「ブランク画面修正」を無効にしますか?",
"menu.helpSupport.knownIssues": "既知の問題",
"menu.helpSupport.knownIssuesUrl": "https://daedaluswallet.io/ja/known-issues/",
"menu.helpSupport.nonGpuSafeModeDialogMessage": "「ブランク画面修正」を有効にしますか? \n \nDaedalusユーザーインターフェイスがロードに失敗した際、この設定を有効にすることにより問題が解消される場合があります。この場合、グラフィックアクセラレーションが無効化されることでユーザーインターフェイスのレンダリングパフォーマンスが低下しますが、この設定を有効にした方がDaedalusがスムーズに作動する場合があります。 \n \nこの設定はDaedalusユーザーインターフェイスがロードに失敗した場合にのみ有効にしてください。Daedalusが正常に作動している場合は[いいえ]をクリックします。正常に作動していない場合には[はい]をクリックし、ブランク画面修正設定を有効にしてDaedalusを再起動してください。 \n \nこの設定を有効にしてDaedalusを再起動しますか。",
"menu.helpSupport.nonGpuSafeModeDialogTitle": "「ブランク画面修正」を有効にしますか?",
"menu.helpSupport.supportRequest": "サポートリクエスト",
"menu.helpSupport.supportRequestUrl": "https://iohk.zendesk.com/hc/ja/requests/new/",
"menu.view": "見る",
"menu.view.reload": "リロード",
"menu.view.toggleDeveloperTools": "「開発者ツールの切り替え」",
"menu.view.toggleFullScreen": "フルスクリーン切り替え",
"menu.view.toggleMaximumWindowSize": "最大ウインドウサイズ切り切り替え",
"menu.view.toggleDeveloperTools": "「開発者ツールの切り替え」",
"window.title.gpuSafeMode": "[GPUセーフモード]"
}
78 changes: 47 additions & 31 deletions source/main/menus/osx.js
Expand Up @@ -39,20 +39,20 @@ export const osxMenu = (
actions.openAdaRedemptionScreen();
},
},
{ type: 'separator' },
{
label: translation('daedalus.blockConsolidationStatus'),
accelerator: 'Command+B',
click() {
actions.openBlockConsolidationStatusDialog();
},
label: translation('daedalus.hideDaedalus'),
role: 'hide',
},
{
label: translation('daedalus.daedalusDiagnostics'),
accelerator: 'Command+D',
click() {
actions.openDaedalusDiagnosticsDialog();
},
label: translation('daedalus.hideOthers'),
role: 'hideothers',
},
{
label: translation('daedalus.showAll'),
role: 'unhide',
},
{ type: 'separator' },
{
label: translation('daedalus.quit'),
accelerator: 'Command+Q',
Expand All @@ -75,9 +75,7 @@ export const osxMenu = (
accelerator: 'Shift+Command+Z',
role: 'redo',
},
{
type: 'separator',
},
{ type: 'separator' },
{
label: translation('edit.cut'),
accelerator: 'Command+X',
Expand Down Expand Up @@ -124,7 +122,14 @@ export const osxMenu = (
label: translation('helpSupport'),
submenu: compact([
{
label: translation('helpSupport.gpuSafeMode'),
label: translation('helpSupport.knownIssues'),
click() {
const faqLink = translation('helpSupport.knownIssuesUrl');
shell.openExternal(faqLink);
},
},
{
label: translation('helpSupport.blankScreenFix'),
type: 'checkbox',
checked: isInSafeMode,
click(item) {
Expand Down Expand Up @@ -156,6 +161,24 @@ export const osxMenu = (
});
},
},
{ type: 'separator' },
{
label: translation('helpSupport.supportRequest'),
click() {
const supportRequestLinkUrl = translation(
'helpSupport.supportRequestUrl'
);
const supportUrl = `${supportRequestLinkUrl}?${Object.entries(
supportRequestData
)
.map(
([key, val]: [string, any]) =>
`${encodeURIComponent(key)}=${encodeURIComponent(val)}`
)
.join('&')}`;
shell.openExternal(supportUrl);
},
},
{
label: translation('helpSupport.downloadLogs'),
click() {
Expand All @@ -176,33 +199,26 @@ export const osxMenu = (
startTime,
});

Logger.info('Updating State-snapshot.json file', { ...stateSnapshot.data });
Logger.info('Updating State-snapshot.json file', {
...stateSnapshot.data,
});

showUiPartChannel.send(NOTIFICATIONS.DOWNLOAD_LOGS, window);
},
},
{ type: 'separator' },
{
label: translation('helpSupport.supportRequest'),
label: translation('helpSupport.blockConsolidationStatus'),
accelerator: 'Command+B',
click() {
const supportRequestLinkUrl = translation(
'helpSupport.supportRequestUrl'
);
const supportUrl = `${supportRequestLinkUrl}?${Object.entries(
supportRequestData
)
.map(
([key, val]: [string, any]) =>
`${encodeURIComponent(key)}=${encodeURIComponent(val)}`
)
.join('&')}`;
shell.openExternal(supportUrl);
actions.openBlockConsolidationStatusDialog();
},
},
{
label: translation('helpSupport.knownIssues'),
label: translation('helpSupport.daedalusDiagnostics'),
accelerator: 'Command+D',
click() {
const faqLink = translation('helpSupport.knownIssuesUrl');
shell.openExternal(faqLink);
actions.openDaedalusDiagnosticsDialog();
},
},
]),
Expand Down
72 changes: 38 additions & 34 deletions source/main/menus/win-linux.js
Expand Up @@ -7,8 +7,8 @@ import { getTranslation } from '../utils/getTranslation';
import { environment } from '../environment';
import { NOTIFICATIONS } from '../../common/ipc/constants';
import { showUiPartChannel } from '../ipc/control-ui-parts';
import { logStateSnapshot } from "../utils/setupLogging";
import { Logger } from "../utils/logging";
import { logStateSnapshot } from '../utils/setupLogging';
import { Logger } from '../utils/logging';
import type { SupportRequests } from '../../common/types/support-requests.types';

const id = 'menu';
Expand Down Expand Up @@ -39,20 +39,6 @@ export const winLinuxMenu = (
actions.openAdaRedemptionScreen();
},
},
{
label: translation('daedalus.blockConsolidationStatus'),
accelerator: 'Ctrl+B',
click() {
actions.openBlockConsolidationStatusDialog();
},
},
{
label: translation('daedalus.daedalusDiagnostics'),
accelerator: 'Ctrl+D',
click() {
actions.openDaedalusDiagnosticsDialog();
},
},
{
label: translation('daedalus.close'),
accelerator: 'Ctrl+W',
Expand Down Expand Up @@ -142,7 +128,14 @@ export const winLinuxMenu = (
label: translation('helpSupport'),
submenu: compact([
{
label: translation('helpSupport.gpuSafeMode'),
label: translation('helpSupport.knownIssues'),
click() {
const faqLink = translation('helpSupport.knownIssuesUrl');
shell.openExternal(faqLink);
},
},
{
label: translation('helpSupport.blankScreenFix'),
type: 'checkbox',
checked: isInSafeMode,
click(item) {
Expand Down Expand Up @@ -175,6 +168,24 @@ export const winLinuxMenu = (
});
},
},
{ type: 'separator' },
{
label: translation('helpSupport.supportRequest'),
click() {
const supportRequestLinkUrl = translation(
'helpSupport.supportRequestUrl'
);
const supportUrl = `${supportRequestLinkUrl}?${Object.entries(
supportRequestData
)
.map(
([key, val]: [string, any]) =>
`${encodeURIComponent(key)}=${encodeURIComponent(val)}`
)
.join('&')}`;
shell.openExternal(supportUrl);
},
},
{
label: translation('helpSupport.downloadLogs'),
click() {
Expand All @@ -195,33 +206,26 @@ export const winLinuxMenu = (
startTime,
});

Logger.info('Updating State-snapshot.json file', { ...stateSnapshot.data });
Logger.info('Updating State-snapshot.json file', {
...stateSnapshot.data,
});

showUiPartChannel.send(NOTIFICATIONS.DOWNLOAD_LOGS, window);
},
},
{ type: 'separator' },
{
label: translation('helpSupport.supportRequest'),
label: translation('helpSupport.blockConsolidationStatus'),
accelerator: 'Ctrl+B',
click() {
const supportRequestLinkUrl = translation(
'helpSupport.supportRequestUrl'
);
const supportUrl = `${supportRequestLinkUrl}?${Object.entries(
supportRequestData
)
.map(
([key, val]: [string, any]) =>
`${encodeURIComponent(key)}=${encodeURIComponent(val)}`
)
.join('&')}`;
shell.openExternal(supportUrl);
actions.openBlockConsolidationStatusDialog();
},
},
{
label: translation('helpSupport.knownIssues'),
label: translation('helpSupport.daedalusDiagnostics'),
accelerator: 'Ctrl+D',
click() {
const faqLink = translation('helpSupport.knownIssuesUrl');
shell.openExternal(faqLink);
actions.openDaedalusDiagnosticsDialog();
},
},
]),
Expand Down
22 changes: 22 additions & 0 deletions source/renderer/app/api/staking/types.js
Expand Up @@ -12,3 +12,25 @@ export type StakePool = {
retiring?: Date,
url: string,
};

export type Reward = {
date: string,
wallet: string,
amount: number,
pool: StakePool,
};

export type EpochData = {
pool: StakePool,
slotsElected: Array<number>,
performance?: Array<number>,
sharedRewards?: Array<number>,
};

export type Epoch = {
id: number,
name: string,
progress?: number,
endsAt?: string,
data: Array<EpochData>,
};

0 comments on commit 55d2407

Please sign in to comment.