mirror of https://github.com/rancher/dashboard.git
27 lines
536 B
TypeScript
27 lines
536 B
TypeScript
interface State {
|
|
createNamespace: boolean;
|
|
}
|
|
|
|
export const state = (): State => {
|
|
return { createNamespace: false };
|
|
};
|
|
|
|
export const mutations = {
|
|
SET_CREATE_NAMESPACE(state: State, shouldCreateNamespace: boolean): void {
|
|
state.createNamespace = shouldCreateNamespace;
|
|
}
|
|
};
|
|
|
|
export const actions = {
|
|
setCreateNamespace({ commit }: unknown, shouldCreateNamespace: boolean): void {
|
|
commit('SET_CREATE_NAMESPACE', shouldCreateNamespace);
|
|
}
|
|
};
|
|
|
|
export default {
|
|
namespaced: true,
|
|
state,
|
|
mutations,
|
|
actions,
|
|
};
|