mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Merge branch '399-user-profile-image-uploads' of github.com:Human-Connection/Human-Connection into 399-user-profile-image-uploads
This commit is contained in:
commit
3df7f588d2
@ -5,8 +5,7 @@
|
||||
ref="el"
|
||||
:options="dropzoneOptions"
|
||||
:include-styling="false"
|
||||
:style="{ backgroundImage: backgroundImage(`${user.avatar}`)}"
|
||||
@vdropzone-error="verror"
|
||||
:style="backgroundImage"
|
||||
@vdropzone-thumbnail="thumbnail"
|
||||
@vdropzone-drop="vddrop"
|
||||
@vdropzone-success="vsuccess"
|
||||
@ -35,8 +34,11 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
backgroundImage: () => avatar => {
|
||||
return `url(${avatar})`
|
||||
backgroundImage() {
|
||||
const { avatar } = this.user || {}
|
||||
return {
|
||||
backgroundImage: `url(${avatar})`
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
16
webapp/components/Upload/spec.js
Normal file
16
webapp/components/Upload/spec.js
Normal file
@ -0,0 +1,16 @@
|
||||
import { shallowMount } from '@vue/test-utils'
|
||||
import Upload from '.'
|
||||
|
||||
describe('Upload', () => {
|
||||
let wrapper
|
||||
|
||||
beforeEach(() => {
|
||||
wrapper = shallowMount(Upload, {})
|
||||
})
|
||||
|
||||
it('renders', () => {
|
||||
expect(wrapper.is('div')).toBe(true)
|
||||
})
|
||||
|
||||
// TODO: add more test cases in this file
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user