Added App Setttings Modal
This commit is contained in:
@@ -14,7 +14,7 @@ import relationships from './relationships';
|
||||
import search from './search';
|
||||
import notifications from './notifications';
|
||||
import settings from './settings';
|
||||
import localSettings from './local_settings';
|
||||
import local_settings from './local_settings';
|
||||
import status_lists from './status_lists';
|
||||
import cards from './cards';
|
||||
import reports from './reports';
|
||||
@@ -37,7 +37,7 @@ export default combineReducers({
|
||||
search,
|
||||
notifications,
|
||||
settings,
|
||||
localSettings,
|
||||
local_settings,
|
||||
cards,
|
||||
reports,
|
||||
contexts,
|
||||
|
||||
@@ -3,7 +3,22 @@ import { STORE_HYDRATE } from '../actions/store';
|
||||
import Immutable from 'immutable';
|
||||
|
||||
const initialState = Immutable.Map({
|
||||
layout: 'auto',
|
||||
layout : 'auto',
|
||||
stretch : true,
|
||||
collapsed : {
|
||||
enabled : true,
|
||||
auto : {
|
||||
all : false,
|
||||
notifications : true,
|
||||
lengthy : true,
|
||||
replies : false,
|
||||
media : false,
|
||||
},
|
||||
backgrounds : {
|
||||
user_backgrounds : false,
|
||||
preview_images : false,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const hydrate = (state, localSettings) => state.mergeDeep(localSettings);
|
||||
@@ -11,7 +26,7 @@ const hydrate = (state, localSettings) => state.mergeDeep(localSettings);
|
||||
export default function localSettings(state = initialState, action) {
|
||||
switch(action.type) {
|
||||
case STORE_HYDRATE:
|
||||
return hydrate(state, action.state.get('localSettings'));
|
||||
return hydrate(state, action.state.get('local_settings'));
|
||||
case LOCAL_SETTING_CHANGE:
|
||||
return state.setIn(action.key, action.value);
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user