diff options
author | Tim Zallmann <tzallmann@gitlab.com> | 2017-12-06 14:27:25 +0100 |
---|---|---|
committer | Tim Zallmann <tzallmann@gitlab.com> | 2017-12-19 12:26:02 +0100 |
commit | fb18190c84714ca5eb24c932ceb7eaa035fb5885 (patch) | |
tree | 8c8c817d653b033f1ce32b7b22eeeae743e95ef8 | |
parent | 179b05771100a603ba84164fd0b699ef40f9b47c (diff) | |
download | gitlab-ce-fb18190c84714ca5eb24c932ceb7eaa035fb5885.tar.gz |
Added Collapsed Actions/Mutations
-rw-r--r-- | app/assets/javascripts/ide/stores/actions.js | 8 | ||||
-rw-r--r-- | app/assets/javascripts/ide/stores/mutation_types.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/ide/stores/mutations.js | 10 |
3 files changed, 20 insertions, 0 deletions
diff --git a/app/assets/javascripts/ide/stores/actions.js b/app/assets/javascripts/ide/stores/actions.js index af4bc4b2e19..fd9a4d975cf 100644 --- a/app/assets/javascripts/ide/stores/actions.js +++ b/app/assets/javascripts/ide/stores/actions.js @@ -50,6 +50,14 @@ export const toggleBlobView = ({ commit, state }) => { } }; +export const setLeftBarCollapsedStatus = ({ commit, state }, collapsed) => { + commit(types.SET_LEFT_BAR_COLLAPSED, collapsed); +}; + +export const setRightBarCollapsedStatus = ({ commit, state }, collapsed) => { + commit(types.SET_RIGHT_BAR_COLLAPSED, collapsed); +}; + export const checkCommitStatus = ({ state }) => service.getBranchData( state.currentProjectId, state.currentBranchId, diff --git a/app/assets/javascripts/ide/stores/mutation_types.js b/app/assets/javascripts/ide/stores/mutation_types.js index 154e1017756..b0bab6f7269 100644 --- a/app/assets/javascripts/ide/stores/mutation_types.js +++ b/app/assets/javascripts/ide/stores/mutation_types.js @@ -4,6 +4,8 @@ export const SET_COMMIT_REF = 'SET_COMMIT_REF'; export const SET_PARENT_TREE_URL = 'SET_PARENT_TREE_URL'; export const SET_ROOT = 'SET_ROOT'; export const SET_LAST_COMMIT_DATA = 'SET_LAST_COMMIT_DATA'; +export const SET_LEFT_BAR_COLLAPSED = 'SET_LEFT_BAR_COLLAPSED'; +export const SET_RIGHT_BAR_COLLAPSED = 'SET_RIGHT_BAR_COLLAPSED'; // Project Mutation Types export const SET_PROJECT = 'SET_PROJECT'; diff --git a/app/assets/javascripts/ide/stores/mutations.js b/app/assets/javascripts/ide/stores/mutations.js index 2e68a24ca91..030f3bde00c 100644 --- a/app/assets/javascripts/ide/stores/mutations.js +++ b/app/assets/javascripts/ide/stores/mutations.js @@ -44,6 +44,16 @@ export default { isInitialRoot: isRoot, }); }, + [types.SET_LEFT_BAR_COLLAPSED](state, collapsed) { + Object.assign(state, { + leftBarCollapsed: collapsed, + }); + }, + [types.SET_RIGHT_BAR_COLLAPSED](state, collapsed) { + Object.assign(state, { + rightBarCollapsed: collapsed, + }); + }, [types.SET_LAST_COMMIT_DATA](state, { entry, lastCommit }) { Object.assign(entry.lastCommit, { id: lastCommit.commit.id, |