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:58:17 +00:00
|
|
|
if (settingsStore.remote["STATION"] === undefined) {
|
|
|
|
getRemote();
|
|
|
|
}
|