summaryrefslogtreecommitdiffstats
path: root/webapp
diff options
context:
space:
mode:
Diffstat (limited to 'webapp')
-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/components/sidebar.jsx4
-rw-r--r--webapp/dispatcher/app_dispatcher.jsx4
-rw-r--r--webapp/i18n/es.json1
-rw-r--r--webapp/package.json3
-rw-r--r--webapp/stores/browser_store.jsx10
-rw-r--r--webapp/stores/post_store.jsx4
-rw-r--r--webapp/utils/constants.jsx1
-rw-r--r--webapp/utils/delayed_action.jsx4
-rw-r--r--webapp/webpack.config.js12
12 files changed, 39 insertions, 21 deletions
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/components/sidebar.jsx b/webapp/components/sidebar.jsx
index bf51fa102..45bca7212 100644
--- a/webapp/components/sidebar.jsx
+++ b/webapp/components/sidebar.jsx
@@ -440,9 +440,9 @@ export default class Sidebar extends React.Component {
let link = '';
if (channel.fake) {
- link = TeamStore.getCurrentTeamUrl() + '/channels/' + channel.name + '?fakechannel=' + encodeURIComponent(JSON.stringify(channel));
+ link = '/' + this.state.currentTeam.name + '/channels/' + channel.name + '?fakechannel=' + encodeURIComponent(JSON.stringify(channel));
} else {
- link = TeamStore.getCurrentTeamUrl() + '/channels/' + channel.name;
+ link = '/' + this.state.currentTeam.name + '/channels/' + channel.name;
}
return (
diff --git a/webapp/dispatcher/app_dispatcher.jsx b/webapp/dispatcher/app_dispatcher.jsx
index 987bb9c6a..5e43d3ad7 100644
--- a/webapp/dispatcher/app_dispatcher.jsx
+++ b/webapp/dispatcher/app_dispatcher.jsx
@@ -9,7 +9,7 @@ const PayloadSources = Constants.PayloadSources;
const AppDispatcher = Object.assign(new Flux.Dispatcher(), {
handleServerAction: function performServerAction(action) {
if (!action.type) {
- console.log('handleServerAction called with undefined action type'); // eslint-disable-line no-console
+ console.warning('handleServerAction called with undefined action type'); // eslint-disable-line no-console
}
var payload = {
@@ -21,7 +21,7 @@ const AppDispatcher = Object.assign(new Flux.Dispatcher(), {
handleViewAction: function performViewAction(action) {
if (!action.type) {
- console.log('handleServerAction called with undefined action type'); // eslint-disable-line no-console
+ console.warning('handleViewAction called with undefined action type'); // eslint-disable-line no-console
}
var payload = {
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 3769e9dba..01674ba1c 100644
--- a/webapp/package.json
+++ b/webapp/package.json
@@ -57,6 +57,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/stores/browser_store.jsx b/webapp/stores/browser_store.jsx
index bba146e38..d605aac80 100644
--- a/webapp/stores/browser_store.jsx
+++ b/webapp/stores/browser_store.jsx
@@ -8,7 +8,7 @@ function getPrefix() {
return global.window.mm_current_user_id + '_';
}
- console.log('BrowserStore tried to operate without user present'); //eslint-disable-line no-console
+ console.warn('BrowserStore tried to operate without user present'); //eslint-disable-line no-console
return 'unknown_';
}
@@ -144,18 +144,14 @@ class BrowserStoreClass {
* Signature for action is action(key, value)
*/
actionOnGlobalItemsWithPrefix(prefix, action) {
- var globalPrefix = getPrefix();
- var globalPrefixiLen = globalPrefix.length;
-
var storage = sessionStorage;
if (this.isLocalStorageSupported()) {
storage = localStorage;
}
for (var key in storage) {
- if (key.lastIndexOf(globalPrefix + prefix, 0) === 0) {
- var userkey = key.substring(globalPrefixiLen);
- action(userkey, this.getGlobalItem(key));
+ if (key.lastIndexOf(prefix, 0) === 0) {
+ action(key, this.getGlobalItem(key));
}
}
}
diff --git a/webapp/stores/post_store.jsx b/webapp/stores/post_store.jsx
index 757599b0f..36393f5cd 100644
--- a/webapp/stores/post_store.jsx
+++ b/webapp/stores/post_store.jsx
@@ -495,7 +495,7 @@ class PostStoreClass extends EventEmitter {
BrowserStore.actionOnGlobalItemsWithPrefix('draft_', (key, value) => {
if (value) {
value.uploadsInProgress = [];
- BrowserStore.setItem(key, value);
+ BrowserStore.setGlobalItem(key, value);
}
});
}
@@ -503,7 +503,7 @@ class PostStoreClass extends EventEmitter {
BrowserStore.actionOnGlobalItemsWithPrefix('comment_draft_', (key, value) => {
if (value) {
value.uploadsInProgress = [];
- BrowserStore.setItem(key, value);
+ BrowserStore.setGlobalItem(key, value);
}
});
}
diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx
index bcd2fadb9..642ff5fe3 100644
--- a/webapp/utils/constants.jsx
+++ b/webapp/utils/constants.jsx
@@ -68,6 +68,7 @@ export default {
RECEIVED_PREFERENCE: null,
RECEIVED_PREFERENCES: null,
RECEIVED_FILE_INFO: null,
+ RECEIVED_ANALYTICS: null,
RECEIVED_MSG: null,
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