feat(studio): deploy expanded presets and live proposal previews
This commit is contained in:
1 parent
27dcb561db
commit
a1dc8ecd91
6 files changed
+33
-9
No files matched your search
@@ -36,6 +36,18 @@ try {
|
||||
]) {
|
||||
const response = await fetch(origin + path);
|
||||
if (!response.ok) throw Error(`${path} returned ${response.status}`);
|
||||
if (path === "/design-studio/") {
|
||||
const html = await response.clone().text();
|
||||
const presetMenu =
|
||||
html.match(/<select id="preset">([\s\S]*?)<\/select>/)?.[1] ?? "";
|
||||
if (
|
||||
(presetMenu.match(/<option value="[^"]+"/g) ?? []).length !== 13 ||
|
||||
!html.includes('id="show-draft"')
|
||||
)
|
||||
throw Error(
|
||||
"The deployed Studio is missing its thirteen presets or proposal preview controls.",
|
||||
);
|
||||
}
|
||||
if (
|
||||
path === "/design-studio/" &&
|
||||
!(await response.clone().text()).includes("How to use Design Studio")
|
||||
|
||||
Reference in new issue
Block a user