@astrosheep/square 0.3.39 → 0.3.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -6,7 +6,7 @@ export const ATTENTION_BODY_MAX = 100;
|
|
|
6
6
|
export function previewAttentionBody(body) {
|
|
7
7
|
const compact = body.replace(/\r\n/g, '\n');
|
|
8
8
|
if (compact.length <= ATTENTION_BODY_MAX)
|
|
9
|
-
return
|
|
9
|
+
return compact;
|
|
10
10
|
return `${compact.slice(0, ATTENTION_BODY_MAX).trimEnd()}\n… preview only`;
|
|
11
11
|
}
|
|
12
12
|
export function displayAttentionPath(squarePath) {
|
|
@@ -34,7 +34,7 @@ function renderBoundary(inbox) {
|
|
|
34
34
|
const count = pendingCount(inbox);
|
|
35
35
|
const noun = count === 1 ? 'notification' : 'notifications';
|
|
36
36
|
const header = `<system-reminder source="square">You have ${count} Square ${noun}.`;
|
|
37
|
-
const footer = ['
|
|
37
|
+
const footer = ['</system-reminder>'];
|
|
38
38
|
const queued = inbox.flatMap((membership) => membership.notifications.map((notification) => ({ membership, notification })));
|
|
39
39
|
const blocks = [];
|
|
40
40
|
const complete = [];
|