Welcome to mirror list, hosted at ThFree Co, Russian Federation.

mutations.js « store « static_site_editor « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8b8bacf35c271eaaa65772e121f5ebede7daed52 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import * as types from './mutation_types';

export default {
  [types.LOAD_CONTENT](state) {
    state.isLoadingContent = true;
  },
  [types.RECEIVE_CONTENT_SUCCESS](state, { title, content }) {
    state.isLoadingContent = false;
    state.title = title;
    state.content = content;
    state.originalContent = content;
  },
  [types.RECEIVE_CONTENT_ERROR](state) {
    state.isLoadingContent = false;
  },
  [types.SET_CONTENT](state, content) {
    state.content = content;
  },
};