mirror of
https://github.com/Bubka/2FAuth.git
synced 2025-06-20 11:47:53 +02:00
Apply OfficialIcons setting to the Edit form
This commit is contained in:
parent
51719b01d0
commit
35b5f26923
@ -9,7 +9,7 @@
|
|||||||
<label class="label">{{ $t('twofaccounts.icon') }}</label>
|
<label class="label">{{ $t('twofaccounts.icon') }}</label>
|
||||||
<div class="field is-grouped">
|
<div class="field is-grouped">
|
||||||
<!-- i'm lucky button -->
|
<!-- i'm lucky button -->
|
||||||
<div class="control">
|
<div class="control" v-if="$root.appSettings.getOfficialIcons">
|
||||||
<v-button @click="fetchLogo" :color="'is-dark'" :nativeType="'button'" :isDisabled="form.service.length < 3">
|
<v-button @click="fetchLogo" :color="'is-dark'" :nativeType="'button'" :isDisabled="form.service.length < 3">
|
||||||
<span class="icon is-small">
|
<span class="icon is-small">
|
||||||
<font-awesome-icon :icon="['fas', 'globe']" />
|
<font-awesome-icon :icon="['fas', 'globe']" />
|
||||||
@ -49,7 +49,7 @@
|
|||||||
<p v-if="!secretIsLocked" class="control">
|
<p v-if="!secretIsLocked" class="control">
|
||||||
<span class="select">
|
<span class="select">
|
||||||
<select @change="form.secret=''" v-model="secretIsBase32Encoded">
|
<select @change="form.secret=''" v-model="secretIsBase32Encoded">
|
||||||
<option v-for="format in secretFormats" :value="format.value">{{ format.text }}</option>
|
<option v-for="(format) in secretFormats" :key="format.value" :value="format.value">{{ format.text }}</option>
|
||||||
</select>
|
</select>
|
||||||
</span>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
@ -272,7 +272,7 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
fetchLogo() {
|
fetchLogo() {
|
||||||
if ($root.appSettings.getOfficialIcons) {
|
if (this.$root.appSettings.getOfficialIcons) {
|
||||||
this.axios.post('/api/v1/icons/default', {service: this.form.service}, {returnError: true}).then(response => {
|
this.axios.post('/api/v1/icons/default', {service: this.form.service}, {returnError: true}).then(response => {
|
||||||
if (response.status === 201) {
|
if (response.status === 201) {
|
||||||
// clean possible already uploaded temp icon
|
// clean possible already uploaded temp icon
|
||||||
|
Loading…
x
Reference in New Issue
Block a user