Skip to content
This repository was archived by the owner on May 6, 2025. It is now read-only.

Basic QR Functionality #126

Merged
merged 3 commits into from
Mar 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"moment": "^2.24.0",
"normalize.css": "^8.0.1",
"noty": "^3.2.0-beta",
"qrcode.vue": "^1.6.1",
"vue": "^2.6.9",
"vue-i18n": "^8.9.0",
"vue-router": "^3.0.2",
Expand Down
8 changes: 8 additions & 0 deletions src/views/Share.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
<path d="M0 0h24v24H0z" fill="none"/>
</svg>
<h1 class="share__box__title">{{ file.name }}</h1>
<qrcode-vue :value="fullLink" size="200" level="M"></qrcode-vue>
</div>
</div>
</a>
Expand All @@ -23,9 +24,13 @@
<script>
import { share as api } from '@/api'
import { baseURL } from '@/utils/constants'
import QrcodeVue from 'qrcode.vue'

export default {
name: 'share',
components: {
QrcodeVue
},
data: () => ({
loaded: false,
notFound: false,
Expand All @@ -44,6 +49,9 @@ export default {
link: function () {
return `${baseURL}/api/public/dl/${this.hash}`
},
fullLink: function () {
return window.location.origin + this.link
},
},
methods: {
fetchData: async function () {
Expand Down