@@ -4,10 +4,9 @@ import {useRouter} from "vue-router";
44import {arrayBufferToBase64 } from " @/utils/bytes2img.js"
55import StatusItem from " ./StatusItem.vue"
66import {useSQLite } from " @/composables/useSQLite.js"
7- import { useImageViewStore } from ' @/stores/imageView '
7+ import { imagePresentation } from " @/composables/useSettings " ;
88
99const router = useRouter ()
10- const imageViewStore = useImageViewStore ()
1110
1211const {isLoading ,
1312 error ,
@@ -62,12 +61,12 @@ const images = ref([])
6261
6362const loadImage = async (index , coinId ) => {
6463 let sql
65- if (imageViewStore . currentImageView === ' obverse' ) {
64+ if (imagePresentation . value === ' obverse' ) {
6665 sql = ` SELECT obverseimg.image FROM coins
6766 LEFT JOIN photos AS obverseimg ON coins.obverseimg = obverseimg.id
6867 WHERE coins.id=?`
6968 }
70- else if (imageViewStore . currentImageView === ' reverse' ) {
69+ else if (imagePresentation . value === ' reverse' ) {
7170 sql = ` SELECT reverseimg.image FROM coins
7271 LEFT JOIN photos AS reverseimg ON coins.reverseimg = reverseimg.id
7372 WHERE coins.id=?`
@@ -81,7 +80,7 @@ const loadImage = async (index, coinId) => {
8180
8281 const results = await executeQuery (sql, [coinId,])
8382 let img
84- if (imageViewStore . currentImageView === ' both' ) {
83+ if (imagePresentation . value === ' both' ) {
8584 const maxHeight = 54 * 4 // Step-down scaling for better quality
8685 let aspectRatio
8786 let img1 = null , img2 = null
@@ -135,17 +134,18 @@ const loadImage = async (index, coinId) => {
135134 @click =" router.push('/coin/' + coin[0])"
136135 class =" pa-1"
137136 >
138- <template v-slot :prepend v-if =" imageViewStore . currentImageView === ' obverse' " >
137+ <template v-slot :prepend v-if =" imagePresentation === ' obverse' " >
139138 <v-lazy :width =" 56" >
140139 <v-img :src =" images[index]" :width =" 56" max-height =" 56" :tmp =" loadImage(index, coin[0])" />
141140 </v-lazy >
141+ <p >11</p >
142142 </template >
143- <template v-slot :prepend v-else-if =" imageViewStore . currentImageView === ' reverse' " >
143+ <template v-slot :prepend v-else-if =" imagePresentation === ' reverse' " >
144144 <v-lazy :width =" 56" >
145145 <v-img :src =" images[index]" :width =" 56" max-height =" 56" :tmp =" loadImage(index, coin[0])" />
146146 </v-lazy >
147147 </template >
148- <template v-slot :prepend v-else-if =" imageViewStore . currentImageView === ' both' " >
148+ <template v-slot :prepend v-else-if =" imagePresentation === ' both' " >
149149 <v-lazy :width =" 100" >
150150 <v-img :src =" images[index]" :width =" 100" max-height =" 56" :tmp =" loadImage(index, coin[0])" />
151151 </v-lazy >
0 commit comments