ghost 5.97.2 → 5.98.0

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.
Files changed (183) hide show
  1. package/components/tryghost-adapter-cache-memory-ttl-5.98.0.tgz +0 -0
  2. package/components/{tryghost-adapter-cache-redis-5.97.2.tgz → tryghost-adapter-cache-redis-5.98.0.tgz} +0 -0
  3. package/components/tryghost-adapter-manager-5.98.0.tgz +0 -0
  4. package/components/tryghost-announcement-bar-settings-5.98.0.tgz +0 -0
  5. package/components/{tryghost-api-framework-5.97.2.tgz → tryghost-api-framework-5.98.0.tgz} +0 -0
  6. package/components/tryghost-api-version-compatibility-service-5.98.0.tgz +0 -0
  7. package/components/tryghost-audience-feedback-5.98.0.tgz +0 -0
  8. package/components/tryghost-bookshelf-repository-5.98.0.tgz +0 -0
  9. package/components/tryghost-bootstrap-socket-5.98.0.tgz +0 -0
  10. package/components/tryghost-collections-5.98.0.tgz +0 -0
  11. package/components/tryghost-constants-5.98.0.tgz +0 -0
  12. package/components/tryghost-custom-fonts-5.98.0.tgz +0 -0
  13. package/components/tryghost-custom-theme-settings-service-5.98.0.tgz +0 -0
  14. package/components/{tryghost-data-generator-5.97.2.tgz → tryghost-data-generator-5.98.0.tgz} +0 -0
  15. package/components/tryghost-domain-events-5.98.0.tgz +0 -0
  16. package/components/tryghost-donations-5.98.0.tgz +0 -0
  17. package/components/tryghost-dynamic-routing-events-5.98.0.tgz +0 -0
  18. package/components/tryghost-email-addresses-5.98.0.tgz +0 -0
  19. package/components/tryghost-email-analytics-provider-mailgun-5.98.0.tgz +0 -0
  20. package/components/{tryghost-email-analytics-service-5.97.2.tgz → tryghost-email-analytics-service-5.98.0.tgz} +0 -0
  21. package/components/tryghost-email-content-generator-5.98.0.tgz +0 -0
  22. package/components/tryghost-email-events-5.98.0.tgz +0 -0
  23. package/components/{tryghost-email-service-5.97.2.tgz → tryghost-email-service-5.98.0.tgz} +0 -0
  24. package/components/tryghost-email-suppression-list-5.98.0.tgz +0 -0
  25. package/components/{tryghost-express-dynamic-redirects-5.97.2.tgz → tryghost-express-dynamic-redirects-5.98.0.tgz} +0 -0
  26. package/components/tryghost-external-media-inliner-5.98.0.tgz +0 -0
  27. package/components/tryghost-extract-api-key-5.98.0.tgz +0 -0
  28. package/components/tryghost-ghost-5.98.0.tgz +0 -0
  29. package/components/{tryghost-html-to-plaintext-5.97.2.tgz → tryghost-html-to-plaintext-5.98.0.tgz} +0 -0
  30. package/components/tryghost-i18n-5.98.0.tgz +0 -0
  31. package/components/tryghost-importer-handler-content-files-5.98.0.tgz +0 -0
  32. package/components/{tryghost-importer-revue-5.97.2.tgz → tryghost-importer-revue-5.98.0.tgz} +0 -0
  33. package/components/tryghost-in-memory-repository-5.98.0.tgz +0 -0
  34. package/components/{tryghost-job-manager-5.97.2.tgz → tryghost-job-manager-5.98.0.tgz} +0 -0
  35. package/components/tryghost-link-redirects-5.98.0.tgz +0 -0
  36. package/components/tryghost-link-replacer-5.98.0.tgz +0 -0
  37. package/components/{tryghost-link-tracking-5.97.2.tgz → tryghost-link-tracking-5.98.0.tgz} +0 -0
  38. package/components/{tryghost-magic-link-5.97.2.tgz → tryghost-magic-link-5.98.0.tgz} +0 -0
  39. package/components/tryghost-mail-events-5.98.0.tgz +0 -0
  40. package/components/{tryghost-mailgun-client-5.97.2.tgz → tryghost-mailgun-client-5.98.0.tgz} +0 -0
  41. package/components/tryghost-member-attribution-5.98.0.tgz +0 -0
  42. package/components/{tryghost-member-events-5.97.2.tgz → tryghost-member-events-5.98.0.tgz} +0 -0
  43. package/components/{tryghost-members-api-5.97.2.tgz → tryghost-members-api-5.98.0.tgz} +0 -0
  44. package/components/{tryghost-members-csv-5.97.2.tgz → tryghost-members-csv-5.98.0.tgz} +0 -0
  45. package/components/{tryghost-members-events-service-5.97.2.tgz → tryghost-members-events-service-5.98.0.tgz} +0 -0
  46. package/components/{tryghost-members-importer-5.97.2.tgz → tryghost-members-importer-5.98.0.tgz} +0 -0
  47. package/components/tryghost-members-offers-5.98.0.tgz +0 -0
  48. package/components/tryghost-members-payments-5.98.0.tgz +0 -0
  49. package/components/tryghost-members-ssr-5.98.0.tgz +0 -0
  50. package/components/{tryghost-members-stripe-service-5.97.2.tgz → tryghost-members-stripe-service-5.98.0.tgz} +0 -0
  51. package/components/tryghost-mentions-email-report-5.98.0.tgz +0 -0
  52. package/components/tryghost-metrics-server-5.98.0.tgz +0 -0
  53. package/components/tryghost-milestones-5.98.0.tgz +0 -0
  54. package/components/tryghost-minifier-5.98.0.tgz +0 -0
  55. package/components/tryghost-model-to-domain-event-interceptor-5.98.0.tgz +0 -0
  56. package/components/tryghost-mw-api-version-mismatch-5.98.0.tgz +0 -0
  57. package/components/tryghost-mw-cache-control-5.98.0.tgz +0 -0
  58. package/components/tryghost-mw-error-handler-5.98.0.tgz +0 -0
  59. package/components/tryghost-mw-session-from-token-5.98.0.tgz +0 -0
  60. package/components/tryghost-mw-update-user-last-seen-5.98.0.tgz +0 -0
  61. package/components/tryghost-mw-version-match-5.98.0.tgz +0 -0
  62. package/components/tryghost-mw-vhost-5.98.0.tgz +0 -0
  63. package/components/tryghost-nql-filter-expansions-5.98.0.tgz +0 -0
  64. package/components/tryghost-oembed-service-5.98.0.tgz +0 -0
  65. package/components/tryghost-package-json-5.98.0.tgz +0 -0
  66. package/components/tryghost-post-events-5.98.0.tgz +0 -0
  67. package/components/tryghost-post-revisions-5.98.0.tgz +0 -0
  68. package/components/{tryghost-posts-service-5.97.2.tgz → tryghost-posts-service-5.98.0.tgz} +0 -0
  69. package/components/{tryghost-recommendations-5.97.2.tgz → tryghost-recommendations-5.98.0.tgz} +0 -0
  70. package/components/tryghost-referrers-5.98.0.tgz +0 -0
  71. package/components/{tryghost-security-5.97.2.tgz → tryghost-security-5.98.0.tgz} +0 -0
  72. package/components/tryghost-session-service-5.98.0.tgz +0 -0
  73. package/components/tryghost-settings-path-manager-5.98.0.tgz +0 -0
  74. package/components/tryghost-slack-notifications-5.98.0.tgz +0 -0
  75. package/components/{tryghost-staff-service-5.97.2.tgz → tryghost-staff-service-5.98.0.tgz} +0 -0
  76. package/components/{tryghost-stats-service-5.97.2.tgz → tryghost-stats-service-5.98.0.tgz} +0 -0
  77. package/components/{tryghost-tiers-5.97.2.tgz → tryghost-tiers-5.98.0.tgz} +0 -0
  78. package/components/{tryghost-update-check-service-5.97.2.tgz → tryghost-update-check-service-5.98.0.tgz} +0 -0
  79. package/components/tryghost-verification-trigger-5.98.0.tgz +0 -0
  80. package/components/tryghost-version-notifications-data-service-5.98.0.tgz +0 -0
  81. package/components/{tryghost-webmentions-5.97.2.tgz → tryghost-webmentions-5.98.0.tgz} +0 -0
  82. package/content/themes/source/assets/built/screen.css +1 -1
  83. package/content/themes/source/assets/built/screen.css.map +1 -1
  84. package/content/themes/source/assets/css/screen.css +3 -2
  85. package/content/themes/source/package.json +2 -2
  86. package/core/built/admin/assets/admin-x-activitypub/admin-x-activitypub.js +3 -3
  87. package/core/built/admin/assets/admin-x-activitypub/{index-ce1044b4.mjs → index-d0087e93.mjs} +4049 -3812
  88. package/core/built/admin/assets/admin-x-activitypub/modals-aaaeb2ed.mjs +218 -0
  89. package/core/built/admin/assets/admin-x-demo/admin-x-demo.js +2 -2
  90. package/core/built/admin/assets/admin-x-demo/{index-4e95bd22.mjs → index-ec1c4705.mjs} +1516 -1510
  91. package/core/built/admin/assets/admin-x-demo/{modals-1dd517c9.mjs → modals-3bfb50e8.mjs} +2 -2
  92. package/core/built/admin/assets/admin-x-settings/{CodeEditorView-56b3751e.mjs → CodeEditorView-72579105.mjs} +2 -2
  93. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +3 -3
  94. package/core/built/admin/assets/admin-x-settings/{index-a57b83d6.mjs → index-253cc6ec.mjs} +6929 -6721
  95. package/core/built/admin/assets/admin-x-settings/{index-ae6dfa81.mjs → index-c8b38805.mjs} +2 -2
  96. package/core/built/admin/assets/admin-x-settings/{modals-8dbfe675.mjs → modals-e1b17636.mjs} +7277 -7295
  97. package/core/built/admin/assets/{chunk.524.82c092e46f657d9ab2d8.js → chunk.524.3ed488a4afaa8dc49de8.js} +5 -5
  98. package/core/built/admin/assets/{chunk.582.2ac63c887405b603b625.js → chunk.582.4832ffb3f13ae2b00734.js} +6 -6
  99. package/core/built/admin/assets/{ghost-b7702081322ac2a966ad205b1d07416c.js → ghost-7a6db87f125f7ea41beb7a88d500e8dc.js} +173 -144
  100. package/core/built/admin/index.html +3 -3
  101. package/core/frontend/apps/amp/lib/views/amp.hbs +1 -1
  102. package/core/frontend/helpers/body_class.js +32 -0
  103. package/core/frontend/helpers/content_api_url.js +28 -0
  104. package/core/frontend/helpers/ghost_head.js +32 -3
  105. package/core/frontend/meta/schema.js +1 -0
  106. package/core/frontend/services/theme-engine/preview.js +3 -1
  107. package/core/server/api/endpoints/session.js +12 -2
  108. package/core/server/data/migrations/versions/5.97/2024-10-09-14-04-10-add-session-verification-field.js +25 -0
  109. package/core/server/models/comment.js +25 -0
  110. package/core/server/services/auth/session/SessionStore.js +0 -6
  111. package/core/server/services/auth/session/index.js +22 -1
  112. package/core/server/services/auth/session/middleware.js +55 -6
  113. package/core/server/services/url/Queue.js +14 -13
  114. package/core/server/services/url/Resources.js +4 -3
  115. package/core/server/services/url/UrlGenerator.js +4 -8
  116. package/core/server/services/url/UrlService.js +2 -3
  117. package/core/server/services/url/Urls.js +3 -6
  118. package/core/server/web/api/endpoints/admin/routes.js +2 -0
  119. package/core/server/web/shared/middleware/api/spam-prevention.js +62 -0
  120. package/core/server/web/shared/middleware/brute.js +22 -0
  121. package/core/shared/config/defaults.json +15 -3
  122. package/core/shared/config/env/config.testing-browser.json +12 -0
  123. package/core/shared/config/env/config.testing-mysql.json +12 -0
  124. package/core/shared/config/env/config.testing.json +12 -0
  125. package/core/shared/labs.js +3 -1
  126. package/nodemon.json +3 -0
  127. package/package.json +160 -154
  128. package/yarn.lock +191 -103
  129. package/components/tryghost-adapter-cache-memory-ttl-5.97.2.tgz +0 -0
  130. package/components/tryghost-adapter-manager-5.97.2.tgz +0 -0
  131. package/components/tryghost-announcement-bar-settings-5.97.2.tgz +0 -0
  132. package/components/tryghost-api-version-compatibility-service-5.97.2.tgz +0 -0
  133. package/components/tryghost-audience-feedback-5.97.2.tgz +0 -0
  134. package/components/tryghost-bookshelf-repository-5.97.2.tgz +0 -0
  135. package/components/tryghost-bootstrap-socket-5.97.2.tgz +0 -0
  136. package/components/tryghost-collections-5.97.2.tgz +0 -0
  137. package/components/tryghost-constants-5.97.2.tgz +0 -0
  138. package/components/tryghost-custom-theme-settings-service-5.97.2.tgz +0 -0
  139. package/components/tryghost-domain-events-5.97.2.tgz +0 -0
  140. package/components/tryghost-donations-5.97.2.tgz +0 -0
  141. package/components/tryghost-dynamic-routing-events-5.97.2.tgz +0 -0
  142. package/components/tryghost-email-addresses-5.97.2.tgz +0 -0
  143. package/components/tryghost-email-analytics-provider-mailgun-5.97.2.tgz +0 -0
  144. package/components/tryghost-email-content-generator-5.97.2.tgz +0 -0
  145. package/components/tryghost-email-events-5.97.2.tgz +0 -0
  146. package/components/tryghost-email-suppression-list-5.97.2.tgz +0 -0
  147. package/components/tryghost-external-media-inliner-5.97.2.tgz +0 -0
  148. package/components/tryghost-extract-api-key-5.97.2.tgz +0 -0
  149. package/components/tryghost-ghost-5.97.2.tgz +0 -0
  150. package/components/tryghost-i18n-5.97.2.tgz +0 -0
  151. package/components/tryghost-importer-handler-content-files-5.97.2.tgz +0 -0
  152. package/components/tryghost-in-memory-repository-5.97.2.tgz +0 -0
  153. package/components/tryghost-link-redirects-5.97.2.tgz +0 -0
  154. package/components/tryghost-link-replacer-5.97.2.tgz +0 -0
  155. package/components/tryghost-mail-events-5.97.2.tgz +0 -0
  156. package/components/tryghost-member-attribution-5.97.2.tgz +0 -0
  157. package/components/tryghost-members-offers-5.97.2.tgz +0 -0
  158. package/components/tryghost-members-payments-5.97.2.tgz +0 -0
  159. package/components/tryghost-members-ssr-5.97.2.tgz +0 -0
  160. package/components/tryghost-mentions-email-report-5.97.2.tgz +0 -0
  161. package/components/tryghost-metrics-server-5.97.2.tgz +0 -0
  162. package/components/tryghost-milestones-5.97.2.tgz +0 -0
  163. package/components/tryghost-minifier-5.97.2.tgz +0 -0
  164. package/components/tryghost-model-to-domain-event-interceptor-5.97.2.tgz +0 -0
  165. package/components/tryghost-mw-api-version-mismatch-5.97.2.tgz +0 -0
  166. package/components/tryghost-mw-cache-control-5.97.2.tgz +0 -0
  167. package/components/tryghost-mw-error-handler-5.97.2.tgz +0 -0
  168. package/components/tryghost-mw-session-from-token-5.97.2.tgz +0 -0
  169. package/components/tryghost-mw-update-user-last-seen-5.97.2.tgz +0 -0
  170. package/components/tryghost-mw-version-match-5.97.2.tgz +0 -0
  171. package/components/tryghost-mw-vhost-5.97.2.tgz +0 -0
  172. package/components/tryghost-nql-filter-expansions-5.97.2.tgz +0 -0
  173. package/components/tryghost-oembed-service-5.97.2.tgz +0 -0
  174. package/components/tryghost-package-json-5.97.2.tgz +0 -0
  175. package/components/tryghost-post-events-5.97.2.tgz +0 -0
  176. package/components/tryghost-post-revisions-5.97.2.tgz +0 -0
  177. package/components/tryghost-referrers-5.97.2.tgz +0 -0
  178. package/components/tryghost-session-service-5.97.2.tgz +0 -0
  179. package/components/tryghost-settings-path-manager-5.97.2.tgz +0 -0
  180. package/components/tryghost-slack-notifications-5.97.2.tgz +0 -0
  181. package/components/tryghost-verification-trigger-5.97.2.tgz +0 -0
  182. package/components/tryghost-version-notifications-data-service-5.97.2.tgz +0 -0
  183. package/core/built/admin/assets/admin-x-activitypub/modals-35dd1224.mjs +0 -250
@@ -1,250 +0,0 @@
1
- import { u as B, a as y, b as V, c as q, f as x, d as u, j as o, P as w, e as j, S as K, g as G, N as g, h as v, i as O, M as p, T as Q, s as H, L as A, B as L, k as f, l as F, A as k, m as S } from "./index-ce1044b4.mjs";
2
- function J(a) {
3
- const r = B(a);
4
- return y(() => {
5
- r.current = a;
6
- }), V(() => (...e) => {
7
- var t;
8
- return (t = r.current) == null ? void 0 : t.call(r, ...e);
9
- }, []);
10
- }
11
- var h = "Avatar", [W, ce] = q(h), [X, N] = W(h), C = x(
12
- (a, r) => {
13
- const { __scopeAvatar: e, ...t } = a, [l, s] = u("idle");
14
- return /* @__PURE__ */ o.jsx(
15
- X,
16
- {
17
- scope: e,
18
- imageLoadingStatus: l,
19
- onImageLoadingStatusChange: s,
20
- children: /* @__PURE__ */ o.jsx(w.span, { ...t, ref: r })
21
- }
22
- );
23
- }
24
- );
25
- C.displayName = h;
26
- var R = "AvatarImage", M = x(
27
- (a, r) => {
28
- const { __scopeAvatar: e, src: t, onLoadingStatusChange: l = () => {
29
- }, ...s } = a, n = N(R, e), i = Y(t), c = J((d) => {
30
- l(d), n.onImageLoadingStatusChange(d);
31
- });
32
- return j(() => {
33
- i !== "idle" && c(i);
34
- }, [i, c]), i === "loaded" ? /* @__PURE__ */ o.jsx(w.img, { ...s, ref: r, src: t }) : null;
35
- }
36
- );
37
- M.displayName = R;
38
- var I = "AvatarFallback", P = x(
39
- (a, r) => {
40
- const { __scopeAvatar: e, delayMs: t, ...l } = a, s = N(I, e), [n, i] = u(t === void 0);
41
- return y(() => {
42
- if (t !== void 0) {
43
- const c = window.setTimeout(() => i(!0), t);
44
- return () => window.clearTimeout(c);
45
- }
46
- }, [t]), n && s.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ o.jsx(w.span, { ...l, ref: r }) : null;
47
- }
48
- );
49
- P.displayName = I;
50
- function Y(a) {
51
- const [r, e] = u("idle");
52
- return j(() => {
53
- if (!a) {
54
- e("error");
55
- return;
56
- }
57
- let t = !0;
58
- const l = new window.Image(), s = (n) => () => {
59
- t && e(n);
60
- };
61
- return e("loading"), l.onload = s("loaded"), l.onerror = s("error"), l.src = a, () => {
62
- t = !1;
63
- };
64
- }, [a]), r;
65
- }
66
- var Z = C, D = M, ee = P;
67
- const U = ({ image: a, label: r, labelColor: e, bgColor: t, size: l, className: s }) => {
68
- let n = "", i = " -mb-2 ";
69
- switch (l) {
70
- case "sm":
71
- n = " w-7 h-7 text-sm ";
72
- break;
73
- case "lg":
74
- n = " w-12 h-12 text-xl ";
75
- break;
76
- case "xl":
77
- n = " w-16 h-16 text-2xl ", i = " -mb-3 ";
78
- break;
79
- case "2xl":
80
- n = " w-20 h-20 text-2xl ", i = " -mb-3 ";
81
- break;
82
- default:
83
- n = " w-10 h-10 text-md ";
84
- break;
85
- }
86
- return /* @__PURE__ */ o.jsxs(Z, { className: `relative inline-flex select-none items-center justify-center overflow-hidden rounded-full align-middle ${n}`, children: [
87
- a ? /* @__PURE__ */ o.jsx(D, { className: `absolute z-20 h-full w-full object-cover ${s && s}`, src: a }) : /* @__PURE__ */ o.jsx("span", { className: `${e && `text-${e}`} relative z-10 inline-flex h-full w-full items-center justify-center p-2 font-semibold ${s && s}`, style: t ? { backgroundColor: t } : {}, children: r }),
88
- /* @__PURE__ */ o.jsx(ee, { asChild: !0, children: /* @__PURE__ */ o.jsx(K, { className: `${i} absolute z-0 h-full w-full text-grey-300` }) })
89
- ] });
90
- }, $ = ({
91
- id: a,
92
- title: r,
93
- detail: e,
94
- action: t,
95
- hideActions: l,
96
- avatar: s,
97
- className: n,
98
- testId: i,
99
- separator: c = !0,
100
- bgOnHover: d = !0,
101
- paddingRight: z = !0,
102
- onClick: m,
103
- children: b
104
- }) => {
105
- const E = (T) => {
106
- m == null || m(T);
107
- }, _ = G(
108
- "group/list-item flex items-center justify-between",
109
- d && "hover:bg-gradient-to-r hover:from-white hover:to-grey-50 dark:hover:from-black dark:hover:to-grey-950",
110
- c ? "border-b border-grey-100 last-of-type:border-b-transparent hover:border-grey-200 dark:border-grey-900 dark:hover:border-grey-800" : "border-y border-transparent hover:border-grey-200 first-of-type:hover:border-t-transparent dark:hover:border-grey-800",
111
- n
112
- );
113
- return /* @__PURE__ */ o.jsxs("div", { className: _, "data-testid": i, children: [
114
- b || /* @__PURE__ */ o.jsxs("div", { className: `flex grow items-center gap-3 ${m && "cursor-pointer"}`, onClick: E, children: [
115
- s && s,
116
- /* @__PURE__ */ o.jsxs("div", { className: "flex grow flex-col py-3 pr-6", id: a, children: [
117
- /* @__PURE__ */ o.jsx("span", { children: r }),
118
- e && /* @__PURE__ */ o.jsx("span", { className: "text-xs text-grey-700", children: e })
119
- ] })
120
- ] }),
121
- t && /* @__PURE__ */ o.jsx("div", { className: `visible py-3 md:pl-6 ${z && "md:pr-6"} ${l ? "group-hover/list-item:visible md:invisible" : ""}`, children: t })
122
- ] });
123
- }, te = g.create(() => {
124
- const { updateRoute: a } = v(), r = g.useModal(), [e, t] = u(""), [l, s] = u(null);
125
- async function n() {
126
- H({
127
- message: "Site followed",
128
- type: "success"
129
- }), r.remove(), a("");
130
- }
131
- async function i() {
132
- s(l);
133
- }
134
- const c = O("index", n, i);
135
- return /* @__PURE__ */ o.jsx(
136
- p,
137
- {
138
- afterClose: () => {
139
- c.reset(), a("");
140
- },
141
- cancelLabel: "Cancel",
142
- okLabel: "Follow",
143
- size: "sm",
144
- title: "Follow a Ghost site",
145
- onOk: () => c.mutate(e),
146
- children: /* @__PURE__ */ o.jsx("div", { className: "mt-3 flex flex-col gap-4", children: /* @__PURE__ */ o.jsx(
147
- Q,
148
- {
149
- autoFocus: !0,
150
- error: !!l,
151
- hint: l,
152
- placeholder: "@username@hostname",
153
- title: "Profile name",
154
- value: e,
155
- "data-test-new-follower": !0,
156
- onChange: (d) => t(d.target.value)
157
- }
158
- ) })
159
- }
160
- );
161
- });
162
- function oe(a) {
163
- var s;
164
- const e = (s = F().data) == null ? void 0 : s.site, t = (e == null ? void 0 : e.url) ?? window.location.origin, l = new k(
165
- new URL(t),
166
- new URL("/ghost/api/admin/identities/", window.location.origin),
167
- a
168
- );
169
- return S({
170
- queryKey: [`followers:${a}`],
171
- async queryFn() {
172
- const n = await l.getFollowers();
173
- return await Promise.all(n.map((c) => l.getActor(c)));
174
- }
175
- });
176
- }
177
- const ae = ({}) => {
178
- const { updateRoute: a } = v(), { data: r = [], isLoading: e } = oe("index");
179
- return /* @__PURE__ */ o.jsx(
180
- p,
181
- {
182
- afterClose: () => {
183
- a("profile");
184
- },
185
- cancelLabel: "",
186
- footer: !1,
187
- okLabel: "",
188
- size: "md",
189
- title: "Followers",
190
- topRightContent: "close",
191
- children: /* @__PURE__ */ o.jsx("div", { className: "mt-3 flex flex-col gap-4 pb-12", children: e ? /* @__PURE__ */ o.jsx("p", { children: "Loading followers..." }) : /* @__PURE__ */ o.jsx(A, { children: r.map((t) => /* @__PURE__ */ o.jsx(
192
- $,
193
- {
194
- action: /* @__PURE__ */ o.jsx(L, { color: "grey", label: "Remove", link: !0 }),
195
- avatar: /* @__PURE__ */ o.jsx(U, { image: t.icon, size: "sm" }),
196
- detail: f(t),
197
- id: "list-item",
198
- title: t.name || f(t)
199
- },
200
- t.id
201
- )) }) })
202
- }
203
- );
204
- }, re = g.create(ae);
205
- function se(a) {
206
- var s;
207
- const e = (s = F().data) == null ? void 0 : s.site, t = (e == null ? void 0 : e.url) ?? window.location.origin, l = new k(
208
- new URL(t),
209
- new URL("/ghost/api/admin/identities/", window.location.origin),
210
- a
211
- );
212
- return S({
213
- queryKey: [`following:${a}`],
214
- async queryFn() {
215
- return l.getFollowing();
216
- }
217
- });
218
- }
219
- const le = ({}) => {
220
- const { updateRoute: a } = v(), { data: r = [] } = se("index");
221
- return /* @__PURE__ */ o.jsx(
222
- p,
223
- {
224
- afterClose: () => {
225
- a("profile");
226
- },
227
- cancelLabel: "",
228
- footer: !1,
229
- okLabel: "",
230
- size: "md",
231
- title: "Following",
232
- topRightContent: "close",
233
- children: /* @__PURE__ */ o.jsx("div", { className: "mt-3 flex flex-col gap-4 pb-12", children: /* @__PURE__ */ o.jsx(A, { children: r.map((e) => /* @__PURE__ */ o.jsx(
234
- $,
235
- {
236
- action: /* @__PURE__ */ o.jsx(L, { color: "grey", label: "Unfollow", link: !0 }),
237
- avatar: /* @__PURE__ */ o.jsx(U, { image: e.icon, size: "sm" }),
238
- detail: f(e),
239
- id: "list-item",
240
- title: e.name
241
- },
242
- e.id
243
- )) }) })
244
- }
245
- );
246
- }, ne = g.create(le), de = { FollowSite: te, ViewFollowing: ne, ViewFollowers: re };
247
- export {
248
- de as default
249
- };
250
- //# sourceMappingURL=modals-35dd1224.mjs.map