Commit Graph

17093 Commits

Author SHA1 Message Date
Daniel Lockyer
6d9b4b395f
Released Portal v2.30.0 2023-05-05 13:27:20 +02:00
Daniel Lockyer
b0483d1ef3
Updated supported locales 2023-05-05 13:24:41 +02:00
Daniel Lockyer
443ff9079b
Auto-generated translations
- this fixes some issues detected by i18next
2023-05-05 13:23:23 +02:00
Eflarus
1e51815f33
Added Russian locale (#16719)
refs https://github.com/TryGhost/Team/issues/2795
2023-05-05 13:22:34 +02:00
Rishabh Garg
6c131de6eb
Added image editing feature for publication logo and cover (#16741)
refs https://github.com/TryGhost/Team/issues/3145

- adds image editing functionality(behind flag) using pintura
integration to publication logo and cover
2023-05-05 16:30:34 +05:30
Sodbileg Gansukh
e50bc87780 Added explicit rules to announcement bar styles
refs https://github.com/TryGhost/Team/issues/3143

- due to the reset, some default styles stopped working
- this adds those missing explicit styles
2023-05-05 18:22:30 +08:00
Daniel Lockyer
16ea824f71
Fixed building Admin in development mode for browser tests
- I switched over `build` to run in production mode because we now do
  `lerna run build` during the release process, but this was bundling
  development assets
- this adds `build:dev` and switches the browser test to use that, so
  they should use the development assets moving forwards
2023-05-05 12:13:11 +02:00
Elena Baidakova
4207c9d0d1
Added browser tests for announcement bar (#16742)
refs TryGhost/Team#3122

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 87727d9</samp>

Added `data-testid` attributes to various elements in the announcement
bar settings feature to enable Playwright testing. Fixed a potential bug
with the `visibilitySettings` getter in the `visibility.js` component.
Added Playwright tests for the announcement bar settings feature in
`announcement-bar-settings.spec.js`.
2023-05-05 14:11:26 +04:00
Sodbileg Gansukh
ffe6a472a9 Added a reset to the announcement bar styles
refs https://github.com/TryGhost/Team/issues/3143

- the reset was added to reduce the theme style conflict as much as possible
2023-05-05 17:58:37 +08:00
Simon Backx
05bba5135d
Cleaned up sourceAttribution flag (#16740)
no issue

This commit removes the `sourceAttribution` feature flag from the
codebase.
2023-05-05 10:57:26 +02:00
Daniel Lockyer
aede64acb9
Switched yarn build to run in production for Admin builds
- it's pretty rare we ever want to do a manual development build, so we
  can just let `yarn build` be for production
2023-05-05 10:53:19 +02:00
Daniel Lockyer
cf41c3ad54
Removed final declaration of oembed-parser
refs 27e4523aec

- we no longer use `oembed-parser`, so we can remove it from
  package.json
- also pins the `@extractus/oembed-extractor` package and adds it into
  `@tryghost/oembed-service` where it was missing
2023-05-05 10:48:16 +02:00
renovate[bot]
0cdf555758 Update dependency vitest to v0.31.0 2023-05-05 09:48:36 +02:00
Simon Backx
fbed93b866
🐛 Added missing history logs for post/page bulk actions (#16734)
no issue

The post/page bulk actions weren't logged in the history log / actions
table.

This change adds support for logging bulk actions.
- New `addActions` static method on models. It creates an action log in
the database for multiple models at once. If only one model was edited,
deleted or added, it will fallback to `addAction`
- `addAction` can also be called statically now
- `actionName` option is now supported when using `addActions`,
`addAction`, and as a result also in all bulk manipulation methods, and
CRUD methods. This allows you to replace the default '5 posts edited'
into something more specific like '5 posts featured'
- Fixed support for null resource_id in the parse-history-event helper
- Removed the default 'published' status requirement when using
Post.findOne for internal queries.
2023-05-05 09:45:36 +02:00
Chris Raible
27e4523aec
🐛 Improved error message for unauthorized YouTube embeds (#16374)
refs TryGhost/Ghost#16048

- When attempting to embed a Youtube video that has had embedding
disabled by its owner/author, Ghost displayed a generic error message
that didn't indicate the reason for the failed emebed.
- This change updated the error message when Youtube (or any provider)
returns 401: Unauthorized to indicate that the owner of the resource has
explicitly disabled embedding.
2023-05-04 16:04:58 -07:00
Simon Backx
848b2d82a1
Cleaned up suppressionList feature flag (#16736)
no issue

This pull request removes the `suppressionList` feature flag and all its
dependencies from the codebase. It makes the suppression list feature
the default and consistent behavior for all email events and
newsletters. It simplifies the UI, logic, and data related to email
events and newsletters. It affects several files in the
`ghost/admin/app`, `ghost/core/core`, and `ghost/members-api`
directories.
2023-05-04 14:47:04 +02:00
Simon Backx
17a6217cc7 🐛 Fixed members breadcrumbs when not coming from analytics
fixes https://github.com/TryGhost/Team/issues/2404

This change introduces a new 'post' query parameter to the members and member routes.

Previously, the members route would check if the previous route was the analytics page, and then show the breadcrumbs to go back to the analytics page. But when navigating to the members page from the menu, we don't want to show the breadcrumbs. To accomplish this, the routes that point to the members page from the analytics page now specifically pass on the post id in the query parameters. The query parameter is then passed on from the members page to the member page.

`directlyFromAnalytics` is still used in the member route, to know wheter we came from the members page or from the analytics page (changes the breadcrumbs). This doesn't need to go via a query parameter (figured that would make the url too long/complex).

The resetController method is now implemented and resets the filter and/or fromAnalytics post id if required (when going from members to member, we don't want to reset it because the we would lose the filter going back).
2023-05-04 11:20:33 +02:00
renovate[bot]
b407676b94 Update dependency vite to v4.3.4 2023-05-04 07:19:15 +02:00
Chris Raible
b62a642084
Added background save every 10 minutes to the lexical editor (#16732)
refs TryGhost/Team#3133

- the backend previously had logic to save a revision if more than 10
mins had elapsed since the last revision
- however, the frontend would autosave after 3 seconds of inactivity
(which doesn't trigger a revision), and never send another save request
at 10 minutes, so the backend logic to save a revision was never
triggered
- this change will save the current contents of the editor every 10
minutes, even if nothing has changed since the last save
2023-05-03 14:46:32 -07:00
Fabien "egg" O'Carroll
b9565bc290 Migrated @tryghost/post-revisions to TypeScript!
This is an initial start to using TypeScript in our non-core Ghost packages.

- Adds a prepare script to build the project after installing deps
- Adds an initial tsconfig.json which is compatible with our node env
- Migrates all of the code to TypeScript, including tests
- Updates tests to use ts-node so that we don't need to compile the tests
- ts-node is installed at the top level because the env is weird with lerna and
  doesn't work otherwise
- Updates the yarn dev script to build the project with the --all and --revisions flag
2023-05-03 14:32:31 -04:00
Fabien "egg" O'Carroll
ed674981e6 Updated npm scripts to support packages with a build step
- Updates the prepare script in the top level to run prepare on packages, so
  that packages can be built when running `yarn`

- Updates the build script in ghost/core to run build on packages, so that
  packages are built before being monobundled

- Updates monobundle to be a dependency and use the new TryGhost repo, which
  includes some minor fixes and improvements, such as supporting devDeps

- Updates the GitHub workflows to run the build command in the top level
  directory rather than ghost/core so that other packages are built, too.
2023-05-03 14:32:31 -04:00
Sam Lord
cb30c9bbc9 Prevent posts_meta data from killing the data-generator process
no issue
2023-05-03 16:28:29 +01:00
Simon Backx
84c6c0397b 🐛 Fixed CMD/shift clicking to open the editor in a new tab/window
refs https://ghost.slack.com/archives/C025584CA/p1683105468216909

When holding cmd,ctrl or shift when clicking a post list item, it would try to select it. But that meant some user flows were broken where users would open multiple posts at the same time in a new tab.

This change allows you to cmd/ctrl/shift/right click on the edit button again.
2023-05-03 17:02:26 +02:00
Ghost CI
81c93c16f0 Merged v5.46.1 into main 2023-05-03 13:47:34 +01:00
Ghost CI
17025cd344 v5.46.1 2023-05-03 13:47:31 +01:00
Fabien "egg" O'Carroll
b3caf16005 🔒 Fixed filtering on private Author fields in Content API
refs https://github.com/TryGhost/Ghost/security/advisories/GHSA-r97q-ghch-82j9

Because our filtering layer is so coupled to the DB and we don't generally
apply restrictions, it was possible to fetch authors and filter by their
password or email field. Coupled with the "starts with" operator this can be
used to brute force the first character of these fields by trying random
combinations until an author is included in the filter. After which the next
character can be brute forced, and so on until the data has been leaked
completely.
2023-05-03 08:43:20 -04:00
Fabien "egg" O'Carroll
a22717a8e7 🔒 Fixed filtering on private Author fields in Content API
refs https://github.com/TryGhost/Ghost/security/advisories/GHSA-r97q-ghch-82j9

Because our filtering layer is so coupled to the DB and we don't generally
apply restrictions, it was possible to fetch authors and filter by their
password or email field. Coupled with the "starts with" operator this can be
used to brute force the first character of these fields by trying random
combinations until an author is included in the filter. After which the next
character can be brute forced, and so on until the data has been leaked
completely.
2023-05-03 08:25:27 -04:00
Simon Backx
514c8917c0 Readded matchMetadataSnapshot
refs bac2f4d4d4 (diff-473dc0c49e80df6c07569ed5730445ebdaaa8138fc819182548727db50eb55aa)
2023-05-03 14:14:10 +02:00
Simon Backx
fd69ab181d Removed duplicate matchHTMLSnapshot 2023-05-03 14:13:04 +02:00
Simon Backx
bac2f4d4d4 Fixed snapshot tests for MySQL only newsletter test
no issue

There was an error when generating the snapshot for this test. It never ran, so the snapshot was never committed. On top of that, the generated snapshot would change every time because the email verification token was not replaced with a static value.
2023-05-03 14:05:53 +02:00
Ronald Langeveld
6189040fc4
Added unpublished reason to post revisions (#16726)
closes https://github.com/TryGhost/Team/issues/3137

We have now included the ability to display an "Unpublished" tag for revisions that have been unpublished. The tag is only displayed when the revision's reason property is set to "unpublished". A new revision is triggered when a post is unpublished, regardless whether there's a change in the content.
2023-05-03 09:20:34 +02:00
Fabien "egg" O'Carroll
cef062452b Fixed typo when referring to revision author 2023-05-02 19:50:34 -04:00
Fabien 'egg' O'Carroll
d87da627d9
Added author image to revision history list (#16724)
refs https://github.com/TryGhost/Team/issues/3129

This has copied the same pattern from the gh-user-list-item component.

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2023-05-02 19:38:31 -04:00
Ronald
ad3c5d1a0b Fixed linting
refs https://ghost.slack.com/archives/C02G9E68C/p1683036435533879

- Indentation errors was being ignored by eslint.
- Fixed it to bring it up to standard.
2023-05-02 19:55:51 +02:00
Sam Lord
f7188b4dcf Prevented an invalid order during deletion
no issue

Will allow the demo data script to run if offers exist and have been redeemed
2023-05-02 16:34:47 +01:00
Michael Barrett
b60761706b
Prevented post history from being viewed for emailed posts (#16704)
refs https://github.com/orgs/TryGhost/projects/88/views/2?pane=issue&itemId=26198422

Prevented post history from being viewed in the following scenarios:

- When a post is sent as and email only
- When a post is published and sent as an email
2023-05-02 15:58:56 +01:00
Simon Backx
6aa8fa2a8e Updated Portal back button translations
refs https://github.com/TryGhost/Ghost/issues/16628
2023-05-02 16:51:48 +02:00
Sanne de Vries
2342bfd06f Updated status badges in post revision list
Refs https://github.com/TryGhost/Team/issues/3123
2023-05-02 11:30:18 +02:00
Simon Backx
1b38361211 Updated @sentry/node to v7.50.0 and reenabled renovate again
fixes https://github.com/TryGhost/Team/issues/2385

The Sentry version has been locked to v7.11.1 for some time because Sentry still used a legacy Node feature, called domains. Due to a bug or change in in Noide 16+, those domains broke handling uncaught promise execptions. So Ghost crashed when a promise exception wasn't caught. But that shouldn't be the case because we have a global uncaught exception handler.

Luckily Sentry switched to AsyncLocalStorage in v7.48.0. This fixes the issue as demonstrated in c0cd62184c
2023-05-02 10:23:45 +02:00
Ronald
df1329f5e9 Added unpublished logic to revisionList.
refs https://github.com/TryGhost/Team/issues/3123

Refactor revisionList function to use a more concise logic for finding new published and unpublished revisions.
2023-05-02 09:11:56 +02:00
Peter Zimon
9dea2ef911 Contributor view post button color update
no refs.

- the hover color for the "View post" button was the same as the "Edit" which is a bit misleading
2023-05-02 06:46:24 +02:00
Peter Zimon
a55efec7be Contributor post list button fix
no refs.

- On the post list, an edit button was shown for contributors even if the post has been published. Clicking on this reloaded the post list
2023-05-02 06:40:51 +02:00
Fabien "egg" O'Carroll
a90cc2d7ab Fixed sodo-search build script 2023-05-01 13:00:37 -04:00
renovate[bot]
e7cef15bdf Update dependency jsdom to v21.1.2 2023-05-01 18:22:36 +02:00
Daniel Lockyer
83ee1f8860
🔥 Dropped support for Node 14
refs https://github.com/TryGhost/Toolbox/issues/570

- Node 14 is now EOL so we don't support it any further
2023-05-01 17:51:10 +02:00
Elena Baidakova
7ade895ce7
Hide preview select for design/announcement settings (#16721)
no issue
- Hide post preview select if there is no published posts yet.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
copilot:summary
2023-05-01 18:50:13 +04:00
Uvindu Rajapakshe
dc1ff890a0
Updated Sinhalese translations (#16639) 2023-05-01 16:49:04 +02:00
renovate[bot]
67abd6555b Update CSS preprocessors 2023-05-01 16:43:16 +02:00
Zabriskije
f81c7568fe Fixes for it localization 2023-05-01 15:19:16 +02:00
Andre Rafael
90adb7562b Added Portuguese locale for Portal 2023-05-01 15:18:36 +02:00