debian-mirror-gitlab/spec/javascripts/ide/helpers.js

23 lines
477 B
JavaScript
Raw Normal View History

2018-05-09 12:01:36 +05:30
import { decorateData } from '~/ide/stores/utils';
import state from '~/ide/stores/state';
import commitState from '~/ide/stores/modules/commit/state';
export const resetStore = store => {
const newState = {
...state(),
commit: commitState(),
};
store.replaceState(newState);
};
export const file = (name = 'name', id = name, type = '') =>
decorateData({
id,
type,
icon: 'icon',
url: 'url',
name,
path: name,
lastCommit: {},
});