add icons for boosters/favoriters/followers in status header
This commit is contained in:
parent
84f177022d
commit
7a9cb22269
|
@ -19,6 +19,12 @@
|
||||||
:global(.avatar) {
|
:global(.avatar) {
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:global(.avatar.size-extra-small) {
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
:global(.avatar.size-small) {
|
:global(.avatar.size-small) {
|
||||||
width: 48px;
|
width: 48px;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
|
|
|
@ -9,10 +9,8 @@
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
aria-posinset="{{index}}" aria-setsize="{{length}}"
|
aria-posinset="{{index}}" aria-setsize="{{length}}"
|
||||||
ref:node >
|
ref:node >
|
||||||
<div class="follow-notification-offset">
|
<StatusHeader :notification :notificationId :status :statusId :timelineType
|
||||||
<StatusHeader :notification :notificationId :status :statusId :timelineType
|
:account :accountId :uuid isStatusInNotification="true" />
|
||||||
:account :accountId :uuid isStatusInNotification="true" />
|
|
||||||
</div>
|
|
||||||
</article>
|
</article>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
<style>
|
<style>
|
||||||
|
@ -22,9 +20,6 @@
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
border-bottom: 1px solid var(--main-border);
|
border-bottom: 1px solid var(--main-border);
|
||||||
}
|
}
|
||||||
.follow-notification-offset {
|
|
||||||
margin-left: 58px; /* offset for avatar, 48px + 10px */
|
|
||||||
}
|
|
||||||
@media (max-width: 767px) {
|
@media (max-width: 767px) {
|
||||||
.notification-article {
|
.notification-article {
|
||||||
padding: 10px 10px;
|
padding: 10px 10px;
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"....... header header header"
|
"header header header header"
|
||||||
"sidebar author-name author-handle relative-date"
|
"sidebar author-name author-handle relative-date"
|
||||||
"sidebar spoiler spoiler spoiler"
|
"sidebar spoiler spoiler spoiler"
|
||||||
"sidebar spoiler-btn spoiler-btn spoiler-btn"
|
"sidebar spoiler-btn spoiler-btn spoiler-btn"
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
<div class="status-header {{isStatusInNotification ? 'status-in-notification' : ''}}">
|
<div class="status-header {{isStatusInNotification ? 'status-in-notification' : ''}}">
|
||||||
|
<Avatar :account size="extra-small" className="status-header-avatar"/>
|
||||||
<svg class="status-header-svg">
|
<svg class="status-header-svg">
|
||||||
<use xlink:href="{{icon}}"/>
|
<use xlink:href="{{icon}}"/>
|
||||||
</svg>
|
</svg>
|
||||||
<span>
|
<span class="status-header-span">
|
||||||
{{#if timelineType === 'pinned'}}
|
{{#if timelineType === 'pinned'}}
|
||||||
Pinned toot
|
Pinned toot
|
||||||
{{else}}
|
{{else}}
|
||||||
<a href="/accounts/{{accountId}}"
|
<a href="/accounts/{{accountId}}"
|
||||||
|
class="status-header-a"
|
||||||
title="{{'@' + account.acct}}"
|
title="{{'@' + account.acct}}"
|
||||||
focus-key="{{focusKey}}" >
|
focus-key="{{focusKey}}" >
|
||||||
{{account.display_name || account.username}}
|
{{account.display_name || account.username}}
|
||||||
|
@ -24,31 +26,6 @@
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<style>
|
<style>
|
||||||
.status-header span {
|
|
||||||
margin-left: 5px;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(
|
|
||||||
.status-header span,
|
|
||||||
.status-header a,
|
|
||||||
.status-header a:visited,
|
|
||||||
.status-header a:hover
|
|
||||||
) {
|
|
||||||
color: var(--deemphasized-text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
:global(
|
|
||||||
.status-header.status-in-notification span,
|
|
||||||
.status-header.status-in-notification a,
|
|
||||||
.status-header.status-in-notification a:visited,
|
|
||||||
.status-header.status-in-notification a:hover
|
|
||||||
) {
|
|
||||||
color: var(--body-text-color);
|
|
||||||
}
|
|
||||||
|
|
||||||
.status-header {
|
.status-header {
|
||||||
grid-area: header;
|
grid-area: header;
|
||||||
margin: 5px 10px 5px 5px;
|
margin: 5px 10px 5px 5px;
|
||||||
|
@ -56,18 +33,56 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:global(.status-header-avatar) {
|
||||||
|
margin-left: 19px; /* offset for avatar, 48px - 24px - 5px */
|
||||||
|
}
|
||||||
|
|
||||||
.status-header-svg {
|
.status-header-svg {
|
||||||
|
margin-left: 20px;
|
||||||
width: 18px;
|
width: 18px;
|
||||||
height: 18px;
|
height: 18px;
|
||||||
fill: var(--deemphasized-text-color);
|
fill: var(--deemphasized-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.status-header-svg {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.status-header.status-in-notification .status-header-svg {
|
.status-header.status-in-notification .status-header-svg {
|
||||||
fill: var(--body-text-color);
|
fill: var(--body-text-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.status-header-span {
|
||||||
|
margin-left: 5px;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-header-span,
|
||||||
|
.status-header-a,
|
||||||
|
.status-header-a:visited,
|
||||||
|
.status-header-a:hover {
|
||||||
|
color: var(--deemphasized-text-color);
|
||||||
|
}
|
||||||
|
|
||||||
|
.status-in-notification .status-header-span,
|
||||||
|
.status-in-notification .status-header-a,
|
||||||
|
.status-in-notification .status-header-a:visited,
|
||||||
|
.status-in-notification .status-header-a:hover {
|
||||||
|
color: var(--body-text-color);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
import Avatar from '../Avatar.html'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
components: {
|
||||||
|
Avatar
|
||||||
|
},
|
||||||
computed: {
|
computed: {
|
||||||
focusKey: (uuid) => `status-header-${uuid}`,
|
focusKey: (uuid) => `status-header-${uuid}`,
|
||||||
icon: (notification, status, timelineType) => {
|
icon: (notification, status, timelineType) => {
|
||||||
|
|
Loading…
Reference in New Issue