Add barcode button on mobile

This commit is contained in:
2026-02-17 15:53:04 +01:00
parent 60d9a51069
commit 527510db2f
3 changed files with 10 additions and 1 deletions

View File

@@ -2,6 +2,7 @@
import { ref } from 'vue' import { ref } from 'vue'
import { useRouter, RouterLink } from 'vue-router' import { useRouter, RouterLink } from 'vue-router'
import NavBarSearch from './NavBarSearch.vue' import NavBarSearch from './NavBarSearch.vue'
import BarcodeModal from './BarcodeModal.vue'
import { useAuthStore } from './auth.store.js' import { useAuthStore } from './auth.store.js'
const authStore = useAuthStore(); const authStore = useAuthStore();
@@ -30,6 +31,7 @@
<b-icon-search /> <b-icon-search />
</span> </span>
</a> </a>
<BarcodeModal size-class="is-medium"/>
</div> </div>
<a role="button" class="navbar-burger" aria-label="menu" <a role="button" class="navbar-burger" aria-label="menu"
:class="isMenuActive ? 'is-active' : '' " :aria-expanded="isMenuActive" :class="isMenuActive ? 'is-active' : '' " :aria-expanded="isMenuActive"

View File

@@ -3,6 +3,10 @@ import ScanBook from './ScanBook.vue'
import { ref } from 'vue' import { ref } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
const props = defineProps({
sizeClass: String
});
const open = ref(false); const open = ref(false);
const router = useRouter(); const router = useRouter();
@@ -14,7 +18,7 @@ function onBarcodeDecode(isbn) {
<template> <template>
<div class="control"> <div class="control">
<button @click="open = true" class="button"> <button @click="open = true" class="button" :class="sizeClass">
<span class="icon" title="Barcode"> <span class="icon" title="Barcode">
<b-icon-upc-scan /> <b-icon-upc-scan />
</span> </span>

View File

@@ -28,4 +28,7 @@
</template> </template>
<style scoped> <style scoped>
video {
max-width: 90%;
}
</style> </style>