forked from cybrespace/pinafore
fix application name (#501)
it should not show "Web" by default but should be absent if `application` is null
This commit is contained in:
parent
b60d636ee2
commit
b59f544efb
|
@ -6,19 +6,21 @@
|
||||||
>
|
>
|
||||||
<time datetime={createdAtDate} title={formattedDate}>{formattedDate}</time>
|
<time datetime={createdAtDate} title={formattedDate}>{formattedDate}</time>
|
||||||
</ExternalLink>
|
</ExternalLink>
|
||||||
{#if applicationWebsite}
|
{#if applicationName}
|
||||||
<ExternalLink className="status-application"
|
{#if applicationWebsite}
|
||||||
href={applicationWebsite}
|
<ExternalLink className="status-application"
|
||||||
showIcon={false}
|
href={applicationWebsite}
|
||||||
ariaLabel="{applicationName} (opens in new window)">
|
showIcon={false}
|
||||||
<span class="status-application-span">
|
ariaLabel="{applicationName} (opens in new window)">
|
||||||
|
<span class="status-application-span">
|
||||||
|
{applicationName}
|
||||||
|
</span>
|
||||||
|
</ExternalLink>
|
||||||
|
{:else}
|
||||||
|
<span class="status-application status-application-span">
|
||||||
{applicationName}
|
{applicationName}
|
||||||
</span>
|
</span>
|
||||||
</ExternalLink>
|
{/if}
|
||||||
{:else}
|
|
||||||
<span class="status-application status-application-span">
|
|
||||||
{applicationName}
|
|
||||||
</span>
|
|
||||||
{/if}
|
{/if}
|
||||||
<a class="status-favs-reblogs status-reblogs"
|
<a class="status-favs-reblogs status-reblogs"
|
||||||
href="/statuses/{originalStatusId}/reblogs"
|
href="/statuses/{originalStatusId}/reblogs"
|
||||||
|
@ -136,7 +138,7 @@
|
||||||
store: () => store,
|
store: () => store,
|
||||||
computed: {
|
computed: {
|
||||||
application: ({ originalStatus }) => originalStatus.application,
|
application: ({ originalStatus }) => originalStatus.application,
|
||||||
applicationName: ({ application }) => ((application && application.name) || 'Web'),
|
applicationName: ({ application }) => (application && application.name),
|
||||||
applicationWebsite: ({ application }) => (application && application.website),
|
applicationWebsite: ({ application }) => (application && application.website),
|
||||||
createdAtDate: ({ originalStatus }) => originalStatus.created_at,
|
createdAtDate: ({ originalStatus }) => originalStatus.created_at,
|
||||||
numReblogs: ({ originalStatus }) => originalStatus.reblogs_count || 0,
|
numReblogs: ({ originalStatus }) => originalStatus.reblogs_count || 0,
|
||||||
|
|
Loading…
Reference in New Issue