FreeDATA/gui/src/store/settingsStore.js

20 lines
305 B
JavaScript
Raw Normal View History

2023-11-18 15:53:54 +00:00
import { reactive } from "vue";
2023-10-03 13:15:17 +00:00
2023-11-18 15:53:54 +00:00
import { getConfig } from "../js/api";
2023-10-04 17:54:50 +00:00
2023-11-18 15:53:54 +00:00
export const settingsStore = reactive({
local: {
host: "127.0.0.1",
port: "5000",
},
remote: {},
});
2023-10-03 13:15:17 +00:00
2023-11-18 15:53:54 +00:00
export function getRemote() {
getConfig().then((conf) => {
settingsStore.remote = conf;
});
}
2023-09-05 17:35:54 +00:00
2023-11-18 15:53:54 +00:00
getRemote();