object assign
This commit is contained in:
parent
19cd21cf0b
commit
ab6ac91072
2 changed files with 86 additions and 96 deletions
|
|
@ -73,17 +73,15 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
logoBgStyle() {
|
logoBgStyle() {
|
||||||
return Object.assign(
|
const mask = this.enableMask
|
||||||
{
|
? {}
|
||||||
|
: {'background-color': this.enableMask ? '' : 'transparent'}
|
||||||
|
|
||||||
|
return {
|
||||||
margin: `${this.logoMargin} 0`,
|
margin: `${this.logoMargin} 0`,
|
||||||
opacity: this.searchBarHidden ? 1 : 0,
|
opacity: this.searchBarHidden ? 1 : 0,
|
||||||
},
|
...mask,
|
||||||
this.enableMask
|
}
|
||||||
? {}
|
|
||||||
: {
|
|
||||||
'background-color': this.enableMask ? '' : 'transparent',
|
|
||||||
},
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
...mapState(useInstanceStore, ['privateMode']),
|
...mapState(useInstanceStore, ['privateMode']),
|
||||||
...mapState(useInstanceStore, {
|
...mapState(useInstanceStore, {
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,7 @@ import {
|
||||||
} from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
} from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
||||||
|
|
||||||
const makeMockUserMasto = (overrides = {}) => {
|
const makeMockUserMasto = (overrides = {}) => {
|
||||||
return Object.assign(
|
return {
|
||||||
{
|
|
||||||
acct: 'hj',
|
acct: 'hj',
|
||||||
avatar:
|
avatar:
|
||||||
'https://shigusegubu.club/media/1657b945-8d5b-4ce6-aafb-4c3fc5772120/8ce851029af84d55de9164e30cc7f46d60cbf12eee7e96c5c0d35d9038ddade1.png',
|
'https://shigusegubu.club/media/1657b945-8d5b-4ce6-aafb-4c3fc5772120/8ce851029af84d55de9164e30cc7f46d60cbf12eee7e96c5c0d35d9038ddade1.png',
|
||||||
|
|
@ -33,14 +32,12 @@ const makeMockUserMasto = (overrides = {}) => {
|
||||||
statuses_count: 41775,
|
statuses_count: 41775,
|
||||||
url: 'https://shigusegubu.club/users/hj',
|
url: 'https://shigusegubu.club/users/hj',
|
||||||
username: 'hj',
|
username: 'hj',
|
||||||
},
|
...overrides,
|
||||||
overrides,
|
}
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const makeMockStatusMasto = (overrides = {}) => {
|
const makeMockStatusMasto = (overrides = {}) => {
|
||||||
return Object.assign(
|
return {
|
||||||
{
|
|
||||||
account: makeMockUserMasto(),
|
account: makeMockUserMasto(),
|
||||||
application: { name: 'Web', website: null },
|
application: { name: 'Web', website: null },
|
||||||
content:
|
content:
|
||||||
|
|
@ -76,31 +73,26 @@ const makeMockStatusMasto = (overrides = {}) => {
|
||||||
pleroma: {
|
pleroma: {
|
||||||
local: true,
|
local: true,
|
||||||
},
|
},
|
||||||
},
|
...overrides,
|
||||||
overrides,
|
}
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const makeMockEmojiMasto = (overrides = [{}]) => {
|
const makeMockEmojiMasto = (overrides = [{}]) => {
|
||||||
return [
|
return [
|
||||||
Object.assign(
|
|
||||||
{
|
{
|
||||||
shortcode: 'image',
|
shortcode: 'image',
|
||||||
static_url: 'https://example.com/image.png',
|
static_url: 'https://example.com/image.png',
|
||||||
url: 'https://example.com/image.png',
|
url: 'https://example.com/image.png',
|
||||||
visible_in_picker: false,
|
visible_in_picker: false,
|
||||||
|
...overrides[0],
|
||||||
},
|
},
|
||||||
overrides[0],
|
|
||||||
),
|
|
||||||
Object.assign(
|
|
||||||
{
|
{
|
||||||
shortcode: 'thinking',
|
shortcode: 'thinking',
|
||||||
static_url: 'https://example.com/think.png',
|
static_url: 'https://example.com/think.png',
|
||||||
url: 'https://example.com/think.png',
|
url: 'https://example.com/think.png',
|
||||||
visible_in_picker: false,
|
visible_in_picker: false,
|
||||||
|
...overrides[1],
|
||||||
},
|
},
|
||||||
overrides[1],
|
|
||||||
),
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue