From 543536409be849a4730e4a66cfd1bbf33e531125 Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 26 Aug 2018 15:38:45 -0700 Subject: [PATCH] add application (client) name to statuses (#497) * add application (client) name to statuses fixes another thing in #6 * add domain blocking (#496) * add domain blocking fixes another thing from #6 * show "domain blocking" on profile page * fix stuff --- routes/_components/ExternalLink.html | 14 +++- routes/_components/status/StatusDetails.html | 68 ++++++++++++++++---- routes/_utils/formatters.js | 29 +++++++++ tests/spec/011-reblog-favorites-count.js | 4 +- tests/utils.js | 4 +- 5 files changed, 100 insertions(+), 19 deletions(-) create mode 100644 routes/_utils/formatters.js diff --git a/routes/_components/ExternalLink.html b/routes/_components/ExternalLink.html index 5fa883b..b5bc995 100644 --- a/routes/_components/ExternalLink.html +++ b/routes/_components/ExternalLink.html @@ -2,7 +2,7 @@ target="_blank" {href} aria-label={ariaLabel} - class="{className || ''} {showIcon ? 'external-link-with-icon' : ''} {normalIconColor ? 'normal-icon-color' : ''}"> + class={computedClass}> {#if showIcon} @@ -24,12 +24,22 @@ } \ No newline at end of file diff --git a/routes/_components/status/StatusDetails.html b/routes/_components/status/StatusDetails.html index 1543bc6..513efd0 100644 --- a/routes/_components/status/StatusDetails.html +++ b/routes/_components/status/StatusDetails.html @@ -1,12 +1,26 @@
- + + {applicationName} + + + {:else} + + {applicationName} + + {/if} + @@ -14,7 +28,7 @@ {numReblogs} - @@ -27,7 +41,7 @@ .status-details { grid-area: details; display: grid; - grid-template-columns: minmax(0, max-content) min-content min-content; + grid-template-columns: minmax(0, max-content) min-content min-content min-content; grid-gap: 20px; align-items: center; justify-content: left; @@ -39,9 +53,33 @@ } :global(.status-absolute-date time) { + word-wrap: break-word; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + } + + :global(.status-application) { word-wrap: break-word; overflow: hidden; white-space: pre-wrap; + font-size: 1.1em; + } + + :global(.status-application, a.status-application, a.status-application:hover) { + color: var(--deemphasized-text-color); + } + + :global(a.status-application) { + display: inline-flex; + align-items: center; + } + + .status-application-span { + word-wrap: break-word; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } .status-favs-reblogs { @@ -78,6 +116,9 @@ .status-favs-reblogs { font-size: 1em; } + :global(.status-application) { + font-size: 1em; + } .status-details { grid-gap: 5px; justify-content: space-between; @@ -88,21 +129,22 @@