Skip to content

Commit

Permalink
Regression: setup wizard dynamic import using relative url (#15432)
Browse files Browse the repository at this point in the history
* fix dynamic import on setup wizard

* Update packages/rocketchat-i18n/i18n/en.i18n.json

Co-Authored-By: Aaron Ogle <geekgonecrazy@users.noreply.github.com>

* Update en.i18n.json
  • Loading branch information
ggazzo committed Sep 24, 2019
1 parent 9251902 commit 8ea1a91
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
25 changes: 21 additions & 4 deletions client/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import { Session } from 'meteor/session';

import { KonchatNotification } from '../app/ui';
import { ChatSubscription } from '../app/models';
import { roomTypes } from '../app/utils';
import { call } from '../app/ui-utils';
import { roomTypes, t } from '../app/utils';
import { baseURI } from '../app/utils/client/lib/baseuri';
import { call, modal } from '../app/ui-utils';

const getRoomById = mem((rid) => call('getRoomById', rid));

Expand Down Expand Up @@ -212,8 +213,24 @@ FlowRouter.route('/register/:hash', {
FlowRouter.route('/setup-wizard/:step?', {
name: 'setup-wizard',
action: async () => {
const { SetupWizard } = await import('./components/setupWizard/SetupWizard');
BlazeLayout.render(await createTemplateForComponent(SetupWizard));
const render = async () => {
const { SetupWizard } = await import('./components/setupWizard/SetupWizard');
BlazeLayout.render(await createTemplateForComponent(SetupWizard));
};
try {
await render();
} catch (_) {
Meteor.absoluteUrl.defaultOptions = { ...Meteor.absoluteUrl.defaultOptions, rootUrl: baseURI };
try {
await render();
} catch (_) {
modal.open({
title: t('Error_Site_URL'),
text: t('Error_Site_URL_description'),
confirmButtonText: t('Ok'),
});
}
}
},
});

Expand Down
2 changes: 2 additions & 0 deletions packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1310,6 +1310,8 @@
"error-role-in-use": "Cannot delete role because it's in use",
"error-role-name-required": "Role name is required",
"error-room-is-not-closed": "Room is not closed",
"Error_Site_URL": "Invalid Site_Url",
"Error_Site_URL_description": "Please, update your \"Site_Url\" setting find more information <a target=\"_blank\" href=\"https://go.rocket.chat/i/invalid-site-url\">here</>",
"error-the-field-is-required": "The field __field__ is required.",
"error-this-is-not-a-livechat-room": "This is not a Livechat room",
"error-personal-access-tokens-are-current-disabled": "Personal Access Tokens are currently disabled",
Expand Down

0 comments on commit 8ea1a91

Please sign in to comment.