mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
PLT-6262 Add config setting to disable file attachments (#6301)
* Add config setting to disable file attachments * Add unit tests * Updating UI for no attachments (#6312) * Update UI text on file upload System Console setting (#6313) * Update storage_settings.jsx * Update en.json
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See License.txt for license information.
|
||||
|
||||
import BrowserStore from 'stores/browser_store.jsx';
|
||||
import UserStore from 'stores/user_store.jsx';
|
||||
import TeamStore from 'stores/team_store.jsx';
|
||||
|
||||
@@ -21,6 +20,12 @@ const callTracker = {};
|
||||
|
||||
const ASYNC_CLIENT_TIMEOUT = 5000;
|
||||
|
||||
// Redux actions
|
||||
import store from 'stores/redux_store.jsx';
|
||||
const dispatch = store.dispatch;
|
||||
const getState = store.getState;
|
||||
import {setServerVersion} from 'mattermost-redux/actions/general';
|
||||
|
||||
export function dispatchError(err, method) {
|
||||
AppDispatcher.handleServerAction({
|
||||
type: ActionTypes.RECEIVED_ERROR,
|
||||
@@ -47,17 +52,7 @@ function isCallInProgress(callName) {
|
||||
}
|
||||
|
||||
export function checkVersion() {
|
||||
var serverVersion = Client.getServerVersion();
|
||||
|
||||
if (serverVersion !== BrowserStore.getLastServerVersion()) {
|
||||
if (!BrowserStore.getLastServerVersion() || BrowserStore.getLastServerVersion() === '') {
|
||||
BrowserStore.setLastServerVersion(serverVersion);
|
||||
} else {
|
||||
BrowserStore.setLastServerVersion(serverVersion);
|
||||
window.location.reload(true);
|
||||
console.log('Detected version update refreshing the page'); //eslint-disable-line no-console
|
||||
}
|
||||
}
|
||||
setServerVersion(Client.getServerVersion())(dispatch, getState);
|
||||
}
|
||||
|
||||
export function getUser(userId, success, error) {
|
||||
|
||||
Reference in New Issue
Block a user