ghost 5.127.0 → 5.127.1
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.
- package/components/tryghost-i18n-5.127.1.tgz +0 -0
- package/core/built/admin/assets/admin-x-activitypub/admin-x-activitypub.js +2 -2
- package/core/built/admin/assets/admin-x-activitypub/{index-9vyYGTFg.mjs → index-BhzxZm-7.mjs} +8319 -8130
- package/core/built/admin/assets/admin-x-activitypub/{index-DsFs5lK0.mjs → index-BqFrbO6E.mjs} +2 -2
- package/core/built/admin/assets/{chunk.524.26236112ccb590199030.js → chunk.524.e6b0293eefcd2d23848f.js} +6 -6
- package/core/built/admin/assets/{chunk.582.8f3427a3fdd4dc0c14b4.js → chunk.582.dbda4c7f49cd241a0767.js} +8 -8
- package/core/built/admin/assets/{ghost-f22a17dd4f8592f0bf6ae28d6d454d9b.js → ghost-71ab6cab4367841fc79ac68cd664b0de.js} +214 -259
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +95521 -87956
- package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +1008 -126
- package/core/built/admin/assets/posts/posts.js +630 -733
- package/core/built/admin/assets/stats/stats.js +31295 -31199
- package/core/built/admin/index.html +3 -3
- package/core/server/api/endpoints/stats.js +40 -30
- package/core/server/services/email-service/email-templates/partials/styles.hbs +0 -8
- package/core/server/services/koenig/node-renderers/call-to-action-renderer.js +1 -1
- package/core/server/services/koenig/render-partials/email-button.js +5 -1
- package/core/server/services/stats/PostsStatsService.js +352 -91
- package/core/server/services/stats/ReferrersStatsService.js +215 -71
- package/core/server/services/stats/StatsService.js +9 -13
- package/core/server/web/api/endpoints/admin/routes.js +1 -1
- package/package.json +7 -7
- package/yarn.lock +57 -30
- package/components/tryghost-i18n-5.127.0.tgz +0 -0
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<title>Ghost</title>
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
<meta name="ghost-admin/config/environment" content="%7B%22modulePrefix%22%3A%22ghost-admin%22%2C%22environment%22%3A%22production%22%2C%22cdnUrl%22%3A%22%22%2C%22editorUrl%22%3A%22%22%2C%22rootURL%22%3A%22%22%2C%22locationType%22%3A%22trailing-hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%2C%22Array%22%3Atrue%2C%22String%22%3Atrue%2C%22Function%22%3Afalse%7D%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_JQUERY_INTEGRATION%22%3Atrue%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%22version%22%3A%225.127%22%2C%22name%22%3A%22ghost-admin%22%7D%2C%22ember-simple-auth%22%3A%7B%7D%2C%22%40sentry%2Fember%22%3A%7B%22disablePerformance%22%3Atrue%2C%22sentry%22%3A%7B%7D%7D%2C%22ember-cli-mirage%22%3A%7B%22usingProxy%22%3Afalse%2C%22useDefaultPassthroughs%22%3Atrue%7D%2C%22exportApplicationGlobal%22%3Afalse%2C%22ember-load%22%3A%7B%22loadingIndicatorClass%22%3A%22ember-load-indicator%22%7D%2C%22editorFilename%22%3A%22koenig-lexical.umd.js%22%2C%22editorHash%22%3A%
|
|
9
|
+
<meta name="ghost-admin/config/environment" content="%7B%22modulePrefix%22%3A%22ghost-admin%22%2C%22environment%22%3A%22production%22%2C%22cdnUrl%22%3A%22%22%2C%22editorUrl%22%3A%22%22%2C%22rootURL%22%3A%22%22%2C%22locationType%22%3A%22trailing-hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%2C%22Array%22%3Atrue%2C%22String%22%3Atrue%2C%22Function%22%3Afalse%7D%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_JQUERY_INTEGRATION%22%3Atrue%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%22version%22%3A%225.127%22%2C%22name%22%3A%22ghost-admin%22%7D%2C%22ember-simple-auth%22%3A%7B%7D%2C%22%40sentry%2Fember%22%3A%7B%22disablePerformance%22%3Atrue%2C%22sentry%22%3A%7B%7D%7D%2C%22ember-cli-mirage%22%3A%7B%22usingProxy%22%3Afalse%2C%22useDefaultPassthroughs%22%3Atrue%7D%2C%22exportApplicationGlobal%22%3Afalse%2C%22ember-load%22%3A%7B%22loadingIndicatorClass%22%3A%22ember-load-indicator%22%7D%2C%22editorFilename%22%3A%22koenig-lexical.umd.js%22%2C%22editorHash%22%3A%2237bd1e3e4d%22%2C%22adminXSettingsFilename%22%3A%22admin-x-settings.js%22%2C%22adminXSettingsHash%22%3A%22e88f88275d%22%2C%22adminXActivitypubFilename%22%3A%22admin-x-activitypub.js%22%2C%22adminXActivitypubHash%22%3A%22b86ef128c6%22%2C%22postsFilename%22%3A%22posts.js%22%2C%22postsHash%22%3A%22c196eec61d%22%2C%22statsFilename%22%3A%22stats.js%22%2C%22statsHash%22%3A%22c734781f94%22%2C%22adminXActivitypubCustomUrl%22%3A%22https%3A%2F%2Fcdn.jsdelivr.net%2Fghost%2Fadmin-x-activitypub%400%2Fdist%2Fadmin-x-activitypub.js%22%7D" />
|
|
10
10
|
|
|
11
11
|
<meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1, maximum-scale=1, minimal-ui, viewport-fit=cover" />
|
|
12
12
|
<meta name="pinterest" content="nopin" />
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
|
|
50
50
|
<script src="assets/vendor-48a1d3c3b32e8a313b8162c4cac00106.js"></script>
|
|
51
51
|
<script src="assets/chunk.383.69412a1ddeb7c0341d15.js"></script>
|
|
52
|
-
<script src="assets/chunk.524.
|
|
53
|
-
<script src="assets/ghost-
|
|
52
|
+
<script src="assets/chunk.524.e6b0293eefcd2d23848f.js"></script>
|
|
53
|
+
<script src="assets/ghost-71ab6cab4367841fc79ac68cd664b0de.js"></script>
|
|
54
54
|
</body>
|
|
55
55
|
</html>
|
|
@@ -110,36 +110,6 @@ const controller = {
|
|
|
110
110
|
return await statsService.api.getReferrersHistory();
|
|
111
111
|
}
|
|
112
112
|
},
|
|
113
|
-
referrersHistoryWithRange: {
|
|
114
|
-
headers: {
|
|
115
|
-
cacheInvalidate: false
|
|
116
|
-
},
|
|
117
|
-
options: [
|
|
118
|
-
'date_from',
|
|
119
|
-
'date_to',
|
|
120
|
-
'timezone',
|
|
121
|
-
'member_status'
|
|
122
|
-
],
|
|
123
|
-
permissions: {
|
|
124
|
-
docName: 'posts',
|
|
125
|
-
method: 'browse'
|
|
126
|
-
},
|
|
127
|
-
cache: statsService.cache,
|
|
128
|
-
generateCacheKeyData(frame) {
|
|
129
|
-
return {
|
|
130
|
-
method: 'referrersHistoryWithRange',
|
|
131
|
-
options: {
|
|
132
|
-
date_from: frame.options.date_from,
|
|
133
|
-
date_to: frame.options.date_to,
|
|
134
|
-
timezone: frame.options.timezone,
|
|
135
|
-
member_status: frame.options.member_status
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
},
|
|
139
|
-
async query(frame) {
|
|
140
|
-
return await statsService.api.getReferrersHistoryWithRange(frame.options.date_from, frame.options.date_to);
|
|
141
|
-
}
|
|
142
|
-
},
|
|
143
113
|
topContent: {
|
|
144
114
|
headers: {
|
|
145
115
|
cacheInvalidate: false
|
|
@@ -531,7 +501,47 @@ const controller = {
|
|
|
531
501
|
data: [memberCounts]
|
|
532
502
|
};
|
|
533
503
|
}
|
|
504
|
+
},
|
|
505
|
+
topSourcesGrowth: {
|
|
506
|
+
headers: {
|
|
507
|
+
cacheInvalidate: false
|
|
508
|
+
},
|
|
509
|
+
options: [
|
|
510
|
+
'order',
|
|
511
|
+
'limit',
|
|
512
|
+
'date_from',
|
|
513
|
+
'date_to',
|
|
514
|
+
'timezone',
|
|
515
|
+
'member_status'
|
|
516
|
+
],
|
|
517
|
+
permissions: {
|
|
518
|
+
docName: 'posts',
|
|
519
|
+
method: 'browse'
|
|
520
|
+
},
|
|
521
|
+
cache: statsService.cache,
|
|
522
|
+
generateCacheKeyData(frame) {
|
|
523
|
+
return {
|
|
524
|
+
method: 'topSourcesGrowth',
|
|
525
|
+
options: {
|
|
526
|
+
order: frame.options.order,
|
|
527
|
+
limit: frame.options.limit,
|
|
528
|
+
date_from: frame.options.date_from,
|
|
529
|
+
date_to: frame.options.date_to,
|
|
530
|
+
timezone: frame.options.timezone,
|
|
531
|
+
member_status: frame.options.member_status
|
|
532
|
+
}
|
|
533
|
+
};
|
|
534
|
+
},
|
|
535
|
+
async query(frame) {
|
|
536
|
+
return await statsService.api.getTopSourcesWithRange(
|
|
537
|
+
frame.options.date_from,
|
|
538
|
+
frame.options.date_to,
|
|
539
|
+
frame.options.order || 'free_members desc',
|
|
540
|
+
frame.options.limit || 50
|
|
541
|
+
);
|
|
542
|
+
}
|
|
534
543
|
}
|
|
544
|
+
|
|
535
545
|
};
|
|
536
546
|
|
|
537
547
|
module.exports = controller;
|
|
@@ -25,11 +25,7 @@ body {
|
|
|
25
25
|
font-family: -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
|
|
26
26
|
-webkit-font-smoothing: antialiased;
|
|
27
27
|
font-size: 18px;
|
|
28
|
-
{{#hasFeature "emailCustomization"}}
|
|
29
28
|
line-height: 0;
|
|
30
|
-
{{else}}
|
|
31
|
-
line-height: 1.4;
|
|
32
|
-
{{/hasFeature}}
|
|
33
29
|
margin: 0;
|
|
34
30
|
padding: 0;
|
|
35
31
|
-ms-text-size-adjust: 100%;
|
|
@@ -56,16 +52,12 @@ table td {
|
|
|
56
52
|
------------------------------------- */
|
|
57
53
|
.body {
|
|
58
54
|
width: 100%;
|
|
59
|
-
{{#hasFeature "emailCustomization"}}
|
|
60
55
|
line-height: 1.4;
|
|
61
|
-
{{/hasFeature}}
|
|
62
56
|
background-color: {{backgroundColor}} !important;
|
|
63
57
|
}
|
|
64
58
|
|
|
65
59
|
.header {
|
|
66
|
-
{{#hasFeature "emailCustomization"}}
|
|
67
60
|
line-height: 1.4;
|
|
68
|
-
{{/hasFeature}}
|
|
69
61
|
{{#if headerBackgroundColor}}
|
|
70
62
|
background-color: {{headerBackgroundColor}};
|
|
71
63
|
{{else}}
|
|
@@ -86,7 +86,7 @@ function emailCTATemplate(dataset, options = {}) {
|
|
|
86
86
|
const isBlackButton = dataset.buttonColor === 'black' || dataset.buttonColor === '#000000' || dataset.buttonColor === '#000';
|
|
87
87
|
|
|
88
88
|
if (isTransparentCTA && isDarkBackground && isBlackButton) {
|
|
89
|
-
dataset.buttonColor = '
|
|
89
|
+
dataset.buttonColor = '#ffffff';
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
const buttonHtml = renderEmailButton({
|
|
@@ -78,12 +78,16 @@ function _isColoredOutline({color, style}) {
|
|
|
78
78
|
return color && color !== 'accent' && style === 'outline';
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
function _isValidHexColor(color) {
|
|
82
|
+
return /^#([0-9a-fA-F]{6}|[0-9a-fA-F]{3})$/.test(color);
|
|
83
|
+
}
|
|
84
|
+
|
|
81
85
|
/**
|
|
82
86
|
* @param {EmailButtonOptions} options
|
|
83
87
|
* @returns {string}
|
|
84
88
|
*/
|
|
85
89
|
function _getTextColor({color, style}) {
|
|
86
|
-
if (_isColoredFill({color, style})) {
|
|
90
|
+
if (_isColoredFill({color, style}) && _isValidHexColor(color)) {
|
|
87
91
|
return textColorForBackgroundColor(color).hex();
|
|
88
92
|
}
|
|
89
93
|
|