Compare commits

...

3 Commits

2 changed files with 16 additions and 1 deletions

Binary file not shown.

View File

@ -1,8 +1,9 @@
import { UPDATE_SETTING, RESTORE_DEFAULT_SETTINGS } from '../actions';
import { REHYDRATE } from 'redux-persist/constants'
const defaultState = {
// Modules BSSID filter
bssidFilter: ["fc:db:b3", "90:b6:86", "28:ed:e0"],
bssidFilter: ["fc:db:b3", "90:b6:86", "28:ed:e0", "6c:21:a2"],
// Modules WiFi password
wifiPassword: 'emlidreach',
useNotebookGPS: false,
@ -12,6 +13,20 @@ const defaultState = {
export default function settingsReducer(state = defaultState, action) {
switch(action.type) {
case REHYDRATE:
const {
wifiPassword, bssidFilter,
useNotebookGPS, autoFollow,
nomenclaturesURL
} = action.payload.settings;
return {
...state,
wifiPassword,
useNotebookGPS,
autoFollow,
nomenclaturesURL,
bssidFilter: [...new Set([...state.bssidFilter ,...bssidFilter])],
};
case UPDATE_SETTING:
return {
...state,