mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-01-19 07:21:19 -05:00
Feature/about api (#253)
* fix settings * app info cleanup Co-authored-by: hay-kot <hay-kot@pm.me>
This commit is contained in:
@@ -28,6 +28,10 @@ const store = new Vuex.Store({
|
||||
mealPlanCategories: [],
|
||||
allCategories: [],
|
||||
allTags: [],
|
||||
appInfo: {
|
||||
version: "",
|
||||
demoStatus: false,
|
||||
},
|
||||
},
|
||||
|
||||
mutations: {
|
||||
@@ -43,6 +47,9 @@ const store = new Vuex.Store({
|
||||
setAllTags(state, payload) {
|
||||
state.allTags = payload;
|
||||
},
|
||||
setAppInfo(state, payload) {
|
||||
state.appInfo = payload;
|
||||
},
|
||||
},
|
||||
|
||||
actions: {
|
||||
@@ -67,6 +74,11 @@ const store = new Vuex.Store({
|
||||
const tags = await api.tags.getAll();
|
||||
commit("setAllTags", tags);
|
||||
},
|
||||
|
||||
async requestAppInfo({ commit }) {
|
||||
const response = await api.meta.getAppInfo();
|
||||
commit("setAppInfo", response);
|
||||
},
|
||||
},
|
||||
|
||||
getters: {
|
||||
@@ -76,6 +88,7 @@ const store = new Vuex.Store({
|
||||
state.allCategories.sort((a, b) => (a.slug > b.slug ? 1 : -1)),
|
||||
getAllTags: state =>
|
||||
state.allTags.sort((a, b) => (a.slug > b.slug ? 1 : -1)),
|
||||
getAppInfo: state => state.appInfo,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user