Fix persistance in pinia store
This commit is contained in:
parent
793441aadf
commit
ebd67cd410
3 changed files with 114 additions and 102 deletions
|
|
@ -31,7 +31,7 @@ export default {
|
|||
|
||||
methods: {
|
||||
overrideAPIHost(event) {
|
||||
if (this.reloadWhenOverridingOrigin) {
|
||||
if (!this.reloadWhenOverridingOrigin) {
|
||||
this.origin = this.overrideOrigin;
|
||||
event.preventDefault();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,13 @@ export const useSettingsStore = defineStore(
|
|||
{
|
||||
// PiniaPluginPersistedState will now automatically persist ONLY these specific refs to localStorage
|
||||
persist: {
|
||||
paths: ["appTheme", "disableStream", "navigationStepSize", "navigationInvert"],
|
||||
pick: [
|
||||
"appTheme",
|
||||
"overrideOrigin",
|
||||
"disableStream",
|
||||
"navigationStepSize",
|
||||
"navigationInvert",
|
||||
],
|
||||
},
|
||||
},
|
||||
);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@ import { defineStore } from "pinia";
|
|||
import { ref, computed } from "vue";
|
||||
import axios from "axios";
|
||||
|
||||
export const useWotStore = defineStore("wot", () => {
|
||||
export const useWotStore = defineStore(
|
||||
"wot",
|
||||
() => {
|
||||
// State
|
||||
const thingDescriptions = ref({});
|
||||
const servient = ref(null);
|
||||
|
|
@ -109,7 +111,11 @@ export const useWotStore = defineStore("wot", () => {
|
|||
removeAllThingDescriptions,
|
||||
thingAffordanceAvailable,
|
||||
};
|
||||
});
|
||||
},
|
||||
{
|
||||
persist: false,
|
||||
},
|
||||
);
|
||||
|
||||
export function findFormHref(affordance, op) {
|
||||
// Find the form in the affordance that matches the given operation type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue