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:
parent
67f253eecd
commit
a7771d29ff
4 changed files with 794 additions and 985 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue