mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-11-26 10:15:40 +01:00
Bind icon upload feature to Quick form
This commit is contained in:
parent
521649828a
commit
1820dd1ddc
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<figure class="image is-64x64" :class="{ 'no-icon' : !internal_icon }" style="display: inline-block">
|
<figure class="image is-64x64" style="display: inline-block">
|
||||||
<img :src="'storage/icons/' + internal_icon" v-if="internal_icon">
|
<img :src="'storage/icons/' + internal_icon" v-if="internal_icon">
|
||||||
</figure>
|
</figure>
|
||||||
<p class="is-size-4 has-text-grey-light has-ellipsis">{{ internal_service }}</p>
|
<p class="is-size-4 has-text-grey-light has-ellipsis">{{ internal_service }}</p>
|
||||||
|
@ -3,7 +3,12 @@
|
|||||||
<div class="container preview has-text-centered">
|
<div class="container preview has-text-centered">
|
||||||
<div class="columns is-mobile">
|
<div class="columns is-mobile">
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<twofaccount-show
|
<label class="add-icon-button" v-if="!tempIcon">
|
||||||
|
<input class="file-input" type="file" accept="image/*" v-on:change="uploadIcon" ref="iconInput">
|
||||||
|
<font-awesome-icon :icon="['fas', 'image']" size="lg" />
|
||||||
|
</label>
|
||||||
|
<button class="delete delete-icon-button is-medium" v-if="tempIcon" @click.prevent="deleteIcon"></button>
|
||||||
|
<twofaccount-show ref="TwofaccountShow"
|
||||||
:service="form.service"
|
:service="form.service"
|
||||||
:account="form.account"
|
:account="form.account"
|
||||||
:uri="form.uri"
|
:uri="form.uri"
|
||||||
@ -131,6 +136,14 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
tempIcon: function(val) {
|
||||||
|
if( this.isQuickForm ) {
|
||||||
|
this.$refs.TwofaccountShow.setIcon = val
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
mounted: function () {
|
mounted: function () {
|
||||||
if( this.$route.params.qrAccount ) {
|
if( this.$route.params.qrAccount ) {
|
||||||
|
|
||||||
|
25
resources/sass/app.scss
vendored
25
resources/sass/app.scss
vendored
@ -161,10 +161,29 @@
|
|||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-icon {
|
.add-icon-button {
|
||||||
|
height: 64px;
|
||||||
|
width: 64px;
|
||||||
|
padding-top: calc(32px - 0.665rem);
|
||||||
|
position: absolute;
|
||||||
|
margin-left: -32px;
|
||||||
|
z-index: 40;
|
||||||
border: 1px dashed hsl(0, 0%, 7%);
|
border: 1px dashed hsl(0, 0%, 7%);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.delete-icon-button {
|
||||||
|
position: absolute;
|
||||||
|
margin-left: 37px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.file-input {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-icon-button, .add-icon-button:hover {
|
||||||
|
color: hsl(0, 0%, 7%);
|
||||||
|
}
|
||||||
|
|
||||||
.dots {
|
.dots {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@ -299,10 +318,6 @@ footer .field.is-grouped {
|
|||||||
height: 256px;
|
height: 256px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.no-account input {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-account::before {
|
.no-account::before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
Loading…
Reference in New Issue
Block a user