mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2024-12-21 06:19:38 +08:00
Expand content policy alert
This commit is contained in:
parent
9d2990389d
commit
fb10962ff9
@ -47,9 +47,8 @@
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<a v-if="contentPolicy" href="#" @click="showContentPolicy">
|
||||
{{ $t('skinlib.showContentPolicy') }}
|
||||
</a>
|
||||
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||
<div v-if="contentPolicy" class="callout callout-warning" v-html="contentPolicy" />
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
@ -191,11 +190,6 @@ export default {
|
||||
this.$refs.upload.clear()
|
||||
this.texture = ''
|
||||
},
|
||||
showContentPolicy() {
|
||||
this.$alert(this.contentPolicy, {
|
||||
dangerouslyUseHTMLString: true,
|
||||
})
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
@ -46,9 +46,9 @@ test('notice should be display if texture is private', () => {
|
||||
const wrapper = mount(Upload, {
|
||||
stubs: ['file-upload'],
|
||||
})
|
||||
expect(wrapper.contains('.callout')).toBeFalse()
|
||||
expect(wrapper.contains('.callout-info')).toBeFalse()
|
||||
wrapper.find('[type=checkbox]').setChecked()
|
||||
expect(wrapper.find('.callout').text()).toBe('privacyNotice')
|
||||
expect(wrapper.find('.callout-info').text()).toBe('privacyNotice')
|
||||
})
|
||||
|
||||
test('display score cost', () => {
|
||||
@ -171,8 +171,5 @@ test('show notice about awarding', () => {
|
||||
|
||||
test('show content policy', () => {
|
||||
const wrapper = mount(Upload)
|
||||
wrapper.find('a').trigger('click')
|
||||
expect(Vue.prototype.$alert).toBeCalledWith('the policy', {
|
||||
dangerouslyUseHTMLString: true,
|
||||
})
|
||||
expect(wrapper.find('.callout-warning').exists()).toBeTrue()
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user