fix #81, reset logo
This commit is contained in:
@@ -24,15 +24,17 @@
|
|||||||
small.d-block.text-secondary {{$t('admin.description_description')}}
|
small.d-block.text-secondary {{$t('admin.description_description')}}
|
||||||
|
|
||||||
div.mt-4 {{$t('admin.favicon')}}
|
div.mt-4 {{$t('admin.favicon')}}
|
||||||
el-upload(ref='upload'
|
el-upload(ref='upload'
|
||||||
:action='`${settings.baseurl}/api/settings/logo`'
|
:action='`${settings.baseurl}/api/settings/logo`'
|
||||||
:on-success="forceLogoReload"
|
:on-success="forceLogoReload"
|
||||||
name='logo'
|
name='logo'
|
||||||
:show-file-list="true"
|
:show-file-list="true"
|
||||||
accept='image/png'
|
accept='image/png'
|
||||||
:limit='1'
|
:limit='1'
|
||||||
:multiple='false')
|
:multiple='false')
|
||||||
el-button(slot='trigger' size='small' type='primary' plain) Select file
|
el-button-group
|
||||||
|
el-button(size='small' type='primary' plain) Select file
|
||||||
|
el-button(size='small' type='success' plain @click='resetLogo') Reset
|
||||||
.el-upload__tip(slot='tip') png files with a size less than 500kb
|
.el-upload__tip(slot='tip') png files with a size less than 500kb
|
||||||
el-image(:src='`${settings.baseurl}/favicon.ico?${logoKey}`')
|
el-image(:src='`${settings.baseurl}/favicon.ico?${logoKey}`')
|
||||||
el-switch.d-block.mt-4(v-model='allow_registration'
|
el-switch.d-block.mt-4(v-model='allow_registration'
|
||||||
@@ -106,6 +108,11 @@ export default {
|
|||||||
this.$refs.upload.clearFiles()
|
this.$refs.upload.clearFiles()
|
||||||
this.logoKey++
|
this.logoKey++
|
||||||
},
|
},
|
||||||
|
resetLogo (e) {
|
||||||
|
this.setSetting({ key: 'favicon', value: null })
|
||||||
|
.then(this.forceLogoReload)
|
||||||
|
e.stopPropagation()
|
||||||
|
},
|
||||||
save (key, value) {
|
save (key, value) {
|
||||||
if (this.settings[key] !== value) {
|
if (this.settings[key] !== value) {
|
||||||
this.setSetting({ key, value })
|
this.setSetting({ key, value })
|
||||||
|
|||||||
Reference in New Issue
Block a user