@crombolo/backoffice-host 0.42.1 → 0.44.0
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.
- package/NOTICE +9 -0
- package/package.json +3 -3
- package/plugin/app-preview/umbraco-package.json +1 -1
- package/plugin/approvals-active.js +40 -0
- package/plugin/branding/theme-dark.css +21 -5
- package/plugin/branding/theme.css +44 -19
- package/plugin/breadcrumb.js +29 -0
- package/plugin/bundle-editor.js +1 -1
- package/plugin/bundles-created-overview.js +1 -1
- package/plugin/bundles-created.js +13 -4
- package/plugin/bundles-installed.js +3 -3
- package/plugin/bundles-marketplace.js +2 -2
- package/plugin/bundles-tool.js +79 -0
- package/plugin/ci-access-words.js +57 -0
- package/plugin/ci-access.js +270 -0
- package/plugin/form-picker-options.js +61 -5
- package/plugin/form-picker.js +27 -18
- package/plugin/form-type-note.js +53 -0
- package/plugin/forms-client.js +6 -0
- package/plugin/forms-entries.js +39 -0
- package/plugin/localizations/umbraco-package.json +1 -1
- package/plugin/overview-dashboard.js +412 -0
- package/plugin/overview-format.js +71 -0
- package/plugin/seo/umbraco-package.json +1 -1
- package/plugin/settings-card.js +57 -0
- package/plugin/settings-cards.js +239 -0
- package/plugin/settings-section.js +466 -0
- package/plugin/sign-in/umbraco-package.json +1 -1
- package/plugin/umbraco-package.json +67 -70
- package/plugin/workflow-client.js +3 -0
- package/plugin/workflow-designer.js +17 -2
- package/src/branding.ts +4 -0
- package/src/extensions.ts +7 -3
- package/plugin/settings-dashboard.js +0 -123
- package/plugin/welcome-dashboard.js +0 -103
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"$schema": "../../backoffice-dist/dist/umbraco-package-schema.json",
|
|
3
3
|
"name": "Crombolo",
|
|
4
4
|
"id": "Crombolo.Core",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.44.0",
|
|
6
6
|
"allowPublicAccess": false,
|
|
7
7
|
"extensions": [
|
|
8
8
|
{
|
|
@@ -71,6 +71,17 @@
|
|
|
71
71
|
"description": "Replace a site people rely on, and approve or decline other people's pushes to it"
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
+
{
|
|
75
|
+
"type": "entityUserPermission",
|
|
76
|
+
"alias": "Crombolo.UserPermission.Remote.ApplyStructure",
|
|
77
|
+
"name": "Crombolo Remote ApplyStructure Permission",
|
|
78
|
+
"forEntityTypes": ["crombolo-remote"],
|
|
79
|
+
"meta": {
|
|
80
|
+
"verbs": ["Crombolo.Remote.ApplyStructure"],
|
|
81
|
+
"label": "Change a site's structure and code",
|
|
82
|
+
"description": "Push a whole site, or apply a bundle that changes its content types, views, styles or code"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
74
85
|
{
|
|
75
86
|
"type": "entityUserPermission",
|
|
76
87
|
"alias": "Crombolo.UserPermission.Media.Read",
|
|
@@ -133,40 +144,37 @@
|
|
|
133
144
|
}
|
|
134
145
|
},
|
|
135
146
|
{
|
|
136
|
-
"type": "
|
|
137
|
-
"alias": "Crombolo.
|
|
138
|
-
"name": "Crombolo
|
|
139
|
-
"element": "/crombolo-plugin/
|
|
140
|
-
"weight": 300,
|
|
141
|
-
"overwrites": ["Umb.SectionView.Packages.Marketplace"],
|
|
147
|
+
"type": "dashboard",
|
|
148
|
+
"alias": "Crombolo.Dashboard.CiAccess",
|
|
149
|
+
"name": "Crombolo CI Access",
|
|
150
|
+
"element": "/crombolo-plugin/ci-access.js",
|
|
142
151
|
"meta": {
|
|
143
|
-
"label": "
|
|
144
|
-
"pathname": "
|
|
145
|
-
"icon": "icon-cloud"
|
|
152
|
+
"label": "CI access",
|
|
153
|
+
"pathname": "ci-access"
|
|
146
154
|
},
|
|
147
155
|
"conditions": [
|
|
148
156
|
{
|
|
149
157
|
"alias": "Umb.Condition.SectionAlias",
|
|
150
|
-
"match": "Umb.Section.
|
|
158
|
+
"match": "Umb.Section.Settings"
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"alias": "Umb.Condition.CurrentUser.IsAdmin"
|
|
151
162
|
}
|
|
152
163
|
]
|
|
153
164
|
},
|
|
154
165
|
{
|
|
155
|
-
"type": "
|
|
156
|
-
"alias": "Crombolo.
|
|
157
|
-
"name": "Crombolo
|
|
158
|
-
"element": "/crombolo-plugin/bundles-
|
|
159
|
-
"weight": 100,
|
|
160
|
-
"overwrites": ["Umb.SectionView.Packages.Builder"],
|
|
166
|
+
"type": "dashboard",
|
|
167
|
+
"alias": "Crombolo.Dashboard.Bundles",
|
|
168
|
+
"name": "Crombolo Bundles",
|
|
169
|
+
"element": "/crombolo-plugin/bundles-tool.js",
|
|
161
170
|
"meta": {
|
|
162
|
-
"label": "
|
|
163
|
-
"pathname": "
|
|
164
|
-
"icon": "icon-files"
|
|
171
|
+
"label": "Bundles",
|
|
172
|
+
"pathname": "bundles"
|
|
165
173
|
},
|
|
166
174
|
"conditions": [
|
|
167
175
|
{
|
|
168
176
|
"alias": "Umb.Condition.SectionAlias",
|
|
169
|
-
"match": "Umb.Section.
|
|
177
|
+
"match": "Umb.Section.Settings"
|
|
170
178
|
}
|
|
171
179
|
]
|
|
172
180
|
},
|
|
@@ -306,25 +314,6 @@
|
|
|
306
314
|
}
|
|
307
315
|
]
|
|
308
316
|
},
|
|
309
|
-
{
|
|
310
|
-
"type": "sectionView",
|
|
311
|
-
"alias": "Crombolo.SectionView.Bundles.Installed",
|
|
312
|
-
"name": "Crombolo Installed Packages",
|
|
313
|
-
"element": "/crombolo-plugin/bundles-installed.js",
|
|
314
|
-
"weight": 200,
|
|
315
|
-
"overwrites": ["Umb.SectionView.Packages.Installed"],
|
|
316
|
-
"meta": {
|
|
317
|
-
"label": "Installed",
|
|
318
|
-
"pathname": "installed",
|
|
319
|
-
"icon": "icon-box"
|
|
320
|
-
},
|
|
321
|
-
"conditions": [
|
|
322
|
-
{
|
|
323
|
-
"alias": "Umb.Condition.SectionAlias",
|
|
324
|
-
"match": "Umb.Section.Packages"
|
|
325
|
-
}
|
|
326
|
-
]
|
|
327
|
-
},
|
|
328
317
|
{
|
|
329
318
|
"type": "workspaceView",
|
|
330
319
|
"alias": "Crombolo.WorkspaceView.Webhook.Storage",
|
|
@@ -413,14 +402,14 @@
|
|
|
413
402
|
},
|
|
414
403
|
{
|
|
415
404
|
"type": "dashboard",
|
|
416
|
-
"alias": "Crombolo.Dashboard.
|
|
417
|
-
"name": "Crombolo
|
|
418
|
-
"element": "/crombolo-plugin/
|
|
405
|
+
"alias": "Crombolo.Dashboard.Overview",
|
|
406
|
+
"name": "Crombolo Overview Dashboard",
|
|
407
|
+
"element": "/crombolo-plugin/overview-dashboard.js",
|
|
419
408
|
"weight": 20,
|
|
420
409
|
"overwrites": ["Umb.Dashboard.UmbracoNews"],
|
|
421
410
|
"meta": {
|
|
422
|
-
"label": "
|
|
423
|
-
"pathname": "
|
|
411
|
+
"label": "Overview",
|
|
412
|
+
"pathname": "overview"
|
|
424
413
|
},
|
|
425
414
|
"conditions": [
|
|
426
415
|
{
|
|
@@ -430,22 +419,11 @@
|
|
|
430
419
|
]
|
|
431
420
|
},
|
|
432
421
|
{
|
|
433
|
-
"type": "
|
|
434
|
-
"alias": "Crombolo.
|
|
435
|
-
"name": "Crombolo Settings
|
|
436
|
-
"
|
|
437
|
-
"
|
|
438
|
-
"overwrites": ["Umb.Dashboard.SettingsWelcome"],
|
|
439
|
-
"meta": {
|
|
440
|
-
"label": "Welcome",
|
|
441
|
-
"pathname": "welcome"
|
|
442
|
-
},
|
|
443
|
-
"conditions": [
|
|
444
|
-
{
|
|
445
|
-
"alias": "Umb.Condition.SectionAlias",
|
|
446
|
-
"match": "Umb.Section.Settings"
|
|
447
|
-
}
|
|
448
|
-
]
|
|
422
|
+
"type": "sectionLayout",
|
|
423
|
+
"alias": "Crombolo.SectionLayout.Settings",
|
|
424
|
+
"name": "Crombolo Settings Layout",
|
|
425
|
+
"forSection": "Umb.Section.Settings",
|
|
426
|
+
"element": "/crombolo-plugin/settings-section.js"
|
|
449
427
|
},
|
|
450
428
|
{
|
|
451
429
|
"type": "backofficeEntryPoint",
|
|
@@ -510,6 +488,19 @@
|
|
|
510
488
|
}
|
|
511
489
|
]
|
|
512
490
|
},
|
|
491
|
+
{
|
|
492
|
+
"type": "workspaceFooterApp",
|
|
493
|
+
"alias": "Crombolo.WorkspaceFooterApp.FormTypeNote",
|
|
494
|
+
"name": "Crombolo Form Type Note",
|
|
495
|
+
"element": "/crombolo-plugin/form-type-note.js",
|
|
496
|
+
"weight": 910,
|
|
497
|
+
"conditions": [
|
|
498
|
+
{
|
|
499
|
+
"alias": "Umb.Condition.WorkspaceAlias",
|
|
500
|
+
"match": "Umb.Workspace.DocumentType"
|
|
501
|
+
}
|
|
502
|
+
]
|
|
503
|
+
},
|
|
513
504
|
{
|
|
514
505
|
"type": "backofficeEntryPoint",
|
|
515
506
|
"alias": "Crombolo.EntryPoint.HelpMenu",
|
|
@@ -613,15 +604,22 @@
|
|
|
613
604
|
"overwrites": ["Umb.GlobalContext.Icons"],
|
|
614
605
|
"api": "/crombolo-plugin/branding/icon-registry.js"
|
|
615
606
|
},
|
|
607
|
+
{
|
|
608
|
+
"type": "condition",
|
|
609
|
+
"alias": "Crombolo.Condition.ApprovalsActive",
|
|
610
|
+
"name": "Crombolo Approvals Active Condition",
|
|
611
|
+
"api": "/crombolo-plugin/approvals-active.js"
|
|
612
|
+
},
|
|
616
613
|
{
|
|
617
614
|
"type": "section",
|
|
618
615
|
"alias": "Crombolo.Section.Workflow",
|
|
619
616
|
"name": "Crombolo Workflow Section",
|
|
620
617
|
"weight": 40,
|
|
621
618
|
"meta": {
|
|
622
|
-
"label": "
|
|
619
|
+
"label": "Approvals",
|
|
623
620
|
"pathname": "workflow"
|
|
624
|
-
}
|
|
621
|
+
},
|
|
622
|
+
"conditions": [{ "alias": "Crombolo.Condition.ApprovalsActive" }]
|
|
625
623
|
},
|
|
626
624
|
{
|
|
627
625
|
"type": "sectionView",
|
|
@@ -681,20 +679,18 @@
|
|
|
681
679
|
]
|
|
682
680
|
},
|
|
683
681
|
{
|
|
684
|
-
"type": "
|
|
685
|
-
"alias": "Crombolo.
|
|
682
|
+
"type": "dashboard",
|
|
683
|
+
"alias": "Crombolo.Dashboard.Workflows",
|
|
686
684
|
"name": "Crombolo Workflow Designer",
|
|
687
685
|
"element": "/crombolo-plugin/workflow-designer.js",
|
|
688
|
-
"weight": 500,
|
|
689
686
|
"meta": {
|
|
690
687
|
"label": "Workflows",
|
|
691
|
-
"pathname": "workflows"
|
|
692
|
-
"icon": "icon-mindmap"
|
|
688
|
+
"pathname": "workflows"
|
|
693
689
|
},
|
|
694
690
|
"conditions": [
|
|
695
691
|
{
|
|
696
692
|
"alias": "Umb.Condition.SectionAlias",
|
|
697
|
-
"match": "
|
|
693
|
+
"match": "Umb.Section.Settings"
|
|
698
694
|
},
|
|
699
695
|
{
|
|
700
696
|
"alias": "Umb.Condition.CurrentUser.IsAdmin"
|
|
@@ -716,7 +712,8 @@
|
|
|
716
712
|
{
|
|
717
713
|
"alias": "Umb.Condition.WorkspaceAlias",
|
|
718
714
|
"match": "Umb.Workspace.Document"
|
|
719
|
-
}
|
|
715
|
+
},
|
|
716
|
+
{ "alias": "Crombolo.Condition.ApprovalsActive" }
|
|
720
717
|
]
|
|
721
718
|
}
|
|
722
719
|
]
|
|
@@ -38,3 +38,6 @@ export const saveWorkflow = (alias, workflow) =>
|
|
|
38
38
|
})
|
|
39
39
|
export const deleteWorkflow = (alias) =>
|
|
40
40
|
call(`workflows/${encodeURIComponent(alias)}`, { method: 'DELETE' })
|
|
41
|
+
export const previewDelete = (alias) =>
|
|
42
|
+
call(`workflows/${encodeURIComponent(alias)}/preview`, { method: 'DELETE' })
|
|
43
|
+
export const approvalsActive = () => call('active')
|
|
@@ -12,7 +12,14 @@ import '@umbraco-cms/backoffice/document'
|
|
|
12
12
|
import { css, html, nothing, unsafeCSS } from '@umbraco-cms/backoffice/external/lit'
|
|
13
13
|
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'
|
|
14
14
|
import { UMB_NOTIFICATION_CONTEXT } from '@umbraco-cms/backoffice/notification'
|
|
15
|
-
import {
|
|
15
|
+
import { approvalsChanged } from './approvals-active.js'
|
|
16
|
+
import {
|
|
17
|
+
deleteWorkflow,
|
|
18
|
+
listWorkflows,
|
|
19
|
+
previewDelete,
|
|
20
|
+
previewWorkflow,
|
|
21
|
+
saveWorkflow,
|
|
22
|
+
} from './workflow-client.js'
|
|
16
23
|
import { ancestors, BOX, drawGraph, GRAPH_STYLES, layout, wouldLoop } from './workflow-graph.js'
|
|
17
24
|
|
|
18
25
|
const ON_EDIT = {
|
|
@@ -273,14 +280,21 @@ export default class CromboloWorkflowDesignerElement extends UmbLitElement {
|
|
|
273
280
|
// The green toast every workspace shows on a save.
|
|
274
281
|
this.#notifications?.peek('positive', { data: { message: 'Workflow saved' } })
|
|
275
282
|
this._originalAlias = this._editing.alias
|
|
283
|
+
approvalsChanged()
|
|
276
284
|
await this.#load()
|
|
277
285
|
}
|
|
278
286
|
|
|
279
287
|
/** From the list or the editor: the workflow by its name and the alias its file has. */
|
|
280
288
|
async #delete(name, alias) {
|
|
289
|
+
const preview = await previewDelete(alias)
|
|
290
|
+
const waiting = preview.ok ? preview.affected : []
|
|
291
|
+
const withdrawn =
|
|
292
|
+
waiting.length > 0
|
|
293
|
+
? `\n\nThe requests for these pages, waiting for approval, are withdrawn:\n${waiting.map((a) => `- ${a.page}`).join('\n')}`
|
|
294
|
+
: ''
|
|
281
295
|
if (
|
|
282
296
|
!window.confirm(
|
|
283
|
-
`Delete the workflow "${name}"? Pages it covers will publish without approval
|
|
297
|
+
`Delete the workflow "${name}"? Pages it covers will publish without approval.${withdrawn}`,
|
|
284
298
|
)
|
|
285
299
|
)
|
|
286
300
|
return
|
|
@@ -290,6 +304,7 @@ export default class CromboloWorkflowDesignerElement extends UmbLitElement {
|
|
|
290
304
|
return
|
|
291
305
|
}
|
|
292
306
|
this._editing = undefined
|
|
307
|
+
approvalsChanged()
|
|
293
308
|
await this.#load()
|
|
294
309
|
}
|
|
295
310
|
|
package/src/branding.ts
CHANGED
|
@@ -15,11 +15,15 @@
|
|
|
15
15
|
/// <reference path="./text-imports.d.ts" />
|
|
16
16
|
import faviconText from '../plugin/branding/favicon.svg' with { type: 'text' }
|
|
17
17
|
import logoText from '../plugin/branding/logo-header.svg' with { type: 'text' }
|
|
18
|
+
import logoDarkText from '../plugin/branding/logo-header-dark.svg' with { type: 'text' }
|
|
18
19
|
import themeText from '../plugin/branding/theme.css' with { type: 'text' }
|
|
19
20
|
|
|
20
21
|
/** The mark and wordmark, for a header or a sign-in card. */
|
|
21
22
|
export const logoSvg: string = logoText.trim()
|
|
22
23
|
|
|
24
|
+
/** The same logo with cream lettering, for a dark ground. */
|
|
25
|
+
export const logoDarkSvg: string = logoDarkText.trim()
|
|
26
|
+
|
|
23
27
|
/** The mark alone, square, for a tab icon. */
|
|
24
28
|
export const faviconSvg: string = faviconText.trim()
|
|
25
29
|
|
package/src/extensions.ts
CHANGED
|
@@ -94,9 +94,13 @@ export function extensionOf(bundle: BundlePackage): InstalledExtension | undefin
|
|
|
94
94
|
version: bundle.version,
|
|
95
95
|
allowPublicAccess: field.allowPublicAccess ?? false,
|
|
96
96
|
allowTelemetry: field.allowTelemetry ?? false,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
// Each extension names its bundle, so Settings can group a bundle's cards and link to it.
|
|
98
|
+
extensions: (field.extensions ?? []).map((extension) => {
|
|
99
|
+
const rewritten = rewriteAssets(extension, packageName)
|
|
100
|
+
return rewritten && typeof rewritten === 'object'
|
|
101
|
+
? { ...rewritten, cromboloBundle: { name: bundle.name, packageName } }
|
|
102
|
+
: rewritten
|
|
103
|
+
}),
|
|
100
104
|
importmap: rewriteImportmap(field.importmap, packageName),
|
|
101
105
|
},
|
|
102
106
|
}
|
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Settings dashboard, in place of Umbraco's.
|
|
3
|
-
*
|
|
4
|
-
* Its manifest declares `overwrites: ['Umb.Dashboard.SettingsWelcome']`, the same
|
|
5
|
-
* way the Welcome dashboard takes the place of the news one. What it replaces is
|
|
6
|
-
* marketing for Umbraco's own training and consultancy — accurate for Umbraco and
|
|
7
|
-
* misleading here, and not the sort of thing to fix by renaming, since the
|
|
8
|
-
* services it points at are real and are not this project's.
|
|
9
|
-
*
|
|
10
|
-
* What it says instead is the thing a person in Settings actually needs to know:
|
|
11
|
-
* that types are files, and that changing one here writes that file.
|
|
12
|
-
*/
|
|
13
|
-
// UmbLitElement, not plain LitElement: a dashboard is used as a controller host,
|
|
14
|
-
// and a plain element fails with `controllerHost.provideContext is not a function`.
|
|
15
|
-
import { css, html, nothing } from '@umbraco-cms/backoffice/external/lit'
|
|
16
|
-
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'
|
|
17
|
-
|
|
18
|
-
/** Whether this site can send e-mail; the server answers with the reason. */
|
|
19
|
-
const emailStatus = async () => {
|
|
20
|
-
const href = document.querySelector('base')?.getAttribute('href') ?? '/umbraco/'
|
|
21
|
-
const response = await fetch(`${href.replace(/\/$/, '')}/crombolo/api/email`, {
|
|
22
|
-
credentials: 'include',
|
|
23
|
-
headers: { accept: 'application/json' },
|
|
24
|
-
})
|
|
25
|
-
if (!response.ok) throw new Error(`email responded ${response.status}`)
|
|
26
|
-
return response.json()
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default class CromboloSettingsDashboardElement extends UmbLitElement {
|
|
30
|
-
static properties = {
|
|
31
|
-
_email: { state: true },
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
connectedCallback() {
|
|
35
|
-
super.connectedCallback()
|
|
36
|
-
// A failure here leaves the section out rather than the dashboard broken:
|
|
37
|
-
// this is an explanation, not a control.
|
|
38
|
-
emailStatus().then(
|
|
39
|
-
(status) => {
|
|
40
|
-
this._email = status
|
|
41
|
-
},
|
|
42
|
-
() => {},
|
|
43
|
-
)
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
#email() {
|
|
47
|
-
const status = this._email
|
|
48
|
-
if (!status) return nothing
|
|
49
|
-
if (status.available)
|
|
50
|
-
return html`
|
|
51
|
-
<uui-box headline="E-mail">
|
|
52
|
-
<p>E-mail is sent through <strong>${status.provider}</strong>.</p>
|
|
53
|
-
</uui-box>
|
|
54
|
-
`
|
|
55
|
-
return html`
|
|
56
|
-
<uui-box headline="E-mail">
|
|
57
|
-
<p>${status.reason}</p>
|
|
58
|
-
${
|
|
59
|
-
status.affects.length > 0
|
|
60
|
-
? html`<p>Until one is configured, these are unavailable:</p>
|
|
61
|
-
<ul>
|
|
62
|
-
${status.affects.map((feature) => html`<li>${feature}</li>`)}
|
|
63
|
-
</ul>`
|
|
64
|
-
: nothing
|
|
65
|
-
}
|
|
66
|
-
</uui-box>
|
|
67
|
-
`
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
render() {
|
|
71
|
-
return html`
|
|
72
|
-
<uui-box headline="Settings">
|
|
73
|
-
<p>
|
|
74
|
-
Content types, data types and languages are <strong>files</strong>, in
|
|
75
|
-
<code>schema/</code>, written as TOML. The database is a view of them: what you change
|
|
76
|
-
here is written to the file, and the file is what a deploy and every other node reads.
|
|
77
|
-
</p>
|
|
78
|
-
<p>
|
|
79
|
-
That is why a type can be reviewed in a pull request, and why a schema change carries a
|
|
80
|
-
version — a change that converts existing content is a major, and the backoffice moves
|
|
81
|
-
the number for you.
|
|
82
|
-
</p>
|
|
83
|
-
<p class="links">
|
|
84
|
-
<a href="https://github.com/kineco-au/crombolo-cms#schema-as-code" target="_blank" rel="noopener">
|
|
85
|
-
Schema as code
|
|
86
|
-
</a>
|
|
87
|
-
<a href="https://github.com/kineco-au/crombolo-cms#schema-in-shared-storage" target="_blank" rel="noopener">
|
|
88
|
-
Schema in shared storage
|
|
89
|
-
</a>
|
|
90
|
-
<a href="https://github.com/kineco-au/crombolo-cms/issues" target="_blank" rel="noopener">
|
|
91
|
-
Report an issue
|
|
92
|
-
</a>
|
|
93
|
-
</p>
|
|
94
|
-
</uui-box>
|
|
95
|
-
${this.#email()}
|
|
96
|
-
`
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
static styles = css`
|
|
100
|
-
:host {
|
|
101
|
-
display: block;
|
|
102
|
-
padding: var(--uui-size-layout-1, 24px);
|
|
103
|
-
}
|
|
104
|
-
p {
|
|
105
|
-
max-width: 60ch;
|
|
106
|
-
line-height: 1.5;
|
|
107
|
-
}
|
|
108
|
-
.links {
|
|
109
|
-
display: flex;
|
|
110
|
-
gap: var(--uui-size-space-5, 18px);
|
|
111
|
-
flex-wrap: wrap;
|
|
112
|
-
}
|
|
113
|
-
uui-box + uui-box {
|
|
114
|
-
margin-top: var(--uui-size-layout-1, 24px);
|
|
115
|
-
}
|
|
116
|
-
ul {
|
|
117
|
-
max-width: 60ch;
|
|
118
|
-
line-height: 1.5;
|
|
119
|
-
}
|
|
120
|
-
`
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
customElements.define('crombolo-settings-dashboard', CromboloSettingsDashboardElement)
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The Welcome dashboard in the Content section. Its manifest declares
|
|
3
|
-
* `overwrites: ['Umb.Dashboard.UmbracoNews']`, which takes the place of
|
|
4
|
-
* Umbraco's news dashboard without mutating the registry while the backoffice
|
|
5
|
-
* is rendering — the hazard the TSX entry point documents.
|
|
6
|
-
*/
|
|
7
|
-
// UmbLitElement, not plain LitElement: a dashboard is used as a controller host,
|
|
8
|
-
// and a plain element fails with `controllerHost.provideContext is not a function`.
|
|
9
|
-
import { css, html } from '@umbraco-cms/backoffice/external/lit'
|
|
10
|
-
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'
|
|
11
|
-
|
|
12
|
-
const STEPS = [
|
|
13
|
-
{
|
|
14
|
-
title: 'Model the content',
|
|
15
|
-
body: html`Open <strong>Settings → Content Types</strong> and describe a page: its
|
|
16
|
-
properties, its tabs, and which types may sit beneath it.`,
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
title: 'Write a template',
|
|
20
|
-
body: html`Templates are <strong>TSX</strong>, not Razor. A template is a file in
|
|
21
|
-
<code>components/</code> that default-exports a component and receives the page as
|
|
22
|
-
<code>model</code>; <code>export const layout = 'alias'</code> names its master.
|
|
23
|
-
The editor under Settings → Templates writes that shape for you.`,
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
title: 'Create and publish',
|
|
27
|
-
body: html`Back in <strong>Content</strong>, create a page from your content type, fill it
|
|
28
|
-
in and publish. Publishing is per culture, and the published version is what the
|
|
29
|
-
site renders — drafts stay invisible until you say otherwise.`,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
title: 'Keep the schema in the repository',
|
|
33
|
-
body: html`Content types, data types and templates are also files:
|
|
34
|
-
<code>schema/*.toml</code>. <code>crombolo types sync</code> writes changes made in
|
|
35
|
-
the backoffice back out, and <code>crombolo types check</code> tells you whether a
|
|
36
|
-
database matches. Schema travels through Git, not a database export.`,
|
|
37
|
-
},
|
|
38
|
-
]
|
|
39
|
-
|
|
40
|
-
export default class CromboloWelcomeDashboardElement extends UmbLitElement {
|
|
41
|
-
render() {
|
|
42
|
-
return html`
|
|
43
|
-
<uui-box headline="Welcome to Crombolo">
|
|
44
|
-
<p class="lede">
|
|
45
|
-
Crombolo is a content management system that runs on
|
|
46
|
-
<strong>Bun and TypeScript</strong>: the server, the templates and the schema are
|
|
47
|
-
TypeScript, and the database is SQLite or Postgres.
|
|
48
|
-
</p>
|
|
49
|
-
<p class="lede">
|
|
50
|
-
There is no .NET anywhere in it: templates are TSX rather than Razor, and a
|
|
51
|
-
site's schema lives in TOML files beside its code.
|
|
52
|
-
</p>
|
|
53
|
-
</uui-box>
|
|
54
|
-
|
|
55
|
-
<uui-box headline="Getting started">
|
|
56
|
-
<ol>
|
|
57
|
-
${STEPS.map(
|
|
58
|
-
(step) => html`<li>
|
|
59
|
-
<h4>${step.title}</h4>
|
|
60
|
-
<p>${step.body}</p>
|
|
61
|
-
</li>`,
|
|
62
|
-
)}
|
|
63
|
-
</ol>
|
|
64
|
-
</uui-box>
|
|
65
|
-
|
|
66
|
-
<uui-box headline="Worth knowing">
|
|
67
|
-
<ul>
|
|
68
|
-
<li>
|
|
69
|
-
The <strong>Settings</strong> section holds templates, partial views,
|
|
70
|
-
stylesheets and scripts — all served from your site's folders.
|
|
71
|
-
</li>
|
|
72
|
-
<li>
|
|
73
|
-
<strong>Upgrade</strong>, also under Settings, reports anything a version
|
|
74
|
-
change needs from you before it will run.
|
|
75
|
-
</li>
|
|
76
|
-
<li>
|
|
77
|
-
The log viewer under Settings reads the server's own structured logs, so a
|
|
78
|
-
failed publish or a broken template is searchable rather than guessed at.
|
|
79
|
-
</li>
|
|
80
|
-
</ul>
|
|
81
|
-
</uui-box>
|
|
82
|
-
`
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
static styles = css`
|
|
86
|
-
:host { display: block; padding: var(--uui-size-layout-1); }
|
|
87
|
-
uui-box { margin-bottom: var(--uui-size-layout-1); }
|
|
88
|
-
.lede { max-width: 70ch; line-height: 1.6; }
|
|
89
|
-
ol { margin: 0; padding-left: var(--uui-size-layout-1); }
|
|
90
|
-
ol li { margin-bottom: var(--uui-size-space-5); max-width: 70ch; }
|
|
91
|
-
ol h4 { margin: 0 0 var(--uui-size-space-2); }
|
|
92
|
-
ol p { margin: 0; line-height: 1.6; }
|
|
93
|
-
ul { margin: 0; padding-left: var(--uui-size-layout-1); }
|
|
94
|
-
ul li { margin-bottom: var(--uui-size-space-3); max-width: 70ch; line-height: 1.6; }
|
|
95
|
-
code {
|
|
96
|
-
background: var(--uui-color-surface-alt);
|
|
97
|
-
padding: 0 var(--uui-size-space-1);
|
|
98
|
-
border-radius: var(--uui-border-radius);
|
|
99
|
-
}
|
|
100
|
-
`
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
customElements.define('crombolo-welcome-dashboard', CromboloWelcomeDashboardElement)
|