2021-03-02 02:59:41 +01:00
|
|
|
<template>
|
|
|
|
<div class="notified-status">
|
|
|
|
<div class="action">
|
|
|
|
<div class="action-mark">
|
2022-03-22 13:58:14 +01:00
|
|
|
<font-awesome-icon name="home" size="sm" />
|
2021-03-02 02:59:41 +01:00
|
|
|
</div>
|
|
|
|
<div class="action-detail">
|
2021-10-13 15:47:52 +02:00
|
|
|
<span class="bold" @click="openUser(message.account)">
|
|
|
|
<bdi
|
|
|
|
v-html="
|
|
|
|
$t('notification.status.body', {
|
|
|
|
username: username(message.account),
|
|
|
|
interpolation: { escapeValue: false }
|
|
|
|
})
|
|
|
|
"
|
|
|
|
></bdi>
|
|
|
|
</span>
|
2021-03-02 02:59:41 +01:00
|
|
|
</div>
|
|
|
|
<div class="action-icon" role="presentation">
|
|
|
|
<FailoverImg :src="message.account.avatar" :alt="`Avatar of ${message.account.username}`" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="clearfix"></div>
|
|
|
|
<toot
|
|
|
|
:message="message.status"
|
2021-05-22 07:33:57 +02:00
|
|
|
:filters="filters"
|
2021-03-02 02:59:41 +01:00
|
|
|
:focused="focused"
|
|
|
|
:overlaid="overlaid"
|
|
|
|
v-on:update="updateToot"
|
|
|
|
v-on:delete="deleteToot"
|
|
|
|
@focusNext="$emit('focusNext')"
|
|
|
|
@focusPrev="$emit('focusPrev')"
|
|
|
|
@focusRight="$emit('focusRight')"
|
|
|
|
@selectToot="$emit('select')"
|
|
|
|
>
|
|
|
|
</toot>
|
2021-03-23 17:14:54 +01:00
|
|
|
<div class="clearfix"></div>
|
2021-03-02 02:59:41 +01:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import emojify from '~/src/renderer/utils/emojify'
|
2021-03-23 17:14:54 +01:00
|
|
|
import FailoverImg from '~/src/renderer/components/atoms/FailoverImg'
|
2021-03-02 02:59:41 +01:00
|
|
|
import Toot from '../Toot'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'mention',
|
|
|
|
props: {
|
|
|
|
message: {
|
|
|
|
type: Object,
|
|
|
|
default: {}
|
|
|
|
},
|
2021-05-22 07:33:57 +02:00
|
|
|
filters: {
|
|
|
|
type: Array,
|
|
|
|
default: []
|
2021-03-02 02:59:41 +01:00
|
|
|
},
|
|
|
|
focused: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
},
|
|
|
|
overlaid: {
|
|
|
|
type: Boolean,
|
|
|
|
default: false
|
|
|
|
}
|
|
|
|
},
|
2021-03-23 17:14:54 +01:00
|
|
|
components: { Toot, FailoverImg },
|
2021-03-02 02:59:41 +01:00
|
|
|
methods: {
|
|
|
|
updateToot(message) {
|
|
|
|
return this.$emit('update', message)
|
|
|
|
},
|
|
|
|
deleteToot(message) {
|
|
|
|
return this.$emit('delete', message)
|
|
|
|
},
|
|
|
|
username(account) {
|
|
|
|
if (account.display_name !== '') {
|
|
|
|
return emojify(account.display_name, account.emojis)
|
|
|
|
} else {
|
|
|
|
return account.username
|
|
|
|
}
|
|
|
|
},
|
|
|
|
openUser(account) {
|
|
|
|
this.$store.dispatch('TimelineSpace/Contents/SideBar/openAccountComponent')
|
|
|
|
this.$store.dispatch('TimelineSpace/Contents/SideBar/AccountProfile/changeAccount', account)
|
|
|
|
this.$store.commit('TimelineSpace/Contents/SideBar/changeOpenSideBar', true)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.bold {
|
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
|
2021-03-23 17:14:54 +01:00
|
|
|
.notified-status {
|
|
|
|
padding-top: 8px;
|
2021-03-23 17:28:10 +01:00
|
|
|
|
2021-03-23 17:14:54 +01:00
|
|
|
.action {
|
|
|
|
padding: 0 0 0 16px;
|
|
|
|
margin-right: 8px;
|
2021-03-02 02:59:41 +01:00
|
|
|
|
2021-03-23 17:14:54 +01:00
|
|
|
.action-mark {
|
|
|
|
color: #409eff;
|
|
|
|
float: left;
|
|
|
|
width: 32px;
|
|
|
|
text-align: right;
|
|
|
|
}
|
2021-03-02 02:59:41 +01:00
|
|
|
|
2021-03-23 17:14:54 +01:00
|
|
|
.action-detail {
|
|
|
|
margin-left: 10px;
|
|
|
|
font-size: var(--base-font-size);
|
|
|
|
float: left;
|
|
|
|
max-width: 80%;
|
2021-03-02 02:59:41 +01:00
|
|
|
|
2021-03-23 17:14:54 +01:00
|
|
|
.bold /deep/ {
|
|
|
|
cursor: pointer;
|
2021-03-02 02:59:41 +01:00
|
|
|
|
2021-03-23 17:14:54 +01:00
|
|
|
.emojione {
|
|
|
|
max-width: 14px;
|
|
|
|
max-height: 14px;
|
|
|
|
}
|
2021-03-02 02:59:41 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-23 17:14:54 +01:00
|
|
|
.action-icon {
|
|
|
|
width: 100%;
|
|
|
|
text-align: right;
|
2021-03-02 02:59:41 +01:00
|
|
|
|
2021-03-23 17:14:54 +01:00
|
|
|
img {
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
border-radius: 2px;
|
|
|
|
}
|
2021-03-02 02:59:41 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|