Merge branch 'master' into develop

This commit is contained in:
olivermrbl
2022-05-24 10:02:35 +02:00
15 changed files with 162 additions and 76 deletions

View File

@@ -127,4 +127,4 @@ This prevents any payment issues from occurring with the customers and allows fo
## Whats Next 🚀
- [Check out how the checkout flow is implemented on the frontend.](./frontend-payment-flow-in-checkout.md)
- Check out payment plugins like [Stripe](../../../add-plugins/stripe.md), [Paypal](../../../add-plugins/paypal.md), and [Klarna](../../../add-plugins/klarna.md).
- Check out payment plugins like [Stripe](../../../add-plugins/stripe.md), [Paypal](/add-plugins/paypal), and [Klarna](../../../add-plugins/klarna.md).

View File

@@ -2,13 +2,15 @@
Upload files to a MinIO server.
Learn more about how you can use this plugin in the [documentation](https://docs.medusajs.com/add-plugins/minio).
## Options
```
endpoint: [endpoint of your MinIO server],
bucket: [name of your bucket],
access_key_id: [access-key],
secret_access_key: [secret-access-key],
```
Follow [this guide](https://docs.medusa-commerce.com/how-to/uploading-images-to-minio) to configure the plugin.
```js
{
endpoint: "minio.server.com",
bucket: "test",
access_key_id: "YOUR-ACCESS-KEY",
secret_access_key: "YOUR-SECRET-KEY",
}
```

View File

@@ -2,14 +2,16 @@
Upload files to an AWS S3 bucket.
Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/s3).
## Options
```js
{
s3_url: "https://s3-guide-test.s3.eu-west-1.amazonaws.com",
bucket: "test",
region: "eu-west-1"
access_key_id: "YOUR-ACCESS-KEY",
secret_access_key: "YOUR-SECRET-KEY",
}
```
s3_url: [url of your s3 bucket],
access_key_id: [access-key],
secret_access_key: [secret-access-key],
bucket: [name of your bucket],
region: [region of your bucket],
```
Follow [this guide](https://docs.medusajs.com/how-to/uploading-images-to-s3) to configure the plugin.

View File

@@ -2,14 +2,16 @@
Upload files to a DigitalOcean Space.
Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/spaces).
## Options
```js
{
spaces_url: "https://test.fra1.digitaloceanspaces.com",
bucket: "test",
endpoint: "fra1.digitaloceanspaces.com",
access_key_id: "YOUR-ACCESS-KEY",
secret_access_key: "YOUR-SECRET-KEY",
}
```
spaces_url: [url of your DigitalOcean space],
access_key_id: [access-key],
secret_access_key: [secret-access-key],
bucket: [name of your bucket],
endpoint: [endpoint of you DigitalOcean space],
```
Follow [this guide](https://docs.medusajs.com/how-to/uploading-images-to-spaces) to configure the plugin.

View File

@@ -1,11 +1,16 @@
# medusa-payment-paypal
Add PayPal as a Payment Provider.
Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/paypal).
## Options
```js
{
sandbox: true, //default false
client_id: "CLIENT_ID", // REQUIRED
client_secret: "CLIENT_SECRET", // REQUIRED
auth_webhook_id: "WEBHOOK_ID" //REQUIRED for webhook to work
}
```
sandbox: [default: false],
client_id: "CLIENT_ID", REQUIRED
client_secret: "CLIENT_SECRET", REQUIRED
auth_webhook_id: REQUIRED for webhook to work
```

View File

@@ -0,0 +1,14 @@
# medusa-payment-stripe
Add Stripe as a Payment Provider.
Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/stripe).
## Options
```js
{
api_key: "STRIPE_API_KEY",
webhook_secret: "STRIPE_WEBHOOK_SECRET",
}
```

View File

@@ -1,10 +1,12 @@
# medusa-plugin-algolia
algolia Plugin for Medusa to search for products.
Algolia Plugin for Medusa to search for products.
## Plugin Options
Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/algolia).
```
## Options
```js
{
application_id: "someId",
admin_api_key: "someApiKey",

View File

@@ -0,0 +1,15 @@
# medusa-payment-contentful
Integrate Contentful with Medusa for rich CMS functionalities.
Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/contentful).
## Options
```js
{
space_id: "CONTENTFUL_SPACE_ID",
access_token: "CONTENTFUL_ACCESS_TOKEN",
environment: "CONTENTFUL_ENV",
}
```

View File

@@ -2,12 +2,14 @@
Mailchimp plugin for Medusa that supports newsletter subscriptions.
## Plugin Options
Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/mailchimp).
```
## Options
```js
{
api_key: [your mailchimp api key] (required),
newsletter_list_id: ["123456789"] (required)
api_key: "MAILCHIMP_API_KEY",
newsletter_list_id: ["123456789"]
}
```

View File

@@ -2,15 +2,17 @@
Meilisearch Plugin for Medusa to search for products.
## Plugin Options
Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/meilisearch).
```
## Options
```js
{
config: {
host: [your meilisearch host],
host: "[your meilisearch host]",
},
settings: {
[indexName]: [meilisearch settings passed to meilisearch's `updateSettings()` method]
"[indexName]": "[meilisearch settings passed to meilisearch's `updateSettings()` method]"
// example
products: {
searchableAttributes: ["title", "description", "variant_sku", "type_value"],

View File

@@ -2,30 +2,32 @@
Sendgrid Plugin for Medusa to send transactional emails.
Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/sendgrid).
## Options
If no values are defined for a given option, the plugin will not try to send an email for that event.
## Plugin Options
```
```js
{
api_key: [your sendgrid api key] (required),
from: [the from field, i.e. ACME <acme@mail.com>] (required),
gift_card_created_template: [used on gift_card.created],
order_placed_template: [used on order.placed],
order_canceled_template: [used on order.canceled],
order_shipped_template: [used on order.shipment_created],
order_completed_template: [used on order.completed],
user_password_reset_template: [used on user.password_reset],
customer_password_reset_template: [used on customer.password_reset],
api_key: "SENDGRID_API_KEY", //required
from: "[the from field, i.e. ACME <acme@mail.com>]", //required
gift_card_created_template: "[used on gift_card.created]",
order_placed_template: "[used on order.placed]",
order_canceled_template: "[used on order.canceled]",
order_shipped_template: "[used on order.shipment_created]",
order_completed_template: "[used on order.completed]",
user_password_reset_template: "[used on user.password_reset]",
customer_password_reset_template: "[used on customer.password_reset]",
localization: {
"de-DE": { // locale key
gift_card_created_template: [used on gift_card.created],
order_placed_template: [used on order.placed],
order_canceled_template: [used on order.canceled],
order_shipped_template: [used on order.shipment_created],
order_completed_template: [used on order.completed],
user_password_reset_template: [used on user.password_reset],
customer_password_reset_template: [used on customer.password_reset],
gift_card_created_template: "[used on gift_card.created]",
order_placed_template: "[used on order.placed]",
order_canceled_template: "[used on order.canceled]",
order_shipped_template: "[used on order.shipment_created]",
order_completed_template: "[used on order.completed]",
user_password_reset_template: "[used on user.password_reset]",
customer_password_reset_template: "[used on customer.password_reset]",
}
}
}

View File

@@ -0,0 +1,15 @@
# medusa-plugin-slack-notification
Slack Integration to receive new order notifications on Slack.
Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/slack).
## Options
```js
{
show_discount_code: false,
slack_url: `<WEBHOOK_URL>`,
admin_orders_url: `http://localhost:7001/a/orders`
}
```

View File

@@ -2,13 +2,15 @@
Twilio SMS / Messaging plugin.
## Plugin Options
Learn more about how you can use this plugin in the [documentaion](https://docs.medusajs.com/add-plugins/twilio-sms).
```
## Options
```js
{
account_sid: [twilio messaging account sid] (required),
auth_token: [twilio massaging authentication token] (required),
from_number: [the number used as sender SMS],
account_sid: "[twilio messaging account sid]", // required
auth_token: "[twilio massaging authentication token]", // required
from_number: "[the number used as sender SMS]",
}
```

View File

@@ -127,7 +127,7 @@ module.exports = {
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
editUrl: "https://github.com/medusajs/medusa/edit/master/www/",
editUrl: "https://github.com/medusajs/medusa/edit/master/docs/content",
path: docsPath,
routeBasePath: "/",
remarkPlugins: [

View File

@@ -8,19 +8,40 @@ import { useColorMode } from 'theme-ui'
export default function ColorModeToggler () {
const [, setColorMode] = useColorMode()
function checkLocalStorage (currentTheme, toggleTheme) {
//check that theme local storage values are set correctly
let themeUiColorMode = window.localStorage.getItem('theme-ui-color-mode');
let theme = window.localStorage.getItem('theme')
if (!themeUiColorMode) {
themeUiColorMode = theme || currentTheme
window.localStorage.setItem('theme-ui-color-mode', themeUiColorMode);
setColorMode(themeUiColorMode);
}
if (!theme) {
theme = themeUiColorMode || currentTheme
window.localStorage.setItem('theme', theme);
toggleTheme(theme)
}
return theme || themeUiColorMode || currentTheme;
}
return (
<ThemeToggler>
{({ theme, toggleTheme }) => (
<button onClick={() => {
const mode = theme === 'dark' ? 'light' : 'dark';
toggleTheme(mode);
setColorMode(mode);
}} className="dark-mode-toggler">
{theme === "light" && <LightMode />}
{theme === "dark" && <DarkMode />}
</button>
)}
{({ theme, toggleTheme }) => {
const currentTheme = checkLocalStorage(theme, toggleTheme);
return (
<button onClick={() => {
const mode = currentTheme === 'dark' ? 'light' : 'dark';
toggleTheme(mode);
setColorMode(mode);
}} className="dark-mode-toggler">
{currentTheme === "light" && <LightMode />}
{currentTheme === "dark" && <DarkMode />}
</button>
);
}}
</ThemeToggler>
)
}