From 27f15d4030d7faaaa7f0f353f5778674b819c25c Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 4 Feb 2018 12:49:42 -0800 Subject: [PATCH] tweak styles for notifications --- routes/_components/status/Notification.html | 2 +- routes/_components/status/Status.html | 13 +++++++----- routes/_components/status/StatusAuthor.html | 21 +++++++++++++++++-- routes/_components/status/StatusContent.html | 10 ++++++++- routes/_components/status/StatusHeader.html | 22 ++++++++++++++++++-- routes/_components/status/StatusSpoiler.html | 8 ++++++- scss/themes/_base.scss | 3 +++ templates/2xx.html | 6 ++---- 8 files changed, 69 insertions(+), 16 deletions(-) diff --git a/routes/_components/status/Notification.html b/routes/_components/status/Notification.html index ad23608d..da78f9ba 100644 --- a/routes/_components/status/Notification.html +++ b/routes/_components/status/Notification.html @@ -10,7 +10,7 @@ aria-posinset="{{index}}" aria-setsize="{{length}}" >
- +
{{/if}} diff --git a/routes/_components/status/Status.html b/routes/_components/status/Status.html index a7e225bc..0c423d7d 100644 --- a/routes/_components/status/Status.html +++ b/routes/_components/status/Status.html @@ -3,15 +3,15 @@ aria-posinset="{{index}}" aria-setsize="{{length}}" on:recalculateHeight> {{#if (notification && (notification.type === 'reblog' || notification.type === 'favourite')) || status.reblog}} - + {{/if}} - + {{#if originalStatus.spoiler_text}} - + {{/if}} {{#if !originalStatus.spoiler_text || spoilerShown}} - + {{/if}} {{#if originalStatus.media_attachments && originalStatus.media_attachments.length}} @@ -72,9 +72,12 @@ computed: { originalStatus: (status) => status.reblog ? status.reblog : status, statusId: (originalStatus) => originalStatus.id, - contextualStatusId: ($currentInstance, timelineType, timelineValue, status) => `${$currentInstance}/${timelineType}/${timelineValue}/${status.id}`, + contextualStatusId: ($currentInstance, timelineType, timelineValue, status, notification) => { + return `${$currentInstance}/${timelineType}/${timelineValue}/${notification ? notification.id : ''}/${status.id}` + }, originalAccount: (originalStatus) => originalStatus.account, isStatusInOwnThread: (timelineType, timelineValue, statusId) => timelineType === 'status' && timelineValue === statusId, + isStatusInNotification: (status, notification) => notification && notification.status && notification.type !== 'mention' && notification.status.id === status.id, spoilerShown: ($spoilersShown, contextualStatusId) => !!$spoilersShown[contextualStatusId] } } diff --git a/routes/_components/status/StatusAuthor.html b/routes/_components/status/StatusAuthor.html index 1e0c1d3d..4ae011dd 100644 --- a/routes/_components/status/StatusAuthor.html +++ b/routes/_components/status/StatusAuthor.html @@ -1,4 +1,4 @@ -
+
{{status.account.display_name || status.account.username}} @@ -25,7 +25,13 @@ min-width: 0; } - :global(.status-author a, .status-author a:visited, .status-author a:hover, .status-author .status-author-handle) { + :global( + .status-author a, + .status-author a:visited, + .status-author a:hover, + .status-author + .status-author-handle + ) { color: var(--deemphasized-text-color); } @@ -62,6 +68,17 @@ :global(.status-author-date:hover) { color: var(--deemphasized-text-color); } + + :global( + .status-author.status-in-notification, + .status-author.status-in-notification a, + .status-author.status-in-notification a:visited, + .status-author.status-in-notification a:hover, + .status-author.status-in-notification .status-author-handle + ) { + color: var(--very-deemphasized-text-color); + } +