refs #1281 Use i18n in notification status
This commit is contained in:
parent
a45bb4b1e8
commit
b030109f75
|
@ -453,6 +453,10 @@
|
|||
"reblog": {
|
||||
"title": "Reblog",
|
||||
"body": "{{username}} boosted your status"
|
||||
},
|
||||
"reaction": {
|
||||
"title": "Reaction",
|
||||
"body": "{{username}} reacted your status"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
<icon name="star" scale="0.7"></icon>
|
||||
</div>
|
||||
<div class="action-detail">
|
||||
<span class="bold" @click="openUser(message.account)"><bdi v-html="username(message.account)"></bdi></span> favourited your status
|
||||
<span class="bold" @click="openUser(message.account)"><bdi v-html="username(message.account)"></bdi></span
|
||||
>{{ $t('notification.favourite.body') }}
|
||||
</div>
|
||||
<div class="action-icon" role="presentation">
|
||||
<FailoverImg :src="message.account.avatar" :alt="`Avatar of ${message.account.username}`" />
|
||||
|
@ -141,7 +142,7 @@ export default {
|
|||
timeFormat: state => state.App.timeFormat,
|
||||
language: state => state.App.language
|
||||
}),
|
||||
shortcutEnabled: function() {
|
||||
shortcutEnabled: function () {
|
||||
return this.focused && !this.overlaid
|
||||
}
|
||||
},
|
||||
|
@ -151,13 +152,13 @@ export default {
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
focused: function(newState, oldState) {
|
||||
focused: function (newState, oldState) {
|
||||
if (newState) {
|
||||
this.$nextTick(function() {
|
||||
this.$nextTick(function () {
|
||||
this.$refs.status.focus()
|
||||
})
|
||||
} else if (oldState && !newState) {
|
||||
this.$nextTick(function() {
|
||||
this.$nextTick(function () {
|
||||
this.$refs.status.blur()
|
||||
})
|
||||
}
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
<icon name="user-plus" scale="0.7"></icon>
|
||||
</div>
|
||||
<div class="action-detail">
|
||||
<span class="bold" @click="openUser(message.account)"><bdi v-html="username(message.account)"></bdi></span> is now following you
|
||||
<span class="bold" @click="openUser(message.account)"><bdi v-html="username(message.account)"></bdi></span
|
||||
>{{ $t('notification.follow.body') }}
|
||||
</div>
|
||||
<div class="action-icon" role="presentation">
|
||||
<FailoverImg :src="message.account.avatar" />
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
{{ message.emoji }}
|
||||
</div>
|
||||
<div class="action-detail">
|
||||
<span class="bold" @click="openUser(message.account)"><bdi v-html="username(message.account)"></bdi></span> reacted to your status
|
||||
<span class="bold" @click="openUser(message.account)"><bdi v-html="username(message.account)"></bdi></span
|
||||
>{{ $t('notification.reaction.body') }}
|
||||
</div>
|
||||
<div class="action-icon" role="presentation">
|
||||
<FailoverImg :src="message.account.avatar" :alt="`Avatar of ${message.account.username}`" />
|
||||
|
|
|
@ -18,7 +18,8 @@
|
|||
<icon name="retweet" scala="0.7"></icon>
|
||||
</div>
|
||||
<div class="action-detail">
|
||||
<span class="bold" @click="openUser(message.account)"><bdi v-html="username(message.account)"></bdi></span> boosted your status
|
||||
<span class="bold" @click="openUser(message.account)"><bdi v-html="username(message.account)"></bdi></span
|
||||
>{{ $t('notification.reblog.body') }}
|
||||
</div>
|
||||
<div class="action-icon" role="presentation">
|
||||
<FailoverImg :src="message.account.avatar" :alt="`Avatar of ${message.account.username}`" />
|
||||
|
@ -142,7 +143,7 @@ export default {
|
|||
timeFormat: state => state.App.timeFormat,
|
||||
language: state => state.App.language
|
||||
}),
|
||||
shortcutEnabled: function() {
|
||||
shortcutEnabled: function () {
|
||||
return this.focused && !this.overlaid
|
||||
}
|
||||
},
|
||||
|
@ -152,13 +153,13 @@ export default {
|
|||
}
|
||||
},
|
||||
watch: {
|
||||
focused: function(newState, oldState) {
|
||||
focused: function (newState, oldState) {
|
||||
if (newState) {
|
||||
this.$nextTick(function() {
|
||||
this.$nextTick(function () {
|
||||
this.$refs.status.focus()
|
||||
})
|
||||
} else if (oldState && !newState) {
|
||||
this.$nextTick(function() {
|
||||
this.$nextTick(function () {
|
||||
this.$refs.status.blur()
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue