Add bookshop image streaming impl

This commit is contained in:
Christian Georgi
2020-09-17 12:45:18 +03:00
committed by Christian Georgi
parent 934a00eff1
commit 7131c13500
4 changed files with 36 additions and 1 deletions

View File

@@ -25,7 +25,8 @@ const books = new Vue ({
async inspect () {
const book = books.book = books.list [event.currentTarget.rowIndex-1]
book.descr || await GET(`/Books/${book.ID}/descr/$value`) .then (({data}) => book.descr = data)
book.imageSrc || await GET(`/Books/${book.ID}/image`) .then (({data}) => book.imageSrc = data )
book.descr || await GET(`/Books/${book.ID}/descr/$value`) .then (({data}) => book.descr = data)
books.order = { amount:1 }
setTimeout (()=> $('form > input').focus(), 111)
},

View File

@@ -37,6 +37,10 @@
</tr>
</table>
<div v-if="book.title">
<img v-bind:src="book.imageSrc" alt=""/>
</div>
<div v-if="book.title">
<label style="text-align:right">
<span class="is-success"> {{ order.succeeded }} </span>