-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add Purple checkout maintenance mode option
- Loading branch information
Showing
5 changed files
with
89 additions
and
1 deletion.
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 |
---|---|---|
|
@@ -48,6 +48,20 @@ The project is roughly structured as follows: | |
- `postcss.config.js` - The [PostCSS](https://postcss.org/) configuration file, which is used to configure the PostCSS compiler. PostCSS is used to compile Tailwind CSS to regular CSS. | ||
- `src/pages/api` - The [Next.js API routes](https://nextjs.org/docs/api-routes/introduction), which can used to implement server-side (serverless) functions. | ||
|
||
## Operations | ||
|
||
### Putting Purple checkout under maintenance mode | ||
|
||
To put the Purple checkout under maintenance mode, simply make a route called `/purple-checkout-maintenance` available (returns HTTP 200). | ||
|
||
In a static build, this can be done by creating a file called `purple-checkout-maintenance` at the root of wherever the static files are being hosted: | ||
|
||
```bash | ||
touch /path/to/static/files/purple-checkout-maintenance | ||
``` | ||
|
||
When present, the checkout page will be replaced with a maintenance message. | ||
|
||
## Contributing | ||
|
||
You can send me patches over nostr or [email][email] at [email protected] | ||
|
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import { Construction } from "lucide-react"; | ||
import { PurpleLayout } from "../PurpleLayout"; | ||
import { useIntl } from "react-intl"; | ||
|
||
|
||
export function PurpleCheckoutMaintenance() { | ||
const intl = useIntl() | ||
|
||
// MARK: - Render | ||
|
||
return (<> | ||
<PurpleLayout> | ||
<h2 className="text-2xl text-left text-purple-200 font-semibold break-keep mb-2"> | ||
{intl.formatMessage({ id: "purple.checkout-maintenance.title", defaultMessage: "Checkout" })} | ||
</h2> | ||
<div className="text-purple-200/70 text-normal text-left mb-6 font-semibold flex flex-col md:flex-row gap-3 rounded-lg bg-purple-200/10 p-3 items-center md:items-start"> | ||
<Construction className="w-6 h-6 shrink-0 mt-0 md:mt-1" /> | ||
<div className="flex flex-col text-center md:text-left"> | ||
<span className="text-normal md:text-lg mb-2"> | ||
{intl.formatMessage({ id: "purple.checkout-maintenance.description", defaultMessage: "Under maintenance" })} | ||
</span> | ||
<span className="text-xs text-purple-200/50"> | ||
{intl.formatMessage({ id: "purple.checkout-maintenance.description-2", defaultMessage: "We are working on some fixes, please come back later. Thank you for your patience." })} | ||
</span> | ||
</div> | ||
</div> | ||
</PurpleLayout> | ||
</>) | ||
} |