diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-30 18:12:04 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-30 18:12:04 +0300 |
commit | 93501e7509fb61b25f091d81381d3e86842a9cdd (patch) | |
tree | e11e5528450c3e3815f59c13d8799722d8d754c1 /app/assets/javascripts/mr_notes | |
parent | bfa1adf9773ba7ea7cde546ea545b72721d36faa (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/mr_notes')
6 files changed, 31 insertions, 0 deletions
diff --git a/app/assets/javascripts/mr_notes/stores/drawer/actions.js b/app/assets/javascripts/mr_notes/stores/drawer/actions.js new file mode 100644 index 00000000000..4f8c3bb7f20 --- /dev/null +++ b/app/assets/javascripts/mr_notes/stores/drawer/actions.js @@ -0,0 +1,5 @@ +import * as types from './mutation_types'; + +export const setDrawer = ({ commit }, data) => { + return commit(types.default.SET_DRAWER, data); +}; diff --git a/app/assets/javascripts/mr_notes/stores/drawer/getters.js b/app/assets/javascripts/mr_notes/stores/drawer/getters.js new file mode 100644 index 00000000000..dd61bc900fa --- /dev/null +++ b/app/assets/javascripts/mr_notes/stores/drawer/getters.js @@ -0,0 +1 @@ +export const activeDrawer = (state) => state.activeDrawer; diff --git a/app/assets/javascripts/mr_notes/stores/drawer/index.js b/app/assets/javascripts/mr_notes/stores/drawer/index.js new file mode 100644 index 00000000000..c4a7eacb78a --- /dev/null +++ b/app/assets/javascripts/mr_notes/stores/drawer/index.js @@ -0,0 +1,13 @@ +import * as actions from './actions'; +import * as getters from './getters'; +import mutations from './mutations'; + +export default () => ({ + namespaced: true, + state: { + activeDrawer: {}, + }, + mutations, + actions, + getters, +}); diff --git a/app/assets/javascripts/mr_notes/stores/drawer/mutation_types.js b/app/assets/javascripts/mr_notes/stores/drawer/mutation_types.js new file mode 100644 index 00000000000..5fe8a9ba20d --- /dev/null +++ b/app/assets/javascripts/mr_notes/stores/drawer/mutation_types.js @@ -0,0 +1,3 @@ +export default { + SET_DRAWER: 'SET_DRAWER', +}; diff --git a/app/assets/javascripts/mr_notes/stores/drawer/mutations.js b/app/assets/javascripts/mr_notes/stores/drawer/mutations.js new file mode 100644 index 00000000000..eee43f2b316 --- /dev/null +++ b/app/assets/javascripts/mr_notes/stores/drawer/mutations.js @@ -0,0 +1,7 @@ +import types from './mutation_types'; + +export default { + [types.SET_DRAWER](state, drawer) { + Object.assign(state, { activeDrawer: drawer }); + }, +}; diff --git a/app/assets/javascripts/mr_notes/stores/index.js b/app/assets/javascripts/mr_notes/stores/index.js index 7527c685c71..1f8e61beff0 100644 --- a/app/assets/javascripts/mr_notes/stores/index.js +++ b/app/assets/javascripts/mr_notes/stores/index.js @@ -4,6 +4,7 @@ import batchCommentsModule from '~/batch_comments/stores/modules/batch_comments' import diffsModule from '~/diffs/store/modules'; import notesModule from '~/notes/stores/modules'; import mrPageModule from './modules'; +import findingsDrawer from './drawer'; Vue.use(Vuex); @@ -12,6 +13,7 @@ export const createModules = () => ({ notes: notesModule(), diffs: diffsModule(), batchComments: batchCommentsModule(), + findingsDrawer: findingsDrawer(), }); export const createStore = () => |