aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar Dominik Guzei <dominik.guzei@gmail.com>2019-05-22 12:41:05 +0200
committerLibravatar GitHub <noreply@github.com>2019-05-22 12:41:05 +0200
commitfc12c0599c1cd2bbdab2f5bc985567dec0b5daa1 (patch)
tree49892eae1b676856c2cecedfceeba396f63eb581 /src
parentfix debug message for announcement semver logic (diff)
parentremove version limitation for fetching announcements (diff)
downloadferdium-app-fc12c0599c1cd2bbdab2f5bc985567dec0b5daa1.tar.gz
ferdium-app-fc12c0599c1cd2bbdab2f5bc985567dec0b5daa1.tar.zst
ferdium-app-fc12c0599c1cd2bbdab2f5bc985567dec0b5daa1.zip
Merge pull request #1426 from meetfranz/fix/announcement-not-shown-within-workspace
Fix/announcement not shown within workspace
Diffstat (limited to 'src')
-rw-r--r--src/actions/service.js1
-rw-r--r--src/app.js3
-rw-r--r--src/components/layout/AppLayout.js6
-rw-r--r--src/containers/layout/AppLayoutContainer.js2
-rw-r--r--src/features/announcements/components/AnnouncementScreen.js2
-rw-r--r--src/features/announcements/index.js4
-rw-r--r--src/features/announcements/store.js46
-rw-r--r--src/features/workspaces/store.js8
-rw-r--r--src/i18n/locales/defaultMessages.json24
-rw-r--r--src/i18n/messages/src/components/layout/AppLayout.json24
-rw-r--r--src/stores/ServicesStore.js3
11 files changed, 60 insertions, 63 deletions
diff --git a/src/actions/service.js b/src/actions/service.js
index ce62560a9..68c62d594 100644
--- a/src/actions/service.js
+++ b/src/actions/service.js
@@ -4,6 +4,7 @@ import ServiceModel from '../models/Service';
4export default { 4export default {
5 setActive: { 5 setActive: {
6 serviceId: PropTypes.string.isRequired, 6 serviceId: PropTypes.string.isRequired,
7 keepActiveRoute: PropTypes.bool,
7 }, 8 },
8 blurActive: {}, 9 blurActive: {},
9 setActiveNext: {}, 10 setActiveNext: {},
diff --git a/src/app.js b/src/app.js
index f6092bf60..cb3e37c64 100644
--- a/src/app.js
+++ b/src/app.js
@@ -43,6 +43,8 @@ import SubscriptionPopupScreen from './containers/subscription/SubscriptionPopup
43import WorkspacesScreen from './features/workspaces/containers/WorkspacesScreen'; 43import WorkspacesScreen from './features/workspaces/containers/WorkspacesScreen';
44import EditWorkspaceScreen from './features/workspaces/containers/EditWorkspaceScreen'; 44import EditWorkspaceScreen from './features/workspaces/containers/EditWorkspaceScreen';
45import { WORKSPACES_ROUTES } from './features/workspaces'; 45import { WORKSPACES_ROUTES } from './features/workspaces';
46import AnnouncementScreen from './features/announcements/components/AnnouncementScreen';
47import { ANNOUNCEMENTS_ROUTES } from './features/announcements';
46 48
47// Add Polyfills 49// Add Polyfills
48smoothScroll.polyfill(); 50smoothScroll.polyfill();
@@ -73,6 +75,7 @@ window.addEventListener('load', () => {
73 <I18N> 75 <I18N>
74 <Router history={history}> 76 <Router history={history}>
75 <Route path="/" component={AppLayoutContainer}> 77 <Route path="/" component={AppLayoutContainer}>
78 <Route path={ANNOUNCEMENTS_ROUTES.TARGET} component={AnnouncementScreen} />
76 <Route path="/settings" component={SettingsWindow}> 79 <Route path="/settings" component={SettingsWindow}>
77 <IndexRedirect to="/settings/recipes" /> 80 <IndexRedirect to="/settings/recipes" />
78 <Route path="/settings/recipes" component={RecipesScreen} /> 81 <Route path="/settings/recipes" component={RecipesScreen} />
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js
index d5febfaf4..b31c00f54 100644
--- a/src/components/layout/AppLayout.js
+++ b/src/components/layout/AppLayout.js
@@ -14,7 +14,6 @@ import ErrorBoundary from '../util/ErrorBoundary';
14// import globalMessages from '../../i18n/globalMessages'; 14// import globalMessages from '../../i18n/globalMessages';
15 15
16import { isWindows } from '../../environment'; 16import { isWindows } from '../../environment';
17import AnnouncementScreen from '../../features/announcements/components/AnnouncementScreen';
18import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator'; 17import WorkspaceSwitchingIndicator from '../../features/workspaces/components/WorkspaceSwitchingIndicator';
19import { workspaceStore } from '../../features/workspaces'; 18import { workspaceStore } from '../../features/workspaces';
20import { announcementActions } from '../../features/announcements/actions'; 19import { announcementActions } from '../../features/announcements/actions';
@@ -83,7 +82,6 @@ class AppLayout extends Component {
83 areRequiredRequestsLoading: PropTypes.bool.isRequired, 82 areRequiredRequestsLoading: PropTypes.bool.isRequired,
84 darkMode: PropTypes.bool.isRequired, 83 darkMode: PropTypes.bool.isRequired,
85 isDelayAppScreenVisible: PropTypes.bool.isRequired, 84 isDelayAppScreenVisible: PropTypes.bool.isRequired,
86 isAnnouncementVisible: PropTypes.bool.isRequired,
87 }; 85 };
88 86
89 static defaultProps = { 87 static defaultProps = {
@@ -117,7 +115,6 @@ class AppLayout extends Component {
117 areRequiredRequestsLoading, 115 areRequiredRequestsLoading,
118 darkMode, 116 darkMode,
119 isDelayAppScreenVisible, 117 isDelayAppScreenVisible,
120 isAnnouncementVisible,
121 } = this.props; 118 } = this.props;
122 119
123 const { intl } = this.context; 120 const { intl } = this.context;
@@ -197,12 +194,11 @@ class AppLayout extends Component {
197 {isDelayAppScreenVisible && (<DelayApp />)} 194 {isDelayAppScreenVisible && (<DelayApp />)}
198 <BasicAuth /> 195 <BasicAuth />
199 <ShareFranz /> 196 <ShareFranz />
200 {isAnnouncementVisible && (<AnnouncementScreen />)}
201 {services} 197 {services}
198 {children}
202 </div> 199 </div>
203 </div> 200 </div>
204 </div> 201 </div>
205 {children}
206 </div> 202 </div>
207 </ErrorBoundary> 203 </ErrorBoundary>
208 ); 204 );
diff --git a/src/containers/layout/AppLayoutContainer.js b/src/containers/layout/AppLayoutContainer.js
index d2891a6a4..d290a6094 100644
--- a/src/containers/layout/AppLayoutContainer.js
+++ b/src/containers/layout/AppLayoutContainer.js
@@ -23,7 +23,6 @@ import { state as delayAppState } from '../../features/delayApp';
23import { workspaceActions } from '../../features/workspaces/actions'; 23import { workspaceActions } from '../../features/workspaces/actions';
24import WorkspaceDrawer from '../../features/workspaces/components/WorkspaceDrawer'; 24import WorkspaceDrawer from '../../features/workspaces/components/WorkspaceDrawer';
25import { workspaceStore } from '../../features/workspaces'; 25import { workspaceStore } from '../../features/workspaces';
26import { announcementsStore } from '../../features/announcements';
27 26
28export default @inject('stores', 'actions') @observer class AppLayoutContainer extends Component { 27export default @inject('stores', 'actions') @observer class AppLayoutContainer extends Component {
29 static defaultProps = { 28 static defaultProps = {
@@ -151,7 +150,6 @@ export default @inject('stores', 'actions') @observer class AppLayoutContainer e
151 areRequiredRequestsLoading={requests.areRequiredRequestsLoading} 150 areRequiredRequestsLoading={requests.areRequiredRequestsLoading}
152 darkMode={settings.all.app.darkMode} 151 darkMode={settings.all.app.darkMode}
153 isDelayAppScreenVisible={delayAppState.isDelayAppScreenVisible} 152 isDelayAppScreenVisible={delayAppState.isDelayAppScreenVisible}
154 isAnnouncementVisible={announcementsStore.isAnnouncementVisible}
155 > 153 >
156 {React.Children.count(children) > 0 ? children : null} 154 {React.Children.count(children) > 0 ? children : null}
157 </AppLayout> 155 </AppLayout>
diff --git a/src/features/announcements/components/AnnouncementScreen.js b/src/features/announcements/components/AnnouncementScreen.js
index dfce6cdd5..e7c5fe395 100644
--- a/src/features/announcements/components/AnnouncementScreen.js
+++ b/src/features/announcements/components/AnnouncementScreen.js
@@ -268,7 +268,7 @@ class AnnouncementScreen extends Component {
268 <div className={classes.changelog}> 268 <div className={classes.changelog}>
269 <h1 className={classes.headline}> 269 <h1 className={classes.headline}>
270 {intl.formatMessage(messages.headline, { 270 {intl.formatMessage(messages.headline, {
271 version: announcementsStore.currentVersion, 271 version: announcementsStore.targetVersion,
272 })} 272 })}
273 </h1> 273 </h1>
274 <div 274 <div
diff --git a/src/features/announcements/index.js b/src/features/announcements/index.js
index 4658b976f..f14e7c9a5 100644
--- a/src/features/announcements/index.js
+++ b/src/features/announcements/index.js
@@ -7,6 +7,10 @@ export const GA_CATEGORY_ANNOUNCEMENTS = 'Announcements';
7 7
8export const announcementsStore = new AnnouncementsStore(); 8export const announcementsStore = new AnnouncementsStore();
9 9
10export const ANNOUNCEMENTS_ROUTES = {
11 TARGET: '/announcements/:id',
12};
13
10export default function initAnnouncements(stores, actions) { 14export default function initAnnouncements(stores, actions) {
11 // const { features } = stores; 15 // const { features } = stores;
12 16
diff --git a/src/features/announcements/store.js b/src/features/announcements/store.js
index 6e7ca1dd7..0d2b68ccf 100644
--- a/src/features/announcements/store.js
+++ b/src/features/announcements/store.js
@@ -2,18 +2,18 @@ import {
2 action, 2 action,
3 computed, 3 computed,
4 observable, 4 observable,
5 reaction,
6} from 'mobx'; 5} from 'mobx';
7import semver from 'semver'; 6import semver from 'semver';
8import localStorage from 'mobx-localstorage'; 7import localStorage from 'mobx-localstorage';
9 8
10import { FeatureStore } from '../utils/FeatureStore'; 9import { FeatureStore } from '../utils/FeatureStore';
11import { GA_CATEGORY_ANNOUNCEMENTS } from '.'; 10import { ANNOUNCEMENTS_ROUTES, GA_CATEGORY_ANNOUNCEMENTS } from '.';
12import { getAnnouncementRequest, getChangelogRequest, getCurrentVersionRequest } from './api'; 11import { getAnnouncementRequest, getChangelogRequest, getCurrentVersionRequest } from './api';
13import { announcementActions } from './actions'; 12import { announcementActions } from './actions';
14import { createActionBindings } from '../utils/ActionBinding'; 13import { createActionBindings } from '../utils/ActionBinding';
15import { createReactions } from '../../stores/lib/Reaction'; 14import { createReactions } from '../../stores/lib/Reaction';
16import { gaEvent } from '../../lib/analytics'; 15import { gaEvent } from '../../lib/analytics';
16import { matchRoute } from '../../helpers/routing-helpers';
17 17
18const LOCAL_STORAGE_KEY = 'announcements'; 18const LOCAL_STORAGE_KEY = 'announcements';
19 19
@@ -22,8 +22,6 @@ const debug = require('debug')('Franz:feature:announcements:store');
22export class AnnouncementsStore extends FeatureStore { 22export class AnnouncementsStore extends FeatureStore {
23 @observable targetVersion = null; 23 @observable targetVersion = null;
24 24
25 @observable isAnnouncementVisible = false;
26
27 @observable isFeatureActive = false; 25 @observable isFeatureActive = false;
28 26
29 @computed get changelog() { 27 @computed get changelog() {
@@ -67,8 +65,9 @@ export class AnnouncementsStore extends FeatureStore {
67 ])); 65 ]));
68 66
69 this._reactions = createReactions([ 67 this._reactions = createReactions([
70 this._fetchAnnouncements, 68 this._showAnnouncementOnRouteMatch,
71 this._showAnnouncementToUsersWhoUpdatedApp, 69 this._showAnnouncementToUsersWhoUpdatedApp,
70 this._fetchAnnouncements,
72 ]); 71 ]);
73 this._registerReactions(this._reactions); 72 this._registerReactions(this._reactions);
74 this.isFeatureActive = true; 73 this.isFeatureActive = true;
@@ -78,7 +77,6 @@ export class AnnouncementsStore extends FeatureStore {
78 super.stop(); 77 super.stop();
79 debug('AnnouncementsStore::stop'); 78 debug('AnnouncementsStore::stop');
80 this.isFeatureActive = false; 79 this.isFeatureActive = false;
81 this.isAnnouncementVisible = false;
82 } 80 }
83 81
84 // ======= HELPERS ======= // 82 // ======= HELPERS ======= //
@@ -93,33 +91,23 @@ export class AnnouncementsStore extends FeatureStore {
93 // ======= ACTIONS ======= // 91 // ======= ACTIONS ======= //
94 92
95 @action _showAnnouncement = ({ targetVersion } = {}) => { 93 @action _showAnnouncement = ({ targetVersion } = {}) => {
96 if (!this.areNewsAvailable) return; 94 const { router } = this.stores;
97 this.targetVersion = targetVersion || this.currentVersion; 95 this.targetVersion = targetVersion || this.currentVersion;
98 this.isAnnouncementVisible = true;
99 this.actions.service.blurActive();
100 this._updateSettings({ 96 this._updateSettings({
101 lastSeenAnnouncementVersion: this.currentVersion, 97 lastSeenAnnouncementVersion: this.currentVersion,
102 }); 98 });
103 const dispose = reaction( 99 const targetRoute = `/announcements/${this.targetVersion}`;
104 () => this.stores.services.active, 100 if (router.location.pathname !== targetRoute) {
105 () => { 101 this.stores.router.push(targetRoute);
106 this._hideAnnouncement(); 102 }
107 dispose();
108 },
109 );
110
111 gaEvent(GA_CATEGORY_ANNOUNCEMENTS, 'show'); 103 gaEvent(GA_CATEGORY_ANNOUNCEMENTS, 'show');
112 }; 104 };
113 105
114 @action _hideAnnouncement() {
115 this.isAnnouncementVisible = false;
116 }
117
118 // ======= REACTIONS ======== 106 // ======= REACTIONS ========
119 107
120 _showAnnouncementToUsersWhoUpdatedApp = () => { 108 _showAnnouncementToUsersWhoUpdatedApp = () => {
121 const { announcement, isNewUser } = this; 109 const { announcement, isNewUser } = this;
122 // Check if there is an announcement and on't show announcements to new users 110 // Check if there is an announcement and don't show announcements to new users
123 if (!announcement || isNewUser) return; 111 if (!announcement || isNewUser) return;
124 112
125 // Check if the user has already used current version (= has seen the announcement) 113 // Check if the user has already used current version (= has seen the announcement)
@@ -134,11 +122,15 @@ export class AnnouncementsStore extends FeatureStore {
134 const targetVersion = this.targetVersion || this.currentVersion; 122 const targetVersion = this.targetVersion || this.currentVersion;
135 if (!targetVersion) return; 123 if (!targetVersion) return;
136 getChangelogRequest.execute(targetVersion); 124 getChangelogRequest.execute(targetVersion);
137 // We only fetch announcements for current / older versions 125 getAnnouncementRequest.execute(targetVersion);
138 if (targetVersion <= this.currentVersion) { 126 };
139 getAnnouncementRequest.execute(targetVersion); 127
140 } else { 128 _showAnnouncementOnRouteMatch = () => {
141 getAnnouncementRequest.reset(); 129 const { router } = this.stores;
130 const match = matchRoute(ANNOUNCEMENTS_ROUTES.TARGET, router.location.pathname);
131 if (match) {
132 const targetVersion = match.id;
133 this._showAnnouncement({ targetVersion });
142 } 134 }
143 } 135 }
144} 136}
diff --git a/src/features/workspaces/store.js b/src/features/workspaces/store.js
index e11513d1f..3d7043413 100644
--- a/src/features/workspaces/store.js
+++ b/src/features/workspaces/store.js
@@ -255,13 +255,15 @@ export default class WorkspacesStore extends FeatureStore {
255 _setActiveServiceOnWorkspaceSwitchReaction = () => { 255 _setActiveServiceOnWorkspaceSwitchReaction = () => {
256 if (!this.isFeatureActive) return; 256 if (!this.isFeatureActive) return;
257 if (this.activeWorkspace) { 257 if (this.activeWorkspace) {
258 const services = this.stores.services.allDisplayed; 258 const activeService = this.stores.services.active;
259 const activeService = services.find(s => s.isActive);
260 const workspaceServices = this.getWorkspaceServices(this.activeWorkspace); 259 const workspaceServices = this.getWorkspaceServices(this.activeWorkspace);
261 if (workspaceServices.length <= 0) return; 260 if (workspaceServices.length <= 0) return;
262 const isActiveServiceInWorkspace = workspaceServices.includes(activeService); 261 const isActiveServiceInWorkspace = workspaceServices.includes(activeService);
263 if (!isActiveServiceInWorkspace) { 262 if (!isActiveServiceInWorkspace) {
264 this.actions.service.setActive({ serviceId: workspaceServices[0].id }); 263 this.actions.service.setActive({
264 serviceId: workspaceServices[0].id,
265 keepActiveRoute: true,
266 });
265 } 267 }
266 } 268 }
267 }; 269 };
diff --git a/src/i18n/locales/defaultMessages.json b/src/i18n/locales/defaultMessages.json
index 632eb38fd..9524238f0 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": 30 628 "line": 29
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": 27 634 "line": 26
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": 34 641 "line": 33
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": 31 647 "line": 30
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": 38 654 "line": 37
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": 35 660 "line": 34
661 } 661 }
662 }, 662 },
663 { 663 {
664 "defaultMessage": "!!!Changelog", 664 "defaultMessage": "!!!Changelog",
665 "end": { 665 "end": {
666 "column": 3, 666 "column": 3,
667 "line": 42 667 "line": 41
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": 39 673 "line": 38
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": 46 680 "line": 45
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": 43 686 "line": 42
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": 50 693 "line": 49
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": 47 699 "line": 46
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 26b8ce040..4dd354afc 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": 27, 7 "line": 26,
8 "column": 19 8 "column": 19
9 }, 9 },
10 "end": { 10 "end": {
11 "line": 30, 11 "line": 29,
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": 31, 20 "line": 30,
21 "column": 19 21 "column": 19
22 }, 22 },
23 "end": { 23 "end": {
24 "line": 34, 24 "line": 33,
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": 35, 33 "line": 34,
34 "column": 24 34 "column": 24
35 }, 35 },
36 "end": { 36 "end": {
37 "line": 38, 37 "line": 37,
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": 39, 46 "line": 38,
47 "column": 13 47 "column": 13
48 }, 48 },
49 "end": { 49 "end": {
50 "line": 42, 50 "line": 41,
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": 43, 59 "line": 42,
60 "column": 23 60 "column": 23
61 }, 61 },
62 "end": { 62 "end": {
63 "line": 46, 63 "line": 45,
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": 47, 72 "line": 46,
73 "column": 26 73 "column": 26
74 }, 74 },
75 "end": { 75 "end": {
76 "line": 50, 76 "line": 49,
77 "column": 3 77 "column": 3
78 } 78 }
79 } 79 }
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js
index 13f929c2f..17150a023 100644
--- a/src/stores/ServicesStore.js
+++ b/src/stores/ServicesStore.js
@@ -291,7 +291,8 @@ export default class ServicesStore extends Store {
291 gaEvent('Service', 'clear cache'); 291 gaEvent('Service', 'clear cache');
292 } 292 }
293 293
294 @action _setActive({ serviceId }) { 294 @action _setActive({ serviceId, keepActiveRoute }) {
295 if (!keepActiveRoute) this.stores.router.push('/');
295 const service = this.one(serviceId); 296 const service = this.one(serviceId);
296 297
297 this.all.forEach((s, index) => { 298 this.all.forEach((s, index) => {