Merge pull request #724 from amyspark/fix-emojify-sidebar
Fix username emojification in sidebar
This commit is contained in:
commit
bc70ac6e68
|
@ -60,8 +60,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="username">
|
<div class="username" v-html="username(account)">
|
||||||
{{ username(account) }}
|
|
||||||
</div>
|
</div>
|
||||||
<div class="account">
|
<div class="account">
|
||||||
@{{ account.acct }}
|
@{{ account.acct }}
|
||||||
|
@ -110,6 +109,7 @@
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
import { shell } from 'electron'
|
import { shell } from 'electron'
|
||||||
import { findLink } from '~/src/renderer/utils/tootParser'
|
import { findLink } from '~/src/renderer/utils/tootParser'
|
||||||
|
import emojify from '~/src/renderer/utils/emojify'
|
||||||
import Timeline from './AccountProfile/Timeline'
|
import Timeline from './AccountProfile/Timeline'
|
||||||
import Follows from './AccountProfile/Follows'
|
import Follows from './AccountProfile/Follows'
|
||||||
import Followers from './AccountProfile/Followers'
|
import Followers from './AccountProfile/Followers'
|
||||||
|
@ -158,7 +158,7 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
username (account) {
|
username (account) {
|
||||||
if (account.display_name !== '') {
|
if (account.display_name !== '') {
|
||||||
return account.display_name
|
return emojify(account.display_name, account.emojis)
|
||||||
} else {
|
} else {
|
||||||
return account.username
|
return account.username
|
||||||
}
|
}
|
||||||
|
@ -315,11 +315,16 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.username {
|
.username /deep/ {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
font-size: calc(var(--base-font-size) * 1.71);
|
font-size: calc(var(--base-font-size) * 1.71);
|
||||||
margin: 0 auto 12px auto;
|
margin: 0 auto 12px auto;
|
||||||
|
|
||||||
|
.emojione {
|
||||||
|
max-width: 1em;
|
||||||
|
max-height: 1em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.account {
|
.account {
|
||||||
|
|
Loading…
Reference in New Issue