-
Notifications
You must be signed in to change notification settings - Fork 614
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(app-page-builder): add
configure domain
confirmation
add `configure domain` confirmation before page preview
- Loading branch information
Showing
4 changed files
with
95 additions
and
14 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
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
41 changes: 31 additions & 10 deletions
41
packages/app-page-builder/src/editor/plugins/defaultBar/components/PreviewPageButton.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
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,25 @@ | ||
import React from "react"; | ||
import { css } from "emotion"; | ||
import {i18n} from "@webiny/app/i18n"; | ||
|
||
const t = i18n.ns("app-page-builder/utils"); | ||
|
||
const confirmationMessageStyles = css({ | ||
"& code": { | ||
backgroundColor: "var(--mdc-theme-background)", | ||
padding: "0px 8px" | ||
} | ||
}); | ||
|
||
export const configureDomainTitle = t`Configure domain`; | ||
|
||
export const ConfigureDomainMessage = ({ domain }) => ( | ||
<span className={confirmationMessageStyles}> | ||
No site is running at <strong>{domain}</strong> | ||
<br /> | ||
Either start the server by <code>cd apps/site && yarn start</code> | ||
<br /> | ||
or update the domain by going into{" "} | ||
<a href={"/settings/page-builder/general"}>page builder settings</a> | ||
</span> | ||
); |