polycule-connect/polyculeconnect/static/scripts/appstate.js
Melora Hugues 51f9be1486
All checks were successful
ci/woodpecker/push/test Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful
feat #7: allow saving the selected backend choice
2024-08-10 15:16:31 +02:00

17 lines
339 B
JavaScript

const STATE_SUCCESS = "SUCCESS";
const STATE_IN_PROGRESS = "IN PROGRESS"
const STATE_EMPTY = "NO STATE"
const stateKey = "appState"
function getState() {
state = localStorage.getItem(stateKey);
if (state === null) {
return STATE_EMPTY;
}
return state;
}
function setState(value) {
localStorage.setItem(stateKey, value);
}