@orion-studios/payload-studio 0.6.0-beta.51 → 0.6.0-beta.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -812,6 +812,7 @@ function GrapesPageEditor({
|
|
|
812
812
|
const [saving, setSaving] = (0, import_react.useState)(null);
|
|
813
813
|
const [saveMessage, setSaveMessage] = (0, import_react.useState)("");
|
|
814
814
|
const [validationIssues, setValidationIssues] = (0, import_react.useState)([]);
|
|
815
|
+
const editorPageBasePath = initialData?.meta?.editorPageBasePath || "/admin/pages";
|
|
815
816
|
const pageTree = initialData?.meta?.pageTree || [];
|
|
816
817
|
const updateHistoryState = (editor) => {
|
|
817
818
|
const next = {
|
|
@@ -1128,10 +1129,25 @@ function GrapesPageEditor({
|
|
|
1128
1129
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("aside", { className: "orion-builder-v2-sidebar", children: [
|
|
1129
1130
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "orion-builder-v2-panel", children: [
|
|
1130
1131
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Pages" }),
|
|
1131
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "orion-builder-v2-page-tree", children: pageTree.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "No pages loaded." }) : pageTree.map((page) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1132
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "orion-builder-v2-page-tree", children: pageTree.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { children: "No pages loaded." }) : pageTree.map((page) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
1133
|
+
"a",
|
|
1134
|
+
{
|
|
1135
|
+
className: "orion-builder-v2-page-link",
|
|
1136
|
+
href: `${editorPageBasePath}/${page.id}`,
|
|
1137
|
+
onClick: (event) => {
|
|
1138
|
+
const target = `${editorPageBasePath}/${page.id}`;
|
|
1139
|
+
if (window.parent && window.parent !== window) {
|
|
1140
|
+
event.preventDefault();
|
|
1141
|
+
window.parent.location.href = target;
|
|
1142
|
+
}
|
|
1143
|
+
},
|
|
1144
|
+
children: [
|
|
1145
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: page.title }),
|
|
1146
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("small", { children: page.path })
|
|
1147
|
+
]
|
|
1148
|
+
},
|
|
1149
|
+
page.id
|
|
1150
|
+
)) })
|
|
1135
1151
|
] }),
|
|
1136
1152
|
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "orion-builder-v2-panel", children: [
|
|
1137
1153
|
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h2", { children: "Blocks" }),
|
|
@@ -688,6 +688,7 @@ function GrapesPageEditor({
|
|
|
688
688
|
const [saving, setSaving] = useState(null);
|
|
689
689
|
const [saveMessage, setSaveMessage] = useState("");
|
|
690
690
|
const [validationIssues, setValidationIssues] = useState([]);
|
|
691
|
+
const editorPageBasePath = initialData?.meta?.editorPageBasePath || "/admin/pages";
|
|
691
692
|
const pageTree = initialData?.meta?.pageTree || [];
|
|
692
693
|
const updateHistoryState = (editor) => {
|
|
693
694
|
const next = {
|
|
@@ -1004,10 +1005,25 @@ function GrapesPageEditor({
|
|
|
1004
1005
|
/* @__PURE__ */ jsxs("aside", { className: "orion-builder-v2-sidebar", children: [
|
|
1005
1006
|
/* @__PURE__ */ jsxs("div", { className: "orion-builder-v2-panel", children: [
|
|
1006
1007
|
/* @__PURE__ */ jsx("h2", { children: "Pages" }),
|
|
1007
|
-
/* @__PURE__ */ jsx("div", { className: "orion-builder-v2-page-tree", children: pageTree.length === 0 ? /* @__PURE__ */ jsx("p", { children: "No pages loaded." }) : pageTree.map((page) => /* @__PURE__ */ jsxs(
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1008
|
+
/* @__PURE__ */ jsx("div", { className: "orion-builder-v2-page-tree", children: pageTree.length === 0 ? /* @__PURE__ */ jsx("p", { children: "No pages loaded." }) : pageTree.map((page) => /* @__PURE__ */ jsxs(
|
|
1009
|
+
"a",
|
|
1010
|
+
{
|
|
1011
|
+
className: "orion-builder-v2-page-link",
|
|
1012
|
+
href: `${editorPageBasePath}/${page.id}`,
|
|
1013
|
+
onClick: (event) => {
|
|
1014
|
+
const target = `${editorPageBasePath}/${page.id}`;
|
|
1015
|
+
if (window.parent && window.parent !== window) {
|
|
1016
|
+
event.preventDefault();
|
|
1017
|
+
window.parent.location.href = target;
|
|
1018
|
+
}
|
|
1019
|
+
},
|
|
1020
|
+
children: [
|
|
1021
|
+
/* @__PURE__ */ jsx("span", { children: page.title }),
|
|
1022
|
+
/* @__PURE__ */ jsx("small", { children: page.path })
|
|
1023
|
+
]
|
|
1024
|
+
},
|
|
1025
|
+
page.id
|
|
1026
|
+
)) })
|
|
1011
1027
|
] }),
|
|
1012
1028
|
/* @__PURE__ */ jsxs("div", { className: "orion-builder-v2-panel", children: [
|
|
1013
1029
|
/* @__PURE__ */ jsx("h2", { children: "Blocks" }),
|
package/package.json
CHANGED