-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from strapi/chore/upgrade
Update: migrate to Strapi 5 + clean files
- Loading branch information
Showing
16 changed files
with
534 additions
and
282 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
name: 🌎 Content to manage | ||
about: Create a request about creating/updating/deleting content | ||
labels: content | ||
--- | ||
|
||
## Content management | ||
|
||
### Describe your request | ||
|
||
A clear and concise description of your request. Please include text, components, style, everything. | ||
|
||
### Expected behavior | ||
|
||
A clear and concise description of what you expected to have. | ||
|
||
### Screenshots | ||
|
||
If applicable, add screenshots to help explain your request. | ||
|
||
### Additional context | ||
|
||
Add any other context about the request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
name: 🤩 New feature | ||
about: Create a request about a new feature | ||
labels: enhancement | ||
assignees: mcastres | ||
--- | ||
|
||
## New feature | ||
|
||
### Describe your request | ||
|
||
A clear and concise description of your the feature you want to see on LaunchPad. | ||
|
||
### Expected behavior | ||
|
||
A clear and concise description of what you expected to have. | ||
|
||
### Screenshots | ||
|
||
If applicable, add screenshots to help explain your request. | ||
|
||
### Additional context | ||
|
||
Add any other context about the request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
--- | ||
name: 👩🔧 Something to fix | ||
about: Create a request about fixing a bug on LaunchPad | ||
labels: bug | ||
assignees: mcastres | ||
--- | ||
|
||
## Fix | ||
|
||
### Describe your request | ||
|
||
A clear and concise description of what needs to be fixed. | ||
|
||
### Steps to reproduce the behavior | ||
|
||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
### Expected behavior | ||
|
||
A clear and concise description of what you expected to happen. | ||
|
||
### Screenshots | ||
|
||
If applicable, add screenshots to help explain your request. | ||
|
||
### Additional context | ||
|
||
Add any other context about the request here. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
### What does it do? | ||
|
||
Describe the technical changes you did. | ||
|
||
### Why is it needed? | ||
|
||
Describe the issue you are solving. | ||
|
||
### How to test it? | ||
|
||
Simply make sure the whole Strapi application doesn't crash and the connected Next.js application is fully working. | ||
|
||
Some additional things to check: | ||
|
||
- [ ] Strapi project uuid is "LAUNCHPAD". `strapi/packages.json`. | ||
- [ ] If you updated content, make sure to create a new export in the `strapi/data` folder and update the `strapi/packages.json` seed command if necessary. | ||
- [ ] Strapi version is the latest possible. | ||
|
||
### Related issue(s)/PR(s) | ||
|
||
Let us know if this is related to any issue/pull request. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,22 +48,6 @@ yarn && yarn seed && yarn develop | |
|
||
This will install dependencies, sprinkle in some data magic, and run the server. (You can run these commands separately, but why not be efficient?) | ||
|
||
#### 🧑🚀 Credentials for your Crew: | ||
|
||
- Super Admin: | ||
- email: [email protected] | ||
- password: welcomeToStrapi123 | ||
|
||
- Editor | ||
- email: [email protected] | ||
- password: welcomeToStrapi123 | ||
|
||
- Author | ||
- email: [email protected] | ||
- password: welcomeToStrapi123 | ||
|
||
Feel free to change these credentials if you’re worried aliens might hack your content! (jk) | ||
|
||
## 3. Start Next.js | ||
|
||
We're almost ready for lift-off! Next.js is your sleek, futuristic interface for getting all that glorious content out into the world. 🚀 | ||
|
@@ -111,12 +95,14 @@ This installs dependencies, builds your project, and starts your server. You’r | |
## Todo | ||
|
||
- [ ] Implement the official Strapi SEO plugin | ||
- [ ] Implement the official Strapi preview plugin | ||
- [ ] Implement the community Strapi preview plugin | ||
- [ ] Create localized content for the pricing plans and products | ||
- [ ] Populate creator fields when it'll work on Strapi 5 (article authors information are missing) | ||
|
||
## Customization | ||
|
||
- The Strapi application contains a custom population middleware in order to populate more data than what it is set by default. You can find it in the `./strapi/src/middlewares/deepPopulate.ts` file. | ||
|
||
- The Strapi application contains a postinstall script that will regenerate an uuid for the project in order to get some anonuymous usage information concerning this demo. You can disable it by removing the uuid inside the `./strapi/packages.json` file. | ||
- The Strapi application contains a postinstall script that will regenerate an uuid for the project in order to get some anonymous usage information concerning this demo. You can disable it by removing the uuid inside the `./strapi/packages.json` file. | ||
|
||
- The Strapi application contains a patch for the @strapi/admin package. It is only necessary for the hosted demos since we automatically create the Super Admin users for them when they request this demo on our website. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,6 @@ $RECYCLE.BIN/ | |
*.csv | ||
*.dat | ||
*.dmg | ||
*.gz | ||
*.iso | ||
*.jar | ||
*.rar | ||
|
Binary file renamed
BIN
+22.7 MB
strapi/data/export_20240916150535.tar.gz → strapi/data/export_20240925113338.tar.gz
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/node_modules/@strapi/admin/dist/admin/index-hoTsgrwy.mjs b/node_modules/@strapi/admin/dist/admin/index-hoTsgrwy.mjs | ||
index 75eb9cc..cb58cb4 100644 | ||
--- a/node_modules/@strapi/admin/dist/admin/index-hoTsgrwy.mjs | ||
+++ b/node_modules/@strapi/admin/dist/admin/index-hoTsgrwy.mjs | ||
@@ -1966,8 +1966,8 @@ const Login = ({ children }) => { | ||
{ | ||
method: "PUT", | ||
initialValues: { | ||
- email: "", | ||
- password: "", | ||
+ email: "[email protected]", | ||
+ password: "welcomeToStrapi123", | ||
rememberMe: false | ||
}, | ||
onSubmit: (values) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
strapi/src/admin/extensions/components/PreviewButton/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import React from 'react'; | ||
import { Button } from '@strapi/design-system/Button'; | ||
import Eye from '@strapi/icons/Eye'; | ||
import { useCMEditViewDataManager } from '@strapi/helper-plugin'; | ||
import { useIntl } from 'react-intl'; | ||
|
||
const PreviewButton = () => { | ||
const { formatMessage } = useIntl(); | ||
const { modifiedData, layout } = useCMEditViewDataManager(); | ||
|
||
const bannedApiID = ['category']; | ||
|
||
if (bannedApiID.includes(layout.apiID)) { | ||
return null; | ||
} | ||
|
||
if ( | ||
!process.env.STRAPI_ADMIN_CLIENT_URL || | ||
!process.env.STRAPI_ADMIN_CLIENT_PREVIEW_SECRET | ||
) { | ||
return null; | ||
} | ||
|
||
const handlePreview = () => { | ||
const previewUrl = `${process.env.STRAPI_ADMIN_CLIENT_URL}/api/preview?secret=${process.env.STRAPI_ADMIN_CLIENT_PREVIEW_SECRET}&slug=${modifiedData.slug}&locale=${modifiedData.locale}&apiID=${layout.apiID}&kind=${layout.kind}`; | ||
|
||
window.open(previewUrl, '_blank').focus(); | ||
}; | ||
|
||
const content = { | ||
id: 'components.PreviewButton.button', | ||
defaultMessage: 'Preview', | ||
}; | ||
|
||
return ( | ||
<> | ||
<Button variant="secondary" startIcon={<Eye />} onClick={handlePreview}> | ||
{formatMessage(content)} | ||
</Button> | ||
</> | ||
); | ||
}; | ||
|
||
export default PreviewButton; |
Oops, something went wrong.