diff --git a/extensions/Squidex.Extensions/Actions/Prerender/PrerenderAction.cs b/extensions/Squidex.Extensions/Actions/Prerender/PrerenderAction.cs index 74c7de4c7..47c37eafa 100644 --- a/extensions/Squidex.Extensions/Actions/Prerender/PrerenderAction.cs +++ b/extensions/Squidex.Extensions/Actions/Prerender/PrerenderAction.cs @@ -12,10 +12,10 @@ namespace Squidex.Extensions.Actions.Prerender { [RuleActionHandler(typeof(PrerenderActionHandler))] [RuleAction( - IconImage = "", + IconImage = "", IconColor = "#2c3e50", Display = "Recache URL", - Description = "Create a status update at Tweet to a your user account.", + Description = "Recache a certain URL or cache a URL for the first time.", ReadMore = "https://prerender.io")] public sealed class PrerenderAction : RuleAction { diff --git a/extensions/Squidex.Extensions/Actions/RuleElementRegistry.cs b/extensions/Squidex.Extensions/Actions/RuleElementRegistry.cs index 1353cf09e..b8e3dae0a 100644 --- a/extensions/Squidex.Extensions/Actions/RuleElementRegistry.cs +++ b/extensions/Squidex.Extensions/Actions/RuleElementRegistry.cs @@ -26,7 +26,7 @@ namespace Squidex.Extensions.Actions IconImage = "", IconColor = "#3389ff", Display = "Content changed", - Description = "Content changed like created, updated, published, unpublished..." + Description = "For content changes like created, updated, published, unpublished..." }, ["AssetChanged"] = new RuleElement @@ -34,7 +34,7 @@ namespace Squidex.Extensions.Actions IconImage = "", IconColor = "#3389ff", Display = "Asset changed", - Description = "Asset changed like created, updated, renamed..." + Description = "For asset changes like uploaded, updated, renamed, deleted..." } }; diff --git a/src/Squidex/app/features/rules/declarations.ts b/src/Squidex/app/features/rules/declarations.ts index daa7be5b8..a0b822e71 100644 --- a/src/Squidex/app/features/rules/declarations.ts +++ b/src/Squidex/app/features/rules/declarations.ts @@ -11,6 +11,7 @@ export * from './pages/rules/actions/discourse-action.component'; export * from './pages/rules/actions/elastic-search-action.component'; export * from './pages/rules/actions/fastly-action.component'; export * from './pages/rules/actions/medium-action.component'; +export * from './pages/rules/actions/prerender-action.component'; export * from './pages/rules/actions/slack-action.component'; export * from './pages/rules/actions/tweet-action.component'; export * from './pages/rules/actions/webhook-action.component'; diff --git a/src/Squidex/app/features/rules/module.ts b/src/Squidex/app/features/rules/module.ts index cb13812c0..7c14cc181 100644 --- a/src/Squidex/app/features/rules/module.ts +++ b/src/Squidex/app/features/rules/module.ts @@ -23,6 +23,7 @@ import { ElasticSearchActionComponent, FastlyActionComponent, MediumActionComponent, + PrerenderActionComponent, RuleElementComponent, RuleEventBadgeClassPipe, RuleEventsPageComponent, @@ -68,6 +69,7 @@ const routes: Routes = [ ElasticSearchActionComponent, FastlyActionComponent, MediumActionComponent, + PrerenderActionComponent, RuleElementComponent, RuleEventBadgeClassPipe, RuleEventsPageComponent, diff --git a/src/Squidex/app/features/rules/pages/rules/actions/prerender-action.component.html b/src/Squidex/app/features/rules/pages/rules/actions/prerender-action.component.html new file mode 100644 index 000000000..e07a9e48c --- /dev/null +++ b/src/Squidex/app/features/rules/pages/rules/actions/prerender-action.component.html @@ -0,0 +1,29 @@ +
+
+ + +
+ + + + + + The prerender token from your account. + +
+
+ +
+ + +
+ + + + + + The url to recache. Read the help section for information about advanced formatting. + +
+
+
\ No newline at end of file diff --git a/src/Squidex/app/features/rules/pages/rules/actions/prerender-action.component.scss b/src/Squidex/app/features/rules/pages/rules/actions/prerender-action.component.scss new file mode 100644 index 000000000..fbb752506 --- /dev/null +++ b/src/Squidex/app/features/rules/pages/rules/actions/prerender-action.component.scss @@ -0,0 +1,2 @@ +@import '_vars'; +@import '_mixins'; \ No newline at end of file diff --git a/src/Squidex/app/features/rules/pages/rules/actions/prerender-action.component.ts b/src/Squidex/app/features/rules/pages/rules/actions/prerender-action.component.ts new file mode 100644 index 000000000..adf25fb6d --- /dev/null +++ b/src/Squidex/app/features/rules/pages/rules/actions/prerender-action.component.ts @@ -0,0 +1,37 @@ +/* + * Squidex Headless CMS + * + * @license + * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. + */ + +import { Component, Input, OnInit } from '@angular/core'; +import { FormControl, FormGroup, Validators } from '@angular/forms'; + +@Component({ + selector: 'sqx-prerender-action', + styleUrls: ['./prerender-action.component.scss'], + templateUrl: './prerender-action.component.html' +}) +export class PrerenderActionComponent implements OnInit { + @Input() + public action: any; + + @Input() + public actionForm: FormGroup; + + @Input() + public actionFormSubmitted = false; + + public ngOnInit() { + this.actionForm.setControl('token', + new FormControl(this.action.token || '', [ + Validators.required + ])); + + this.actionForm.setControl('url', + new FormControl(this.action.url || '', [ + Validators.required + ])); + } +} \ No newline at end of file diff --git a/src/Squidex/app/features/rules/pages/rules/rule-element.component.html b/src/Squidex/app/features/rules/pages/rules/rule-element.component.html index 28fb2b0c1..89e18a12a 100644 --- a/src/Squidex/app/features/rules/pages/rules/rule-element.component.html +++ b/src/Squidex/app/features/rules/pages/rules/rule-element.component.html @@ -1,28 +1,30 @@ -
- +
+
- - - {{element.display}} - +
+
+
+ {{element.display}} +
+
-
+
-
+
-
{{type}}
+
{{type}}
-
+
{{element.description}}
- diff --git a/src/Squidex/app/features/rules/pages/rules/rule-element.component.scss b/src/Squidex/app/features/rules/pages/rules/rule-element.component.scss index 9696ca52a..fca4de50b 100644 --- a/src/Squidex/app/features/rules/pages/rules/rule-element.component.scss +++ b/src/Squidex/app/features/rules/pages/rules/rule-element.component.scss @@ -1,78 +1,78 @@ @import '_vars'; @import '_mixins'; -.rule-element { - &-small { - & { - @include truncate; - @include transition(background-color .4s ease); - color: $color-dark-foreground; - cursor: pointer; - line-height: 2.8rem; - font-size: 1rem; - font-weight: normal; - padding-right: .8rem; - } +.small { + & { + @include transition(background-color .4s ease); + cursor: pointer; + } - &-icon { - height: 3rem; - display: inline-block; - line-height: 3rem; - font-size: 1.2rem; - font-weight: normal; - margin: 0; - margin-right: .5rem; - padding: 0 .8rem; - } + &-text { + @include truncate; + color: $color-dark-foreground; + line-height: 3rem; + font-size: 1rem; + font-weight: normal; + padding: 0 .8rem; + } - .svg-icon { - display: inline-block; - min-width: 20px; - max-width: 20px; - min-height: 20px; - max-height: 20px; - fill: $color-dark-foreground; - } + &-icon { + line-height: 3.2rem; + font-size: 1.2rem; + font-weight: normal; + padding: 0 .8rem; } - &-large { - & { - cursor: pointer; - min-height: 100px; - max-height: 100px; - } + .col { + height: 3rem; + } - &-link { - font-size: .8rem; - } + .svg-icon { + width: 20px; + } +} - &-title { - font-weight: bold; - font-size: 1rem; - line-height: 1; - } +.large { + & { + cursor: pointer; + min-height: 100px; + max-height: 100px; + } - &-text { - font-size: .8rem; - margin-top: .25rem; - margin-bottom: .25rem; - } + &-link { + font-size: .8rem; + } - &-icon { - display: inline-block; - margin-right: .5rem; - position: relative; - padding: 1rem; - line-height: 1px; - } + &-title { + font-weight: bold; + font-size: 1rem; + line-height: 1; + } - .svg-icon { - display: inline-block; - min-width: 30px; - max-width: 30px; - min-height: 30px; - max-height: 30px; - fill: $color-dark-foreground; - } + &-text { + font-size: .8rem; + margin-top: .25rem; + margin-bottom: .25rem; } + + &-icon { + display: inline-block; + margin-right: .5rem; + position: relative; + padding: 1rem; + line-height: 1px; + } + + .svg-icon { + width: 30px; + } +} + +.svg-icon { + display: inline-block; +} + +/deep/ svg { + fill: $color-dark-foreground; + display: block; } \ No newline at end of file diff --git a/src/Squidex/app/features/rules/pages/rules/rule-wizard.component.html b/src/Squidex/app/features/rules/pages/rules/rule-wizard.component.html index 8da18c6df..858338c92 100644 --- a/src/Squidex/app/features/rules/pages/rules/rule-wizard.component.html +++ b/src/Squidex/app/features/rules/pages/rules/rule-wizard.component.html @@ -108,6 +108,13 @@ [actionFormSubmitted]="actionForm.submitted | async"> + + + +