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
1758
webapp/package-lock.json
generated
1758
webapp/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -17,14 +17,12 @@
|
|||
"dependencies": {
|
||||
"@vueuse/core": "^14.1.0",
|
||||
"axios": "^1.7.7",
|
||||
"eslint-plugin-pinia": "^0.4.2",
|
||||
"material-design-icons": "^3.0",
|
||||
"mitt": "^3.0.1",
|
||||
"mousetrap": "^1.6.5",
|
||||
"openseadragon": "^5.0.0",
|
||||
"pinia": "^3.0.4",
|
||||
"pinia-plugin-persistedstate": "^4.7.1",
|
||||
"typescript-eslint": "^8.59.0",
|
||||
"uikit": "^3.24.2",
|
||||
"vue": "^3.4.0",
|
||||
"vue-router": "4.0.0"
|
||||
|
|
@ -38,6 +36,8 @@
|
|||
"eslint": "^9.39.2",
|
||||
"eslint-plugin-prettier": "^5.1.0",
|
||||
"eslint-plugin-vue": "^9.20.0",
|
||||
"eslint-plugin-pinia": "^0.4.2",
|
||||
"typescript-eslint": "^8.59.0",
|
||||
"less": "^4.5.1",
|
||||
"material-symbols": "^0.39.1",
|
||||
"prettier": "^3.2.8",
|
||||
|
|
|
|||
|
|
@ -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