mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
add draggingHistoryItem to history store
This commit is contained in:
@@ -19,6 +19,7 @@ const state = {
|
||||
// histories for current user
|
||||
histories: {},
|
||||
historiesLoading: false,
|
||||
draggingHistoryItem: null,
|
||||
};
|
||||
|
||||
const mutations = {
|
||||
@@ -54,6 +55,9 @@ const mutations = {
|
||||
setHistoriesLoading(state, isLoading) {
|
||||
state.historiesLoading = isLoading;
|
||||
},
|
||||
setDraggingHistoryItem(state, item) {
|
||||
state.draggingHistoryItem = item;
|
||||
},
|
||||
};
|
||||
|
||||
const getters = {
|
||||
@@ -89,6 +93,9 @@ const getters = {
|
||||
historiesLoading: (state) => {
|
||||
return state.historiesLoading;
|
||||
},
|
||||
getDraggingHistoryItem: (state) => {
|
||||
return state.draggingHistoryItem;
|
||||
},
|
||||
};
|
||||
|
||||
// flags to keep track of loading states
|
||||
@@ -173,6 +180,9 @@ const actions = {
|
||||
const saveResult = await updateHistoryFields(id, updateFields);
|
||||
commit("setHistory", saveResult);
|
||||
},
|
||||
setDraggingHistoryItem({ commit }, item) {
|
||||
commit("setDraggingHistoryItem", item);
|
||||
},
|
||||
};
|
||||
|
||||
export const historyStore = {
|
||||
|
||||
Reference in New Issue
Block a user