mirror of
https://git.kescher.at/CatCatNya/catstodon.git
synced 2024-11-24 02:18:07 +01:00
4f42238c29
* Action/reducer for changing column settings takes a path and a value instead of a javascript object * Settings menu version and column headline version working simultaneously * remove column headline entirely * remove css for headlines that aren't possible now * Remove commented out code from unfruitful attempt at this feature * Give direct timeline its own column settings bc it doesn't have a media only option * Fix typo in public timeline code that was preventing per-column settings from working properly * Fix codeclimate issues * Missing semicolons * Use redux state to set onlyMedia, let that do the update instead of a callback. Consequently, unpinned setting works without history modification * Unused import
54 lines
992 B
JavaScript
54 lines
992 B
JavaScript
import { saveSettings } from './settings';
|
|
|
|
export const COLUMN_ADD = 'COLUMN_ADD';
|
|
export const COLUMN_REMOVE = 'COLUMN_REMOVE';
|
|
export const COLUMN_MOVE = 'COLUMN_MOVE';
|
|
export const COLUMN_PARAMS_CHANGE = 'COLUMN_PARAMS_CHANGE';
|
|
|
|
export function addColumn(id, params) {
|
|
return dispatch => {
|
|
dispatch({
|
|
type: COLUMN_ADD,
|
|
id,
|
|
params,
|
|
});
|
|
|
|
dispatch(saveSettings());
|
|
};
|
|
};
|
|
|
|
export function removeColumn(uuid) {
|
|
return dispatch => {
|
|
dispatch({
|
|
type: COLUMN_REMOVE,
|
|
uuid,
|
|
});
|
|
|
|
dispatch(saveSettings());
|
|
};
|
|
};
|
|
|
|
export function moveColumn(uuid, direction) {
|
|
return dispatch => {
|
|
dispatch({
|
|
type: COLUMN_MOVE,
|
|
uuid,
|
|
direction,
|
|
});
|
|
|
|
dispatch(saveSettings());
|
|
};
|
|
};
|
|
|
|
export function changeColumnParams(uuid, path, value) {
|
|
return dispatch => {
|
|
dispatch({
|
|
type: COLUMN_PARAMS_CHANGE,
|
|
uuid,
|
|
path,
|
|
value,
|
|
});
|
|
|
|
dispatch(saveSettings());
|
|
};
|
|
}
|