Persist UI settings, add missing localizations for German
This commit is contained in:
@@ -14,8 +14,6 @@ export const NOTIFICATIONS_EXPAND_REQUEST = 'NOTIFICATIONS_EXPAND_REQUEST';
|
||||
export const NOTIFICATIONS_EXPAND_SUCCESS = 'NOTIFICATIONS_EXPAND_SUCCESS';
|
||||
export const NOTIFICATIONS_EXPAND_FAIL = 'NOTIFICATIONS_EXPAND_FAIL';
|
||||
|
||||
export const NOTIFICATIONS_SETTING_CHANGE = 'NOTIFICATIONS_SETTING_CHANGE';
|
||||
|
||||
const fetchRelatedRelationships = (dispatch, notifications) => {
|
||||
const accountIds = notifications.filter(item => item.type === 'follow').map(item => item.account.id);
|
||||
|
||||
@@ -133,11 +131,3 @@ export function expandNotificationsFail(error) {
|
||||
error
|
||||
};
|
||||
};
|
||||
|
||||
export function changeNotificationsSetting(key, checked) {
|
||||
return {
|
||||
type: NOTIFICATIONS_SETTING_CHANGE,
|
||||
key,
|
||||
checked
|
||||
};
|
||||
};
|
||||
|
17
app/assets/javascripts/components/actions/settings.jsx
Normal file
17
app/assets/javascripts/components/actions/settings.jsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import axios from 'axios';
|
||||
|
||||
export const SETTING_CHANGE = 'SETTING_CHANGE';
|
||||
|
||||
export function changeSetting(key, value) {
|
||||
return (dispatch, getState) => {
|
||||
dispatch({
|
||||
type: SETTING_CHANGE,
|
||||
key,
|
||||
value
|
||||
});
|
||||
|
||||
axios.put('/api/web/settings', {
|
||||
data: getState().get('settings').toJS()
|
||||
});
|
||||
};
|
||||
};
|
Reference in New Issue
Block a user