refs #1317 Show link preview in notifications

This commit is contained in:
AkiraFukushima 2020-05-07 22:49:02 +09:00
parent 6c6ae1f9ac
commit 681bd3b2b1
4 changed files with 31 additions and 4 deletions

View File

@ -64,7 +64,7 @@ export default {
box-sizing: border-box; box-sizing: border-box;
height: 60px; height: 60px;
padding: 4px 0 0 10px; padding: 4px 0 0 10px;
color: var(--theme-secondary-color); color: #909399;
strong { strong {
display: block; display: block;

View File

@ -91,6 +91,13 @@
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
<LinkPreview
v-if="message.status.card && message.status.card.type === 'link'"
:icon="message.status.card.image"
:title="message.status.card.title"
:description="message.status.card.description"
:url="message.status.card.url"
/>
</div> </div>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
@ -106,11 +113,13 @@ import { findAccount, findLink, findTag } from '~/src/renderer/utils/tootParser'
import emojify from '~/src/renderer/utils/emojify' import emojify from '~/src/renderer/utils/emojify'
import TimeFormat from '~/src/constants/timeFormat' import TimeFormat from '~/src/constants/timeFormat'
import FailoverImg from '~/src/renderer/components/atoms/FailoverImg' import FailoverImg from '~/src/renderer/components/atoms/FailoverImg'
import LinkPreview from '~/src/renderer/components/molecules/Toot/LinkPreview'
export default { export default {
name: 'favourite', name: 'favourite',
components: { components: {
FailoverImg FailoverImg,
LinkPreview
}, },
props: { props: {
message: { message: {

View File

@ -91,6 +91,13 @@
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
<LinkPreview
v-if="message.status.card && message.status.card.type === 'link'"
:icon="message.status.card.image"
:title="message.status.card.title"
:description="message.status.card.description"
:url="message.status.card.url"
/>
</div> </div>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
@ -106,11 +113,13 @@ import { findAccount, findLink, findTag } from '~/src/renderer/utils/tootParser'
import emojify from '~/src/renderer/utils/emojify' import emojify from '~/src/renderer/utils/emojify'
import TimeFormat from '~/src/constants/timeFormat' import TimeFormat from '~/src/constants/timeFormat'
import FailoverImg from '~/src/renderer/components/atoms/FailoverImg' import FailoverImg from '~/src/renderer/components/atoms/FailoverImg'
import LinkPreview from '~/src/renderer/components/molecules/Toot/LinkPreview'
export default { export default {
name: 'reaction', name: 'reaction',
components: { components: {
FailoverImg FailoverImg,
LinkPreview
}, },
props: { props: {
message: { message: {

View File

@ -93,6 +93,13 @@
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
</div> </div>
<LinkPreview
v-if="message.status.card && message.status.card.type === 'link'"
:icon="message.status.card.image"
:title="message.status.card.title"
:description="message.status.card.description"
:url="message.status.card.url"
/>
</div> </div>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
@ -108,11 +115,13 @@ import { findAccount, findLink, findTag } from '~/src/renderer/utils/tootParser'
import emojify from '~/src/renderer/utils/emojify' import emojify from '~/src/renderer/utils/emojify'
import TimeFormat from '~/src/constants/timeFormat' import TimeFormat from '~/src/constants/timeFormat'
import FailoverImg from '~/src/renderer/components/atoms/FailoverImg' import FailoverImg from '~/src/renderer/components/atoms/FailoverImg'
import LinkPreview from '~/src/renderer/components/molecules/Toot/LinkPreview'
export default { export default {
name: 'reblog', name: 'reblog',
components: { components: {
FailoverImg FailoverImg,
LinkPreview
}, },
props: { props: {
message: { message: {