mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 08:12:15 +00:00
qr code generator
This commit is contained in:
@@ -59,7 +59,7 @@
|
||||
</ValidationObserver>
|
||||
|
||||
<!--Copy generated link-->
|
||||
<AppInputText v-if="isGeneratedShared" :title="$t('shared_form.label_share_vie_email')" class="px-6" :is-last="true">
|
||||
<AppInputText v-if="isGeneratedShared" :title="$t('shared_form.label_share_vie_email')" :is-last="true">
|
||||
<CopyShareLink :item="pickedItem" />
|
||||
</AppInputText>
|
||||
</PopupContent>
|
||||
|
||||
@@ -5,8 +5,11 @@
|
||||
|
||||
<!--Qr Code-->
|
||||
<div v-if="pickedItem && activeSection === 'qr-code'">
|
||||
<PopupContent>
|
||||
<img src="/qr.png" alt="qr code" class="w-36 mx-auto">
|
||||
<PopupContent class="flex justify-center items-center">
|
||||
<div v-if="! qrCode" class="relative my-8">
|
||||
<Spinner />
|
||||
</div>
|
||||
<div v-if="qrCode" v-html="qrCode" class="my-5 overflow-hidden rounded-xl"></div>
|
||||
</PopupContent>
|
||||
|
||||
<PopupActions>
|
||||
@@ -155,6 +158,7 @@
|
||||
import AppInputSwitch from "../Admin/AppInputSwitch"
|
||||
import AppInputText from "../Admin/AppInputText"
|
||||
import {required} from 'vee-validate/dist/rules'
|
||||
import Spinner from "../FilesView/Spinner"
|
||||
import {events} from '/resources/js/bus'
|
||||
import {mapGetters} from 'vuex'
|
||||
import axios from 'axios'
|
||||
@@ -179,6 +183,7 @@
|
||||
SwitchInput,
|
||||
ButtonBase,
|
||||
required,
|
||||
Spinner,
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
@@ -215,6 +220,7 @@
|
||||
shareOptions: undefined,
|
||||
pickedItem: undefined,
|
||||
emails: undefined,
|
||||
qrCode: undefined,
|
||||
isConfirmedDestroy: false,
|
||||
canChangePassword: false,
|
||||
isMoreOptions: false,
|
||||
@@ -223,6 +229,13 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getQrCode() {
|
||||
axios.get(`/api/share/${this.shareOptions.token}/qr`)
|
||||
.then(response => {
|
||||
this.qrCode = response.data
|
||||
})
|
||||
.catch(() => this.$isSomethingWrong())
|
||||
},
|
||||
showSection(section = undefined) {
|
||||
this.activeSection = section
|
||||
},
|
||||
@@ -321,6 +334,9 @@
|
||||
if (args.section)
|
||||
this.activeSection = args.section
|
||||
|
||||
if (args.section === 'qr-code')
|
||||
this.getQrCode()
|
||||
|
||||
this.canChangePassword = args.item.data.relationships.shared.data.attributes.protected
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user