From 346428989f2263ff64e25df558243fce181ac3a2 Mon Sep 17 00:00:00 2001 From: bat Date: Fri, 28 Apr 2023 06:54:57 +0000 Subject: [PATCH] simplify CSP and add title to settings dialog --- components/layout.js | 2 +- components/page-actions.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/components/layout.js b/components/layout.js index 7e020aa..8e9d34e 100644 --- a/components/layout.js +++ b/components/layout.js @@ -3,7 +3,7 @@ import { EditorBuild } from "/loader/editor-build.js" export class Layout extends HTMLElement { cspProfiles = { local: "default-src 'self' 'unsafe-inline' 'unsafe-eval'", - jsCdns: "default-src cdn.jsdelivr.net data.jsdelivr.com unpkg.com 'self' 'unsafe-inline' 'unsafe-eval'", + unpkg: "default-src unpkg.com 'self' 'unsafe-inline' 'unsafe-eval'", open: undefined, } diff --git a/components/page-actions.js b/components/page-actions.js index 20f6ce4..e9a5c14 100644 --- a/components/page-actions.js +++ b/components/page-actions.js @@ -228,7 +228,10 @@ export class PageActions extends HTMLElement { ) settingsEl.cspProfiles = this.cspProfiles settingsEl.data = this.page.settings - dialog.bodyEl.appendChild(settingsEl) + const h = document.createElement('h2') + h.innerText = this.text.settings + dialog.headerEl.append(h) + dialog.bodyEl.append(settingsEl) const bGroup = document.createElement( 'm-forms-button-group' )