diff options
author | Dominik Guzei <dominik.guzei@gmail.com> | 2019-04-12 17:18:19 +0200 |
---|---|---|
committer | Dominik Guzei <dominik.guzei@gmail.com> | 2019-04-12 17:18:19 +0200 |
commit | 9620db3443c70d6f92b55725ed07a17adda8cea4 (patch) | |
tree | 2819bbbfedbd9842a1a7fd8249d123224445139f /src | |
parent | cleanup console log artifacts (diff) | |
download | ferdium-app-9620db3443c70d6f92b55725ed07a17adda8cea4.tar.gz ferdium-app-9620db3443c70d6f92b55725ed07a17adda8cea4.tar.zst ferdium-app-9620db3443c70d6f92b55725ed07a17adda8cea4.zip |
link to in-app changelog on new update notification
Diffstat (limited to 'src')
-rw-r--r-- | src/components/layout/AppLayout.js | 12 | ||||
-rw-r--r-- | src/containers/layout/AppLayoutContainer.js | 1 | ||||
-rw-r--r-- | src/electron/ipc-api/autoUpdate.js | 7 | ||||
-rw-r--r-- | src/i18n/locales/defaultMessages.json | 24 | ||||
-rw-r--r-- | src/i18n/messages/src/components/layout/AppLayout.json | 24 | ||||
-rw-r--r-- | src/stores/AppStore.js | 4 | ||||
-rw-r--r-- | src/styles/info-bar.scss | 4 |
7 files changed, 47 insertions, 29 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index eb3f03f12..d5febfaf4 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -17,6 +17,7 @@ import { isWindows } from '../../environment'; | |||
17 | import AnnouncementScreen from '../../features/announcements/components/AnnouncementScreen'; | 17 | import AnnouncementScreen from '../../features/announcements/components/AnnouncementScreen'; |
18 | import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; | 18 | import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; |
19 | import { workspaceStore } from '../../features/workspaces'; | 19 | import { workspaceStore } from '../../features/workspaces'; |
20 | import { announcementActions } from '../../features/announcements/actions'; | ||
20 | 21 | ||
21 | function createMarkup(HTMLString) { | 22 | function createMarkup(HTMLString) { |
22 | return { __html: HTMLString }; | 23 | return { __html: HTMLString }; |
@@ -72,6 +73,7 @@ class AppLayout extends Component { | |||
72 | // isOnline: PropTypes.bool.isRequired, | 73 | // isOnline: PropTypes.bool.isRequired, |
73 | showServicesUpdatedInfoBar: PropTypes.bool.isRequired, | 74 | showServicesUpdatedInfoBar: PropTypes.bool.isRequired, |
74 | appUpdateIsDownloaded: PropTypes.bool.isRequired, | 75 | appUpdateIsDownloaded: PropTypes.bool.isRequired, |
76 | nextAppReleaseVersion: PropTypes.string, | ||
75 | removeNewsItem: PropTypes.func.isRequired, | 77 | removeNewsItem: PropTypes.func.isRequired, |
76 | reloadServicesAfterUpdate: PropTypes.func.isRequired, | 78 | reloadServicesAfterUpdate: PropTypes.func.isRequired, |
77 | installAppUpdate: PropTypes.func.isRequired, | 79 | installAppUpdate: PropTypes.func.isRequired, |
@@ -86,6 +88,7 @@ class AppLayout extends Component { | |||
86 | 88 | ||
87 | static defaultProps = { | 89 | static defaultProps = { |
88 | children: [], | 90 | children: [], |
91 | nextAppReleaseVersion: null, | ||
89 | }; | 92 | }; |
90 | 93 | ||
91 | static contextTypes = { | 94 | static contextTypes = { |
@@ -104,6 +107,7 @@ class AppLayout extends Component { | |||
104 | news, | 107 | news, |
105 | showServicesUpdatedInfoBar, | 108 | showServicesUpdatedInfoBar, |
106 | appUpdateIsDownloaded, | 109 | appUpdateIsDownloaded, |
110 | nextAppReleaseVersion, | ||
107 | removeNewsItem, | 111 | removeNewsItem, |
108 | reloadServicesAfterUpdate, | 112 | reloadServicesAfterUpdate, |
109 | installAppUpdate, | 113 | installAppUpdate, |
@@ -181,9 +185,13 @@ class AppLayout extends Component { | |||
181 | <span className="mdi mdi-information" /> | 185 | <span className="mdi mdi-information" /> |
182 | {intl.formatMessage(messages.updateAvailable)} | 186 | {intl.formatMessage(messages.updateAvailable)} |
183 | {' '} | 187 | {' '} |
184 | <a href="https://meetfranz.com/changelog" target="_blank"> | 188 | <button |
189 | className="info-bar__inline-button" | ||
190 | type="button" | ||
191 | onClick={() => announcementActions.show({ targetVersion: nextAppReleaseVersion })} | ||
192 | > | ||
185 | <u>{intl.formatMessage(messages.changelog)}</u> | 193 | <u>{intl.formatMessage(messages.changelog)}</u> |
186 | </a> | 194 | </button> |
187 | </InfoBar> | 195 | </InfoBar> |
188 | )} | 196 | )} |
189 | {isDelayAppScreenVisible && (<DelayApp />)} | 197 | {isDelayAppScreenVisible && (<DelayApp />)} |
diff --git a/src/containers/layout/AppLayoutContainer.js b/src/containers/layout/AppLayoutContainer.js index 8c1d2dfc1..d2891a6a4 100644 --- a/src/containers/layout/AppLayoutContainer.js +++ b/src/containers/layout/AppLayoutContainer.js | |||
@@ -136,6 +136,7 @@ export default @inject('stores', 'actions') @observer class AppLayoutContainer e | |||
136 | isOnline={app.isOnline} | 136 | isOnline={app.isOnline} |
137 | showServicesUpdatedInfoBar={ui.showServicesUpdatedInfoBar} | 137 | showServicesUpdatedInfoBar={ui.showServicesUpdatedInfoBar} |
138 | appUpdateIsDownloaded={app.updateStatus === app.updateStatusTypes.DOWNLOADED} | 138 | appUpdateIsDownloaded={app.updateStatus === app.updateStatusTypes.DOWNLOADED} |
139 | nextAppReleaseVersion={app.nextAppReleaseVersion} | ||
139 | sidebar={sidebar} | 140 | sidebar={sidebar} |
140 | workspacesDrawer={workspacesDrawer} | 141 | workspacesDrawer={workspacesDrawer} |
141 | services={servicesContainer} | 142 | services={servicesContainer} |
diff --git a/src/electron/ipc-api/autoUpdate.js b/src/electron/ipc-api/autoUpdate.js index 74b718734..9a04c1958 100644 --- a/src/electron/ipc-api/autoUpdate.js +++ b/src/electron/ipc-api/autoUpdate.js | |||
@@ -30,9 +30,12 @@ export default (params) => { | |||
30 | params.mainWindow.webContents.send('autoUpdate', { available: false }); | 30 | params.mainWindow.webContents.send('autoUpdate', { available: false }); |
31 | }); | 31 | }); |
32 | 32 | ||
33 | autoUpdater.on('update-available', () => { | 33 | autoUpdater.on('update-available', (event) => { |
34 | debug('update-available'); | 34 | debug('update-available'); |
35 | params.mainWindow.webContents.send('autoUpdate', { available: true }); | 35 | params.mainWindow.webContents.send('autoUpdate', { |
36 | version: event.version, | ||
37 | available: true, | ||
38 | }); | ||
36 | }); | 39 | }); |
37 | 40 | ||
38 | autoUpdater.on('download-progress', (progressObj) => { | 41 | autoUpdater.on('download-progress', (progressObj) => { |
diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json index 3323aa310..df7f04a06 100644 --- a/src/i18n/locales/defaultMessages.json +++ b/src/i18n/locales/defaultMessages.json | |||
@@ -625,78 +625,78 @@ | |||
625 | "defaultMessage": "!!!Your services have been updated.", | 625 | "defaultMessage": "!!!Your services have been updated.", |
626 | "end": { | 626 | "end": { |
627 | "column": 3, | 627 | "column": 3, |
628 | "line": 29 | 628 | "line": 30 |
629 | }, | 629 | }, |
630 | "file": "src/components/layout/AppLayout.js", | 630 | "file": "src/components/layout/AppLayout.js", |
631 | "id": "infobar.servicesUpdated", | 631 | "id": "infobar.servicesUpdated", |
632 | "start": { | 632 | "start": { |
633 | "column": 19, | 633 | "column": 19, |
634 | "line": 26 | 634 | "line": 27 |
635 | } | 635 | } |
636 | }, | 636 | }, |
637 | { | 637 | { |
638 | "defaultMessage": "!!!A new update for Franz is available.", | 638 | "defaultMessage": "!!!A new update for Franz is available.", |
639 | "end": { | 639 | "end": { |
640 | "column": 3, | 640 | "column": 3, |
641 | "line": 33 | 641 | "line": 34 |
642 | }, | 642 | }, |
643 | "file": "src/components/layout/AppLayout.js", | 643 | "file": "src/components/layout/AppLayout.js", |
644 | "id": "infobar.updateAvailable", | 644 | "id": "infobar.updateAvailable", |
645 | "start": { | 645 | "start": { |
646 | "column": 19, | 646 | "column": 19, |
647 | "line": 30 | 647 | "line": 31 |
648 | } | 648 | } |
649 | }, | 649 | }, |
650 | { | 650 | { |
651 | "defaultMessage": "!!!Reload services", | 651 | "defaultMessage": "!!!Reload services", |
652 | "end": { | 652 | "end": { |
653 | "column": 3, | 653 | "column": 3, |
654 | "line": 37 | 654 | "line": 38 |
655 | }, | 655 | }, |
656 | "file": "src/components/layout/AppLayout.js", | 656 | "file": "src/components/layout/AppLayout.js", |
657 | "id": "infobar.buttonReloadServices", | 657 | "id": "infobar.buttonReloadServices", |
658 | "start": { | 658 | "start": { |
659 | "column": 24, | 659 | "column": 24, |
660 | "line": 34 | 660 | "line": 35 |
661 | } | 661 | } |
662 | }, | 662 | }, |
663 | { | 663 | { |
664 | "defaultMessage": "!!!Changelog", | 664 | "defaultMessage": "!!!Changelog", |
665 | "end": { | 665 | "end": { |
666 | "column": 3, | 666 | "column": 3, |
667 | "line": 41 | 667 | "line": 42 |
668 | }, | 668 | }, |
669 | "file": "src/components/layout/AppLayout.js", | 669 | "file": "src/components/layout/AppLayout.js", |
670 | "id": "infobar.buttonChangelog", | 670 | "id": "infobar.buttonChangelog", |
671 | "start": { | 671 | "start": { |
672 | "column": 13, | 672 | "column": 13, |
673 | "line": 38 | 673 | "line": 39 |
674 | } | 674 | } |
675 | }, | 675 | }, |
676 | { | 676 | { |
677 | "defaultMessage": "!!!Restart & install update", | 677 | "defaultMessage": "!!!Restart & install update", |
678 | "end": { | 678 | "end": { |
679 | "column": 3, | 679 | "column": 3, |
680 | "line": 45 | 680 | "line": 46 |
681 | }, | 681 | }, |
682 | "file": "src/components/layout/AppLayout.js", | 682 | "file": "src/components/layout/AppLayout.js", |
683 | "id": "infobar.buttonInstallUpdate", | 683 | "id": "infobar.buttonInstallUpdate", |
684 | "start": { | 684 | "start": { |
685 | "column": 23, | 685 | "column": 23, |
686 | "line": 42 | 686 | "line": 43 |
687 | } | 687 | } |
688 | }, | 688 | }, |
689 | { | 689 | { |
690 | "defaultMessage": "!!!Could not load services and user information", | 690 | "defaultMessage": "!!!Could not load services and user information", |
691 | "end": { | 691 | "end": { |
692 | "column": 3, | 692 | "column": 3, |
693 | "line": 49 | 693 | "line": 50 |
694 | }, | 694 | }, |
695 | "file": "src/components/layout/AppLayout.js", | 695 | "file": "src/components/layout/AppLayout.js", |
696 | "id": "infobar.requiredRequestsFailed", | 696 | "id": "infobar.requiredRequestsFailed", |
697 | "start": { | 697 | "start": { |
698 | "column": 26, | 698 | "column": 26, |
699 | "line": 46 | 699 | "line": 47 |
700 | } | 700 | } |
701 | } | 701 | } |
702 | ], | 702 | ], |
diff --git a/src/i18n/messages/src/components/layout/AppLayout.json b/src/i18n/messages/src/components/layout/AppLayout.json index 4dd354afc..26b8ce040 100644 --- a/src/i18n/messages/src/components/layout/AppLayout.json +++ b/src/i18n/messages/src/components/layout/AppLayout.json | |||
@@ -4,11 +4,11 @@ | |||
4 | "defaultMessage": "!!!Your services have been updated.", | 4 | "defaultMessage": "!!!Your services have been updated.", |
5 | "file": "src/components/layout/AppLayout.js", | 5 | "file": "src/components/layout/AppLayout.js", |
6 | "start": { | 6 | "start": { |
7 | "line": 26, | 7 | "line": 27, |
8 | "column": 19 | 8 | "column": 19 |
9 | }, | 9 | }, |
10 | "end": { | 10 | "end": { |
11 | "line": 29, | 11 | "line": 30, |
12 | "column": 3 | 12 | "column": 3 |
13 | } | 13 | } |
14 | }, | 14 | }, |
@@ -17,11 +17,11 @@ | |||
17 | "defaultMessage": "!!!A new update for Franz is available.", | 17 | "defaultMessage": "!!!A new update for Franz is available.", |
18 | "file": "src/components/layout/AppLayout.js", | 18 | "file": "src/components/layout/AppLayout.js", |
19 | "start": { | 19 | "start": { |
20 | "line": 30, | 20 | "line": 31, |
21 | "column": 19 | 21 | "column": 19 |
22 | }, | 22 | }, |
23 | "end": { | 23 | "end": { |
24 | "line": 33, | 24 | "line": 34, |
25 | "column": 3 | 25 | "column": 3 |
26 | } | 26 | } |
27 | }, | 27 | }, |
@@ -30,11 +30,11 @@ | |||
30 | "defaultMessage": "!!!Reload services", | 30 | "defaultMessage": "!!!Reload services", |
31 | "file": "src/components/layout/AppLayout.js", | 31 | "file": "src/components/layout/AppLayout.js", |
32 | "start": { | 32 | "start": { |
33 | "line": 34, | 33 | "line": 35, |
34 | "column": 24 | 34 | "column": 24 |
35 | }, | 35 | }, |
36 | "end": { | 36 | "end": { |
37 | "line": 37, | 37 | "line": 38, |
38 | "column": 3 | 38 | "column": 3 |
39 | } | 39 | } |
40 | }, | 40 | }, |
@@ -43,11 +43,11 @@ | |||
43 | "defaultMessage": "!!!Changelog", | 43 | "defaultMessage": "!!!Changelog", |
44 | "file": "src/components/layout/AppLayout.js", | 44 | "file": "src/components/layout/AppLayout.js", |
45 | "start": { | 45 | "start": { |
46 | "line": 38, | 46 | "line": 39, |
47 | "column": 13 | 47 | "column": 13 |
48 | }, | 48 | }, |
49 | "end": { | 49 | "end": { |
50 | "line": 41, | 50 | "line": 42, |
51 | "column": 3 | 51 | "column": 3 |
52 | } | 52 | } |
53 | }, | 53 | }, |
@@ -56,11 +56,11 @@ | |||
56 | "defaultMessage": "!!!Restart & install update", | 56 | "defaultMessage": "!!!Restart & install update", |
57 | "file": "src/components/layout/AppLayout.js", | 57 | "file": "src/components/layout/AppLayout.js", |
58 | "start": { | 58 | "start": { |
59 | "line": 42, | 59 | "line": 43, |
60 | "column": 23 | 60 | "column": 23 |
61 | }, | 61 | }, |
62 | "end": { | 62 | "end": { |
63 | "line": 45, | 63 | "line": 46, |
64 | "column": 3 | 64 | "column": 3 |
65 | } | 65 | } |
66 | }, | 66 | }, |
@@ -69,11 +69,11 @@ | |||
69 | "defaultMessage": "!!!Could not load services and user information", | 69 | "defaultMessage": "!!!Could not load services and user information", |
70 | "file": "src/components/layout/AppLayout.js", | 70 | "file": "src/components/layout/AppLayout.js", |
71 | "start": { | 71 | "start": { |
72 | "line": 46, | 72 | "line": 47, |
73 | "column": 26 | 73 | "column": 26 |
74 | }, | 74 | }, |
75 | "end": { | 75 | "end": { |
76 | "line": 49, | 76 | "line": 50, |
77 | "column": 3 | 77 | "column": 3 |
78 | } | 78 | } |
79 | } | 79 | } |
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index ca0c9175b..e68e797ef 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js | |||
@@ -67,6 +67,8 @@ export default class AppStore extends Store { | |||
67 | 67 | ||
68 | @observable isFocused = true; | 68 | @observable isFocused = true; |
69 | 69 | ||
70 | @observable nextAppReleaseVersion = null; | ||
71 | |||
70 | dictionaries = []; | 72 | dictionaries = []; |
71 | 73 | ||
72 | constructor(...args) { | 74 | constructor(...args) { |
@@ -123,7 +125,7 @@ export default class AppStore extends Store { | |||
123 | ipcRenderer.on('autoUpdate', (event, data) => { | 125 | ipcRenderer.on('autoUpdate', (event, data) => { |
124 | if (data.available) { | 126 | if (data.available) { |
125 | this.updateStatus = this.updateStatusTypes.AVAILABLE; | 127 | this.updateStatus = this.updateStatusTypes.AVAILABLE; |
126 | 128 | this.nextAppReleaseVersion = data.version; | |
127 | if (isMac) { | 129 | if (isMac) { |
128 | app.dock.bounce(); | 130 | app.dock.bounce(); |
129 | } | 131 | } |
diff --git a/src/styles/info-bar.scss b/src/styles/info-bar.scss index fb4917358..d3010942f 100644 --- a/src/styles/info-bar.scss +++ b/src/styles/info-bar.scss | |||
@@ -43,6 +43,10 @@ | |||
43 | } | 43 | } |
44 | } | 44 | } |
45 | 45 | ||
46 | .info-bar__inline-button { | ||
47 | color: white; | ||
48 | } | ||
49 | |||
46 | &.info-bar--bottom { order: 10; } | 50 | &.info-bar--bottom { order: 10; } |
47 | 51 | ||
48 | &.info-bar--primary { | 52 | &.info-bar--primary { |