mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-08-03 16:04:30 +00:00
36 lines
842 B
JavaScript
36 lines
842 B
JavaScript
import Vue from 'vue';
|
|
// eslint-disable-next-line no-restricted-imports
|
|
import Vuex from 'vuex';
|
|
import batchCommentsModule from '~/batch_comments/stores/modules/batch_comments';
|
|
import diffsModule from '~/diffs/store/modules';
|
|
import notesModule from '~/notes/stores/modules';
|
|
import findingsDrawer from '~/mr_notes/stores/drawer';
|
|
|
|
Vue.use(Vuex);
|
|
|
|
export default function createDiffsStore({ actions = {} } = {}) {
|
|
const diffs = diffsModule();
|
|
|
|
if (actions.diffs) {
|
|
diffs.actions = {
|
|
...diffs.actions,
|
|
...actions.diffs,
|
|
};
|
|
}
|
|
|
|
return new Vuex.Store({
|
|
modules: {
|
|
page: {
|
|
namespaced: true,
|
|
state: {
|
|
activeTab: 'notes',
|
|
},
|
|
},
|
|
diffs,
|
|
notes: notesModule(),
|
|
batchComments: batchCommentsModule(),
|
|
findingsDrawer: findingsDrawer(),
|
|
},
|
|
});
|
|
}
|