GUI Functionality
This commit is contained in:
24
tubio-frontend-nuxt-app/store/dlcache.js
Normal file
24
tubio-frontend-nuxt-app/store/dlcache.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import axios from 'axios';
|
||||
|
||||
export const state = () => ({
|
||||
cache: []
|
||||
});
|
||||
|
||||
export const mutations = {
|
||||
update(state, data) {
|
||||
state.cache = data;
|
||||
},
|
||||
};
|
||||
|
||||
export const actions = {
|
||||
update(context, instance) {
|
||||
axios.post("/api", {
|
||||
request: "fetch_alltime_cache"
|
||||
})
|
||||
.then(function(response) {
|
||||
if (response.data.status === "OK") {
|
||||
instance.$store.commit("dlcache/update", response.data.cache);
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
24
tubio-frontend-nuxt-app/store/logs.js
Normal file
24
tubio-frontend-nuxt-app/store/logs.js
Normal file
@@ -0,0 +1,24 @@
|
||||
import axios from 'axios';
|
||||
|
||||
export const state = () => ({
|
||||
logs: []
|
||||
});
|
||||
|
||||
export const mutations = {
|
||||
update(state, data) {
|
||||
state.logs = data;
|
||||
},
|
||||
};
|
||||
|
||||
export const actions = {
|
||||
update(context, instance) {
|
||||
axios.post("/api", {
|
||||
request: "fetch_session_logs"
|
||||
})
|
||||
.then(function(response) {
|
||||
if (response.data.status === "OK") {
|
||||
instance.$store.commit("logs/update", response.data.logs);
|
||||
}
|
||||
});
|
||||
},
|
||||
};
|
Reference in New Issue
Block a user