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>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a v-if="contentPolicy" href="#" @click="showContentPolicy">
|
<!-- eslint-disable-next-line vue/no-v-html -->
|
||||||
{{ $t('skinlib.showContentPolicy') }}
|
<div v-if="contentPolicy" class="callout callout-warning" v-html="contentPolicy" />
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="box-footer">
|
<div class="box-footer">
|
||||||
@ -191,11 +190,6 @@ export default {
|
|||||||
this.$refs.upload.clear()
|
this.$refs.upload.clear()
|
||||||
this.texture = ''
|
this.texture = ''
|
||||||
},
|
},
|
||||||
showContentPolicy() {
|
|
||||||
this.$alert(this.contentPolicy, {
|
|
||||||
dangerouslyUseHTMLString: true,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -46,9 +46,9 @@ test('notice should be display if texture is private', () => {
|
|||||||
const wrapper = mount(Upload, {
|
const wrapper = mount(Upload, {
|
||||||
stubs: ['file-upload'],
|
stubs: ['file-upload'],
|
||||||
})
|
})
|
||||||
expect(wrapper.contains('.callout')).toBeFalse()
|
expect(wrapper.contains('.callout-info')).toBeFalse()
|
||||||
wrapper.find('[type=checkbox]').setChecked()
|
wrapper.find('[type=checkbox]').setChecked()
|
||||||
expect(wrapper.find('.callout').text()).toBe('privacyNotice')
|
expect(wrapper.find('.callout-info').text()).toBe('privacyNotice')
|
||||||
})
|
})
|
||||||
|
|
||||||
test('display score cost', () => {
|
test('display score cost', () => {
|
||||||
@ -171,8 +171,5 @@ test('show notice about awarding', () => {
|
|||||||
|
|
||||||
test('show content policy', () => {
|
test('show content policy', () => {
|
||||||
const wrapper = mount(Upload)
|
const wrapper = mount(Upload)
|
||||||
wrapper.find('a').trigger('click')
|
expect(wrapper.find('.callout-warning').exists()).toBeTrue()
|
||||||
expect(Vue.prototype.$alert).toBeCalledWith('the policy', {
|
|
||||||
dangerouslyUseHTMLString: true,
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user