From 84dfa95dfb558fcd46f92f901135a5dd847fb061 Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Fri, 12 Apr 2019 16:35:34 +0200 Subject: cleanup console log artifacts --- src/stores/AppStore.js | 1 - 1 file changed, 1 deletion(-) (limited to 'src/stores/AppStore.js') diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index 351ad6422..ca0c9175b 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js @@ -172,7 +172,6 @@ export default class AppStore extends Store { reaction(() => this.stores.router.location.pathname, (pathname) => { gaPage(pathname); }); - console.log('router location', this.stores.router.location); } @computed get cacheSize() { -- cgit v1.2.3-70-g09d2 From 9620db3443c70d6f92b55725ed07a17adda8cea4 Mon Sep 17 00:00:00 2001 From: Dominik Guzei Date: Fri, 12 Apr 2019 17:18:19 +0200 Subject: link to in-app changelog on new update notification --- src/components/layout/AppLayout.js | 12 +++++++++-- src/containers/layout/AppLayoutContainer.js | 1 + src/electron/ipc-api/autoUpdate.js | 7 +++++-- src/i18n/locales/defaultMessages.json | 24 +++++++++++----------- .../messages/src/components/layout/AppLayout.json | 24 +++++++++++----------- src/stores/AppStore.js | 4 +++- src/styles/info-bar.scss | 4 ++++ 7 files changed, 47 insertions(+), 29 deletions(-) (limited to 'src/stores/AppStore.js') 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'; import AnnouncementScreen from '../../features/announcements/components/AnnouncementScreen'; import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; import { workspaceStore } from '../../features/workspaces'; +import { announcementActions } from '../../features/announcements/actions'; function createMarkup(HTMLString) { return { __html: HTMLString }; @@ -72,6 +73,7 @@ class AppLayout extends Component { // isOnline: PropTypes.bool.isRequired, showServicesUpdatedInfoBar: PropTypes.bool.isRequired, appUpdateIsDownloaded: PropTypes.bool.isRequired, + nextAppReleaseVersion: PropTypes.string, removeNewsItem: PropTypes.func.isRequired, reloadServicesAfterUpdate: PropTypes.func.isRequired, installAppUpdate: PropTypes.func.isRequired, @@ -86,6 +88,7 @@ class AppLayout extends Component { static defaultProps = { children: [], + nextAppReleaseVersion: null, }; static contextTypes = { @@ -104,6 +107,7 @@ class AppLayout extends Component { news, showServicesUpdatedInfoBar, appUpdateIsDownloaded, + nextAppReleaseVersion, removeNewsItem, reloadServicesAfterUpdate, installAppUpdate, @@ -181,9 +185,13 @@ class AppLayout extends Component { {intl.formatMessage(messages.updateAvailable)} {' '} - + )} {isDelayAppScreenVisible && ()} 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 isOnline={app.isOnline} showServicesUpdatedInfoBar={ui.showServicesUpdatedInfoBar} appUpdateIsDownloaded={app.updateStatus === app.updateStatusTypes.DOWNLOADED} + nextAppReleaseVersion={app.nextAppReleaseVersion} sidebar={sidebar} workspacesDrawer={workspacesDrawer} 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) => { params.mainWindow.webContents.send('autoUpdate', { available: false }); }); - autoUpdater.on('update-available', () => { + autoUpdater.on('update-available', (event) => { debug('update-available'); - params.mainWindow.webContents.send('autoUpdate', { available: true }); + params.mainWindow.webContents.send('autoUpdate', { + version: event.version, + available: true, + }); }); 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 @@ "defaultMessage": "!!!Your services have been updated.", "end": { "column": 3, - "line": 29 + "line": 30 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.servicesUpdated", "start": { "column": 19, - "line": 26 + "line": 27 } }, { "defaultMessage": "!!!A new update for Franz is available.", "end": { "column": 3, - "line": 33 + "line": 34 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.updateAvailable", "start": { "column": 19, - "line": 30 + "line": 31 } }, { "defaultMessage": "!!!Reload services", "end": { "column": 3, - "line": 37 + "line": 38 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.buttonReloadServices", "start": { "column": 24, - "line": 34 + "line": 35 } }, { "defaultMessage": "!!!Changelog", "end": { "column": 3, - "line": 41 + "line": 42 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.buttonChangelog", "start": { "column": 13, - "line": 38 + "line": 39 } }, { "defaultMessage": "!!!Restart & install update", "end": { "column": 3, - "line": 45 + "line": 46 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.buttonInstallUpdate", "start": { "column": 23, - "line": 42 + "line": 43 } }, { "defaultMessage": "!!!Could not load services and user information", "end": { "column": 3, - "line": 49 + "line": 50 }, "file": "src/components/layout/AppLayout.js", "id": "infobar.requiredRequestsFailed", "start": { "column": 26, - "line": 46 + "line": 47 } } ], 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 @@ "defaultMessage": "!!!Your services have been updated.", "file": "src/components/layout/AppLayout.js", "start": { - "line": 26, + "line": 27, "column": 19 }, "end": { - "line": 29, + "line": 30, "column": 3 } }, @@ -17,11 +17,11 @@ "defaultMessage": "!!!A new update for Franz is available.", "file": "src/components/layout/AppLayout.js", "start": { - "line": 30, + "line": 31, "column": 19 }, "end": { - "line": 33, + "line": 34, "column": 3 } }, @@ -30,11 +30,11 @@ "defaultMessage": "!!!Reload services", "file": "src/components/layout/AppLayout.js", "start": { - "line": 34, + "line": 35, "column": 24 }, "end": { - "line": 37, + "line": 38, "column": 3 } }, @@ -43,11 +43,11 @@ "defaultMessage": "!!!Changelog", "file": "src/components/layout/AppLayout.js", "start": { - "line": 38, + "line": 39, "column": 13 }, "end": { - "line": 41, + "line": 42, "column": 3 } }, @@ -56,11 +56,11 @@ "defaultMessage": "!!!Restart & install update", "file": "src/components/layout/AppLayout.js", "start": { - "line": 42, + "line": 43, "column": 23 }, "end": { - "line": 45, + "line": 46, "column": 3 } }, @@ -69,11 +69,11 @@ "defaultMessage": "!!!Could not load services and user information", "file": "src/components/layout/AppLayout.js", "start": { - "line": 46, + "line": 47, "column": 26 }, "end": { - "line": 49, + "line": 50, "column": 3 } } 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 { @observable isFocused = true; + @observable nextAppReleaseVersion = null; + dictionaries = []; constructor(...args) { @@ -123,7 +125,7 @@ export default class AppStore extends Store { ipcRenderer.on('autoUpdate', (event, data) => { if (data.available) { this.updateStatus = this.updateStatusTypes.AVAILABLE; - + this.nextAppReleaseVersion = data.version; if (isMac) { app.dock.bounce(); } 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 @@ } } + .info-bar__inline-button { + color: white; + } + &.info-bar--bottom { order: 10; } &.info-bar--primary { -- cgit v1.2.3-70-g09d2 From 68a03fc47b28ccadc30a0b6cf36b7b12d2d19847 Mon Sep 17 00:00:00 2001 From: Stefan Malzner Date: Tue, 23 Apr 2019 22:27:07 +0200 Subject: add appstart event --- src/lib/analytics.js | 2 +- src/stores/AppStore.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/stores/AppStore.js') diff --git a/src/lib/analytics.js b/src/lib/analytics.js index 663aafe22..c305fdb00 100644 --- a/src/lib/analytics.js +++ b/src/lib/analytics.js @@ -42,7 +42,7 @@ export function gaEvent(category, action, label) { export function statsEvent(key, value) { const params = { key, - value, + value: value || key, platform: process.platform, version: remote.app.getVersion(), }; diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js index e68e797ef..72c4b4d0b 100644 --- a/src/stores/AppStore.js +++ b/src/stores/AppStore.js @@ -14,7 +14,7 @@ import Request from './lib/Request'; import { CHECK_INTERVAL, DEFAULT_APP_SETTINGS } from '../config'; import { isMac } from '../environment'; import locales from '../i18n/translations'; -import { gaEvent, gaPage } from '../lib/analytics'; +import { gaEvent, gaPage, statsEvent } from '../lib/analytics'; import { onVisibilityChange } from '../helpers/visibility-helper'; import { getLocale } from '../helpers/i18n-helpers'; @@ -174,6 +174,8 @@ export default class AppStore extends Store { reaction(() => this.stores.router.location.pathname, (pathname) => { gaPage(pathname); }); + + statsEvent('app-start'); } @computed get cacheSize() { -- cgit v1.2.3-70-g09d2