Minor styling improvements to the file sharing tab

This commit is contained in:
Torjus
2018-07-30 16:33:06 +02:00
parent 6042d305ac
commit fbe509b930
11 changed files with 130 additions and 56 deletions
+1 -2
View File
@@ -1,7 +1,6 @@
import
{
createNewMessage,
createNewFile
createNewMessage
} from './helper';
const chatmessages = (state = [], action) =>
+9 -9
View File
@@ -1,16 +1,16 @@
const sharing = (state = [], action) =>
{
switch (action.type)
{
case 'SEND_FILE':
return [ ...state, { ...action.payload, me: true }];
switch (action.type)
{
case 'SEND_FILE':
return [ ...state, { ...action.payload, me: true } ];
case 'ADD_FILE':
return [ ...state, action.payload ];
case 'ADD_FILE':
return [ ...state, action.payload ];
default:
return state;
}
default:
return state;
}
};
export default sharing;
+3 -4
View File
@@ -2,8 +2,7 @@ import randomString from 'random-string';
import * as stateActions from './stateActions';
import
{
createNewMessage,
createNewFile
createNewMessage
} from './reducers/helper';
export const joinRoom = (
@@ -217,8 +216,8 @@ export const sendChatMessage = (text, name, picture) =>
export const sendFile = (file, name, picture) =>
{
return {
type: 'SEND_FILE',
payload: { file, name, picture }
type : 'SEND_FILE',
payload : { file, name, picture }
};
};
+1 -1
View File
@@ -444,7 +444,7 @@ export const dropMessages = () =>
export const addFile = (payload) =>
{
return {
type: 'ADD_FILE',
type : 'ADD_FILE',
payload
};
};