summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rw-r--r--webapp/Makefile5
-rw-r--r--webapp/components/permalink_view.jsx11
-rw-r--r--webapp/components/posts_view.jsx1
-rw-r--r--webapp/i18n/es.json1
-rw-r--r--webapp/package.json3
-rw-r--r--webapp/utils/delayed_action.jsx4
-rw-r--r--webapp/webpack.config.js12
8 files changed, 36 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index af5214388..0889dab31 100644
--- a/Makefile
+++ b/Makefile
@@ -185,8 +185,15 @@ run-client:
cd $(BUILD_WEBAPP_DIR) && $(MAKE) run
+run-client-fullmap:
+ @echo Running mattermost client for development with FULL SOURCE MAP
+
+ cd $(BUILD_WEBAPP_DIR) && $(MAKE) run-fullmap
+
run: run-server run-client
+run-fullmap: run-server run-client-fullmap
+
stop-server:
@echo Stopping mattermost
diff --git a/webapp/Makefile b/webapp/Makefile
index 4cc9be1d3..6ec75d1df 100644
--- a/webapp/Makefile
+++ b/webapp/Makefile
@@ -22,6 +22,11 @@ run: .npminstall
npm run run &
+run-fullmap: .npminstall
+ @echo FULL SOURCE MAP Running mattermost Webapp for development FULL SOURCE MAP
+
+ npm run run-fullmap &
+
stop:
@echo Stopping changes watching
diff --git a/webapp/components/permalink_view.jsx b/webapp/components/permalink_view.jsx
index 8e49019ee..2ebe52356 100644
--- a/webapp/components/permalink_view.jsx
+++ b/webapp/components/permalink_view.jsx
@@ -28,18 +28,19 @@ export default class PermalinkView extends React.Component {
const channel = ChannelStore.getCurrent();
const channelId = channel ? channel.id : '';
const channelName = channel ? channel.name : '';
- const teamURL = TeamStore.getCurrentTeamUrl();
+ const team = TeamStore.getCurrent();
+ const teamName = team ? team.name : '';
const profiles = JSON.parse(JSON.stringify(UserStore.getProfiles()));
return {
channelId,
channelName,
profiles,
- teamURL,
+ teamName,
postId
};
}
isStateValid() {
- return this.state.channelId !== '' && this.state.profiles && this.state.teamURL;
+ return this.state.channelId !== '' && this.state.profiles && this.state.teamName;
}
updateState() {
this.setState(this.getStateFromStores(this.props));
@@ -64,7 +65,7 @@ export default class PermalinkView extends React.Component {
return true;
}
- if (nextState.teamURL !== this.state.teamURL) {
+ if (nextState.teamName !== this.state.teamName) {
return true;
}
@@ -87,7 +88,7 @@ export default class PermalinkView extends React.Component {
id='archive-link-home'
>
<Link
- to={this.state.teamURL + '/channels/' + this.state.channelName}
+ to={'/' + this.state.teamName + '/channels/' + this.state.channelName}
>
<FormattedMessage
id='center_panel.recent'
diff --git a/webapp/components/posts_view.jsx b/webapp/components/posts_view.jsx
index e034a592e..647c7f086 100644
--- a/webapp/components/posts_view.jsx
+++ b/webapp/components/posts_view.jsx
@@ -384,6 +384,7 @@ export default class PostsView extends React.Component {
}
componentWillUnmount() {
window.removeEventListener('resize', this.handleResize);
+ this.scrollStopAction.cancel();
}
componentDidUpdate() {
if (this.props.postList != null) {
diff --git a/webapp/i18n/es.json b/webapp/i18n/es.json
index 20b79fc84..c2b56e1cc 100644
--- a/webapp/i18n/es.json
+++ b/webapp/i18n/es.json
@@ -1238,6 +1238,7 @@
"user.settings.display.theme.customTheme": "Tema Personalizado",
"user.settings.display.theme.describe": "Abrir para administrar tu tema",
"user.settings.display.theme.import": "Importar colores del tema desde Slack",
+ "user.settings.display.theme.otherThemes": "Ver otros temas",
"user.settings.display.theme.themeColors": "Colores del Tema",
"user.settings.display.theme.title": "Tema",
"user.settings.display.title": "ConfiguraciĆ³n de VisualizaciĆ³n",
diff --git a/webapp/package.json b/webapp/package.json
index 6f50962a4..af375def9 100644
--- a/webapp/package.json
+++ b/webapp/package.json
@@ -56,6 +56,7 @@
"scripts": {
"check": "eslint --ext \".jsx\" --ignore-pattern node_modules --quiet .",
"build": "webpack",
- "run": "webpack --progress --watch"
+ "run": "webpack --progress --watch",
+ "run-fullmap": "webpack --progress --watch"
}
}
diff --git a/webapp/utils/delayed_action.jsx b/webapp/utils/delayed_action.jsx
index 4f6239ad0..c3b164733 100644
--- a/webapp/utils/delayed_action.jsx
+++ b/webapp/utils/delayed_action.jsx
@@ -24,4 +24,8 @@ export default class DelayedAction {
this.timer = window.setTimeout(this.fire, timeout);
}
+
+ cancel() {
+ window.clearTimeout(this.timer);
+ }
}
diff --git a/webapp/webpack.config.js b/webapp/webpack.config.js
index ee5c7e70b..a049898d6 100644
--- a/webapp/webpack.config.js
+++ b/webapp/webpack.config.js
@@ -8,8 +8,12 @@ const htmlExtract = new ExtractTextPlugin('html', 'root.html');
const NPM_TARGET = process.env.npm_lifecycle_event; //eslint-disable-line no-process-env
var DEV = false;
-if (NPM_TARGET === 'run') {
+var FULLMAP = false;
+if (NPM_TARGET === 'run' || NPM_TARGET === 'run-fullmap') {
DEV = true;
+ if (NPM_TARGET === 'run-fullmap') {
+ FULLMAP = true;
+ }
}
var config = {
@@ -94,7 +98,11 @@ var config = {
// Development mode configuration
if (DEV) {
- config.devtool = 'eval-cheap-module-source-map';
+ if (FULLMAP) {
+ config.devtool = 'source-map';
+ } else {
+ config.devtool = 'eval-cheap-module-source-map';
+ }
}
// Production mode configuration