Second batch of review fixings. Apply suggestions from code review of branch refactor/migrate_vuex_to_pinia

Co-authored-by: Julian Stirling <julian@julianstirling.co.uk>
This commit is contained in:
Antonio Anaya 2026-04-30 17:52:13 -06:00
parent 67f253eecd
commit a7771d29ff
4 changed files with 794 additions and 985 deletions

View file

@ -12,7 +12,7 @@
</template>
<script>
import { mapState } from "pinia";
import { mapWritableState } from "pinia";
import { useSettingsStore } from "@/stores/settings.js";
// Export main app
@ -24,15 +24,7 @@ export default {
},
computed: {
...mapState(useSettingsStore, ["disableStream"]),
disableStream: {
get() {
return this.disableStream;
},
set(value) {
this.disableStream = value;
},
},
...mapWritableState(useSettingsStore, ["disableStream"]),
},
};
</script>

View file

@ -34,7 +34,7 @@
import { eventBus } from "../../eventBus.js";
import { useIntersectionObserver } from "@vueuse/core";
import { useSettingsStore } from "@/stores/settings.js";
import { mapState, mapWritableState } from "pinia";
import { mapState } from "pinia";
// Export main app
export default {
@ -57,8 +57,7 @@ export default {
},
computed: {
...mapState(useSettingsStore, ["ready", "baseUri"]),
...mapWritableState(useSettingsStore, ["disableStream", "waiting"]),
...mapState(useSettingsStore, ["ready", "baseUri", "disableStream", "waiting"]),
streamEnabled: function () {
return this.ready && !this.disableStream;
},