Skip to content

Commit

Permalink
Merge pull request #179 from KaiShoya/bugfix/#178_QR_modal_not_working
Browse files Browse the repository at this point in the history
fix(qr): QRコードのモーダルが表示されない不具合を修正した close #178
  • Loading branch information
KaiShoya committed Mar 26, 2024
2 parents ab8c46d + 468432f commit c96a0ac
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 29 deletions.
18 changes: 3 additions & 15 deletions components/molecules/QrModal.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
<script
setup
lang="ts"
>
import { storeToRefs } from 'pinia'
import { useLayoutStore } from '~/store/layout'
const { showQrModal } = storeToRefs(useLayoutStore())
</script>

<template>
<o-modal v-model:active="showQrModal">
<p style="text-align: center">
<img src="/qrcode.svg">
</p>
</o-modal>
<p style="text-align: center">
<img src="/qrcode.svg">
</p>
</template>
17 changes: 11 additions & 6 deletions components/organisms/ShowQrModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,25 @@
setup
lang="ts"
>
import { storeToRefs } from 'pinia'
import { useLayoutStore } from '~/store/layout'
import { useOruga } from '@oruga-ui/oruga-next'
import QrModal from '~/components/molecules/QrModal.vue'
const { showQrModal } = storeToRefs(useLayoutStore())
const oruga = useOruga()
const cardModal = () => {
oruga.modal.open({
component: QrModal,
trapFocus: true,
destroyOnHide: false,
})
}
</script>

<template>
<a
class="navbar-item"
exact-active-class="is-active"
@click="showQrModal = true"
@click="cardModal()"
>
{{ $t('show_qr') }}
</a>

<MoleculesQrModal />
</template>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "drink-counter",
"version": "1.12.1",
"version": "1.12.2",
"license": "MIT",
"engines": {
"node": "20"
Expand Down
7 changes: 0 additions & 7 deletions store/layout.ts

This file was deleted.

0 comments on commit c96a0ac

Please sign in to comment.