From 949e4e289c311140a19107dad31bf056d122fca3 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Tue, 25 Jan 2022 20:59:32 +0100 Subject: [PATCH] Fix dev server * Fix dev server. --- backend/i18n/frontend_en.json | 18 ++++++++ backend/i18n/frontend_it.json | 18 ++++++++ backend/i18n/frontend_nl.json | 18 ++++++++ backend/i18n/frontend_zh.json | 18 ++++++++ backend/i18n/source/backend__ignore.json | 12 ++--- backend/i18n/source/backend_en.json | 8 ++-- backend/i18n/source/frontend__ignore.json | 44 +++++++++++++------ backend/i18n/source/frontend_en.json | 18 ++++++++ .../Squidex.Translator/Processes/Frontend.cs | 2 +- backend/src/Squidex.Shared/Texts.nl.resx | 8 ++-- backend/src/Squidex.Shared/Texts.resx | 8 ++-- backend/src/Squidex/Areas/Frontend/Startup.cs | 14 +++++- .../IdentityServer/Views/Setup/Setup.cshtml | 6 ++- .../Areas/IdentityServer/Views/_Layout.cshtml | 5 +++ .../asset-changed-trigger.component.html | 14 +++--- .../triggers/comment-trigger.component.html | 12 ++--- .../content-changed-trigger.component.html | 30 ++++++------- .../schema-changed-trigger.component.html | 12 ++--- .../triggers/usage-trigger.component.html | 8 ++-- .../types/assets-validation.component.html | 8 ++-- frontend/src/app/theme/_static.scss | 2 +- 21 files changed, 199 insertions(+), 84 deletions(-) diff --git a/backend/i18n/frontend_en.json b/backend/i18n/frontend_en.json index 2f2ef3935..155cd8fcc 100644 --- a/backend/i18n/frontend_en.json +++ b/backend/i18n/frontend_en.json @@ -235,6 +235,8 @@ "common.clusterPageTitle": "Cluster", "common.comments": "Comments", "common.components": "Components", + "common.condition": "Condition", + "common.conditions": "Conditions", "common.confirm": "Confirm", "common.consumers": "Consumers", "common.content": "Content", @@ -661,7 +663,22 @@ "roles.updateFailed": "Failed to update role. Please reload.", "rules.actionData": "Action Data", "rules.actionHint": "The selection of the action type cannot be changed later.", + "rules.addSchema": "Add Schema", "rules.cancelFailed": "Failed to cancel rule. Please reload.", + "rules.conditionHint": "Optional condition as javascript expression", + "rules.conditionHint2": "Conditions are javascript expressions that define when to trigger, for example", + "rules.conditions.commentKeyword": "Only for text keywords", + "rules.conditions.commentUser": "Specific users", + "rules.conditions.contentValue": "Content has value", + "rules.conditions.event": "Specific events", + "rules.conditions.images": "Images only", + "rules.conditions.largeAssets": "Large assets", + "rules.conditions.schema": "Specific schema only", + "rules.conditions.updatedBy": "Updated by user", + "rules.conditions.usageDays": "Days", + "rules.conditions.usageDaysHint": "The number of days to check or empty to check the current month.", + "rules.conditions.usageLimit": "Limit", + "rules.conditions.usageLimitHint": "The monthly api calls to trigger.", "rules.create": "New Rule", "rules.createFailed": "Failed to create rule. Please reload.", "rules.createTooltip": "New Rule", @@ -723,6 +740,7 @@ "rules.simulation.eventTriggerChecked": "Event is tested to see if it matchs to the trigger and the basic conditions.", "rules.simulator": "Simulator", "rules.stop": "Rule will stop soon.", + "rules.triggerAll": "Trigger on all content events", "rules.triggerConfirmText": "Do you really want to trigger the rule?", "rules.triggerConfirmTitle": "Trigger rule", "rules.triggerFailed": "Failed to trigger rule. Please reload.", diff --git a/backend/i18n/frontend_it.json b/backend/i18n/frontend_it.json index 803f8e4af..9f46fbb2a 100644 --- a/backend/i18n/frontend_it.json +++ b/backend/i18n/frontend_it.json @@ -235,6 +235,8 @@ "common.clusterPageTitle": "Cluster", "common.comments": "Commenti", "common.components": "Components", + "common.condition": "Condition", + "common.conditions": "Conditions", "common.confirm": "Conferma", "common.consumers": "Servizi", "common.content": "Contenuto", @@ -661,7 +663,22 @@ "roles.updateFailed": "Non è stato possibile aggiornare il ruolo. Per favore ricarica.", "rules.actionData": "Action Data", "rules.actionHint": "The selection of the action type cannot be changed later.", + "rules.addSchema": "Add Schema", "rules.cancelFailed": "Non è stato possibile eliminare la regola. Per favore ricarica.", + "rules.conditionHint": "Optional condition as javascript expression", + "rules.conditionHint2": "Conditions are javascript expressions that define when to trigger, for example", + "rules.conditions.commentKeyword": "Only for text keywords", + "rules.conditions.commentUser": "Specific users", + "rules.conditions.contentValue": "Content has value", + "rules.conditions.event": "Specific events", + "rules.conditions.images": "Images only", + "rules.conditions.largeAssets": "Large assets", + "rules.conditions.schema": "Specific schema only", + "rules.conditions.updatedBy": "Updated by user", + "rules.conditions.usageDays": "Days", + "rules.conditions.usageDaysHint": "The number of days to check or empty to check the current month.", + "rules.conditions.usageLimit": "Limit", + "rules.conditions.usageLimitHint": "The monthly api calls to trigger.", "rules.create": "Crea un nuova Regola", "rules.createFailed": "Non è stato possibile creare una nuova regola. Per favore ricarica.", "rules.createTooltip": "Nuova regola", @@ -723,6 +740,7 @@ "rules.simulation.eventTriggerChecked": "Event is tested to see if it matchs to the trigger and the basic conditions.", "rules.simulator": "Simulator", "rules.stop": "La regola si fermerà al più presto.", + "rules.triggerAll": "Trigger on all content events", "rules.triggerConfirmText": "Sei sicuro che voler attivare la regola?", "rules.triggerConfirmTitle": "Attiva la regola", "rules.triggerFailed": "Non è stato possibile attivare la regola. Per favore ricarica.", diff --git a/backend/i18n/frontend_nl.json b/backend/i18n/frontend_nl.json index 2bf113b45..5f3a0813d 100644 --- a/backend/i18n/frontend_nl.json +++ b/backend/i18n/frontend_nl.json @@ -235,6 +235,8 @@ "common.clusterPageTitle": "Cluster", "common.comments": "Reacties", "common.components": "Componenten", + "common.condition": "Condition", + "common.conditions": "Conditions", "common.confirm": "Bevestigen", "common.consumers": "Consumenten", "common.content": "Inhoud", @@ -661,7 +663,22 @@ "roles.updateFailed": "Update rol mislukt. Laad opnieuw.", "rules.actionData": "Actiegegevens", "rules.actionHint": "De selectie van het actietype kan later niet worden gewijzigd.", + "rules.addSchema": "Add Schema", "rules.cancelFailed": "Annuleren van regel is mislukt. Laad opnieuw.", + "rules.conditionHint": "Optional condition as javascript expression", + "rules.conditionHint2": "Conditions are javascript expressions that define when to trigger, for example", + "rules.conditions.commentKeyword": "Only for text keywords", + "rules.conditions.commentUser": "Specific users", + "rules.conditions.contentValue": "Content has value", + "rules.conditions.event": "Specific events", + "rules.conditions.images": "Images only", + "rules.conditions.largeAssets": "Large assets", + "rules.conditions.schema": "Specific schema only", + "rules.conditions.updatedBy": "Updated by user", + "rules.conditions.usageDays": "Days", + "rules.conditions.usageDaysHint": "The number of days to check or empty to check the current month.", + "rules.conditions.usageLimit": "Limit", + "rules.conditions.usageLimitHint": "The monthly api calls to trigger.", "rules.create": "Maak een nieuwe regel", "rules.createFailed": "Maken van regel is mislukt. Laad opnieuw.", "rules.createTooltip": "Nieuwe regel", @@ -723,6 +740,7 @@ "rules.simulation.eventTriggerChecked": "Het evenement is getest om te zien of het overeenkomt met de trigger en de basisvoorwaarden.", "rules.simulator": "Simulator", "rules.stop": "Regel stopt binnenkort.", + "rules.triggerAll": "Trigger on all content events", "rules.triggerConfirmText": "Wil je echt de regel activeren?", "rules.triggerConfirmTitle": "Trigger regel", "rules.triggerFailed": "Kan regel niet activeren. Laad opnieuw.", diff --git a/backend/i18n/frontend_zh.json b/backend/i18n/frontend_zh.json index 9a988732c..d49b4ce04 100644 --- a/backend/i18n/frontend_zh.json +++ b/backend/i18n/frontend_zh.json @@ -235,6 +235,8 @@ "common.clusterPageTitle": "集群", "common.comments": "评论", "common.components": "组件", + "common.condition": "Condition", + "common.conditions": "Conditions", "common.confirm": "确认", "common.consumers": "消费者", "common.content": "内容", @@ -661,7 +663,22 @@ "roles.updateFailed": "更新角色失败。请重新加载。", "rules.actionData": "动作数据", "rules.actionHint": "动作类型的选择以后不能更改。", + "rules.addSchema": "Add Schema", "rules.cancelFailed": "取消规则失败,请重新加载。", + "rules.conditionHint": "Optional condition as javascript expression", + "rules.conditionHint2": "Conditions are javascript expressions that define when to trigger, for example", + "rules.conditions.commentKeyword": "Only for text keywords", + "rules.conditions.commentUser": "Specific users", + "rules.conditions.contentValue": "Content has value", + "rules.conditions.event": "Specific events", + "rules.conditions.images": "Images only", + "rules.conditions.largeAssets": "Large assets", + "rules.conditions.schema": "Specific schema only", + "rules.conditions.updatedBy": "Updated by user", + "rules.conditions.usageDays": "Days", + "rules.conditions.usageDaysHint": "The number of days to check or empty to check the current month.", + "rules.conditions.usageLimit": "Limit", + "rules.conditions.usageLimitHint": "The monthly api calls to trigger.", "rules.create": "新规则", "rules.createFailed": "创建规则失败。请重新加载。", "rules.createTooltip": "新规则", @@ -723,6 +740,7 @@ "rules.simulation.eventTriggerChecked": "Event is tested to see if it matchs to the trigger and the basic conditions.", "rules.simulator": "模拟器", "rules.stop": "规则很快就会停止。", + "rules.triggerAll": "Trigger on all content events", "rules.triggerConfirmText": "你真的要触发规则吗?", "rules.triggerConfirmTitle": "触发规则", "rules.triggerFailed": "触发规则失败。请重新加载。", diff --git a/backend/i18n/source/backend__ignore.json b/backend/i18n/source/backend__ignore.json index a678d4af6..e91c3c45d 100644 --- a/backend/i18n/source/backend__ignore.json +++ b/backend/i18n/source/backend__ignore.json @@ -30,20 +30,16 @@ "*" ], "/Squidex.Domain.Apps.Core.Operations/ConvertContent/StringFormatter.cs": [ - "{array.Count} {pluralName}", - "{lat}, {lon}", - "", - "0 {pluralName}", - "1 {singularName}" + "*" ], "/Squidex.Domain.Apps.Core.Operations/DefaultValues/DefaultValueFactory.cs": [ - ", CultureInfo.InvariantCulture)}T00:00:00Z" + "*" ], "/Squidex.Domain.Apps.Core.Operations/GenerateJsonSchema/ContentSchemaBuilder.cs": [ "*" ], "/Squidex.Domain.Apps.Core.Operations/GenerateJsonSchema/JsonSchemaExtensions.cs": [ - "{field.Name} ({field.RawProperties.Hints})" + "*" ], "/Squidex.Domain.Apps.Core.Operations/HandleRules/Result.cs": [ "*" @@ -61,7 +57,7 @@ "*" ], "/Squidex.Domain.Apps.Core.Operations/Scripting/ScriptOptions.cs": [ - "CanReject={CanReject}, CanDisallow={CanDisallow}, AsContext={AsContext}" + "*" ], "/Squidex.Domain.Apps.Core.Operations/Templates/TemplateParseException.cs": [ "*" diff --git a/backend/i18n/source/backend_en.json b/backend/i18n/source/backend_en.json index 732e56135..7e305dd4a 100644 --- a/backend/i18n/source/backend_en.json +++ b/backend/i18n/source/backend_en.json @@ -286,18 +286,18 @@ "setup.createUser.loginLink": "Go to Login Page.", "setup.createUser.separator": "OR", "setup.headline": "Installation", - "setup.hint": "You are seeing this screen because no user exists yet. After a user is created, you are not able to use this screen again.", + "setup.hint": "You see this screen because no user exists yet. After a user is created, you are not able to use this setup page again.", "setup.madeBy": "Proudly made by", "setup.madeByCopyright": "Sebastian Stehle and Contributors, 2016-2021", "setup.ruleAppCreation.warningAdmins": "With your setup, only admins can create new apps. If you want to change this set UI__ONLYADMINSCANCREATEAPPS=false as environment variable.", "setup.ruleAppCreation.warningAll": "With your setup, every user can create new apps. If you want to change this set UI__ONLYADMINSCANCREATEAPPS=true as environment variable.", - "setup.ruleFolder.warning": "You are using the folder asset store where all assets are stored in the file system. Please remember to include the asset folder into your backup strategy and map it to a volume, if you are using Docker.", + "setup.ruleFolder.warning": "You are using the folder asset store where all assets are stored in the file system. Please remember to include the asset folder into your backup strategy and map it to a volume, if you are using docker.", "setup.ruleFtp.warning": "You are using the FTP asset store. It is not recommended to use this storage type because of bad performance.", "setup.ruleHttps.failure": " You are not accessing the site over https. If this warning is not correct then Squidex cannot detect https mode, because your instance is behind a reverse proxy such as nginx. Ensure that http headers are forwarded properly, via the X-Forwarded-* headers.", "setup.ruleHttps.success": "Congratulations, you are accessing your Squidex installation over a secure connection (https).", "setup.rules.headline": "System Checklist", - "setup.ruleUrl.failure": "You should access Squidex only over one canonical URL and configure this URL with the URLS__BASEURL environment variable. The current base URL {actual} does not match to the base url {configured}.", - "setup.ruleUrl.success": "Congratulations, the URLS__BASEURL environment variable is configured properly.", + "setup.ruleUrl.failure": "You should access Squidex only over one canonical URL and configure this URL with the URLS__BASEURL environment variable. The current base URL {actual} does not match to the base url {configured}. This variable must point to the public URL under which your Squidex instance is available.", + "setup.ruleUrl.success": "Congratulations, the URLS__BASEURL environment variable is configured properly. This variable must point to the public URL under which your Squidex instance is available.", "setup.title": "Installation", "setup.webpack.headline": "webpack error", "setup.webpack.text": "You have to run webpack dev server to run the frontend in Development mode. More information in the documenation: ", diff --git a/backend/i18n/source/frontend__ignore.json b/backend/i18n/source/frontend__ignore.json index f8729b10d..7586a35b2 100644 --- a/backend/i18n/source/frontend__ignore.json +++ b/backend/i18n/source/frontend__ignore.json @@ -5,6 +5,10 @@ "/app.module.ts": [ "Application element not found" ], + "/features/apps/pages/app.component.html": [ + "·", + "|" + ], "/features/apps/pages/apps-page.component.html": [ "·", "|" @@ -22,25 +26,21 @@ "{{field.displayName}} {{displaySuffix}}", "*" ], + "/features/content/shared/references/reference-item.component.html": [ + "INVALID", + "VALID" + ], "/features/content/shared/references/references-editor.component.html": [ "·" ], - "/features/rules/pages/rules/actions/generic-action.component.html": [ - "*" - ], - "/features/rules/pages/rules/triggers/asset-changed-trigger.component.html": [ - "*" - ], - "/features/rules/pages/rules/triggers/comment-trigger.component.html": [ - "*" - ], - "/features/rules/pages/rules/triggers/content-changed-trigger.component.html": [ - "*" + "/features/rules/pages/rule/rule-page.component.html": [ + "...", + "#" ], - "/features/rules/pages/rules/triggers/schema-changed-trigger.component.html": [ + "/features/rules/pages/rules/actions/generic-action.component.html": [ "*" ], - "/features/rules/pages/rules/triggers/usage-trigger.component.html": [ + "/features/rules/shared/actions/generic-action.component.html": [ "*" ], "/features/schemas/pages/schema/fields/types/array-validation.component.html": [ @@ -50,12 +50,18 @@ "-", "3", "4", - "px" + "Audio", + "px", + "Unknown", + "Video" ], "/features/schemas/pages/schema/fields/types/boolean-ui.component.html": [ "Checkbox", "Toggle" ], + "/features/schemas/pages/schema/fields/types/components-validation.component.html": [ + "-" + ], "/features/schemas/pages/schema/fields/types/date-time-ui.component.html": [ "DateTime" ], @@ -118,10 +124,14 @@ "/features/settings/pages/contributors/import-contributors-dialog.component.html": [ "user1@squidex.io;user2@squidex.io" ], + "/features/settings/pages/languages/language-add-form.component.html": [ + "{{language.iso2Code}} ({{language.englishName}}" + ], "/framework/angular/forms/validators.ts": [ "matchValidator(): other control is not found in parent group" ], "/framework/angular/modals/dialog-renderer.component.html": [ + "({{tooltip.shortcut}}", "×" ], "/framework/angular/pager.component.html": [ @@ -146,6 +156,9 @@ "/shared/components/app-form.component.html": [ "appName" ], + "/shared/components/assets/assets-selector.component.html": [ + "[query]=\"assetsState.query | async\"" + ], "/shared/components/forms/geolocation-editor.component.ts": [ "© OpenStreetMap contributors" ], @@ -173,6 +186,9 @@ "/shared/components/search/search-form.component.ts": [ "form-inline search-form" ], + "/shared/components/watching-users.component.html": [ + "+{{currentUsers.length - 5}}" + ], "/shared/services/auth.service.ts": [ "*" ], diff --git a/backend/i18n/source/frontend_en.json b/backend/i18n/source/frontend_en.json index 2f2ef3935..155cd8fcc 100644 --- a/backend/i18n/source/frontend_en.json +++ b/backend/i18n/source/frontend_en.json @@ -235,6 +235,8 @@ "common.clusterPageTitle": "Cluster", "common.comments": "Comments", "common.components": "Components", + "common.condition": "Condition", + "common.conditions": "Conditions", "common.confirm": "Confirm", "common.consumers": "Consumers", "common.content": "Content", @@ -661,7 +663,22 @@ "roles.updateFailed": "Failed to update role. Please reload.", "rules.actionData": "Action Data", "rules.actionHint": "The selection of the action type cannot be changed later.", + "rules.addSchema": "Add Schema", "rules.cancelFailed": "Failed to cancel rule. Please reload.", + "rules.conditionHint": "Optional condition as javascript expression", + "rules.conditionHint2": "Conditions are javascript expressions that define when to trigger, for example", + "rules.conditions.commentKeyword": "Only for text keywords", + "rules.conditions.commentUser": "Specific users", + "rules.conditions.contentValue": "Content has value", + "rules.conditions.event": "Specific events", + "rules.conditions.images": "Images only", + "rules.conditions.largeAssets": "Large assets", + "rules.conditions.schema": "Specific schema only", + "rules.conditions.updatedBy": "Updated by user", + "rules.conditions.usageDays": "Days", + "rules.conditions.usageDaysHint": "The number of days to check or empty to check the current month.", + "rules.conditions.usageLimit": "Limit", + "rules.conditions.usageLimitHint": "The monthly api calls to trigger.", "rules.create": "New Rule", "rules.createFailed": "Failed to create rule. Please reload.", "rules.createTooltip": "New Rule", @@ -723,6 +740,7 @@ "rules.simulation.eventTriggerChecked": "Event is tested to see if it matchs to the trigger and the basic conditions.", "rules.simulator": "Simulator", "rules.stop": "Rule will stop soon.", + "rules.triggerAll": "Trigger on all content events", "rules.triggerConfirmText": "Do you really want to trigger the rule?", "rules.triggerConfirmTitle": "Trigger rule", "rules.triggerFailed": "Failed to trigger rule. Please reload.", diff --git a/backend/i18n/translator/Squidex.Translator/Processes/Frontend.cs b/backend/i18n/translator/Squidex.Translator/Processes/Frontend.cs index 978aa8faf..5fa31512d 100644 --- a/backend/i18n/translator/Squidex.Translator/Processes/Frontend.cs +++ b/backend/i18n/translator/Squidex.Translator/Processes/Frontend.cs @@ -11,7 +11,7 @@ namespace Squidex.Translator.Processes { public static DirectoryInfo GetFolder(DirectoryInfo folder) { - return new DirectoryInfo(Path.Combine(folder.FullName, "frontend", "app")); + return new DirectoryInfo(Path.Combine(folder.FullName, "frontend", "src", "app")); } public static IEnumerable<(FileInfo, string)> GetTypescriptFiles(DirectoryInfo folder) diff --git a/backend/src/Squidex.Shared/Texts.nl.resx b/backend/src/Squidex.Shared/Texts.nl.resx index c43c14e66..759057303 100644 --- a/backend/src/Squidex.Shared/Texts.nl.resx +++ b/backend/src/Squidex.Shared/Texts.nl.resx @@ -944,7 +944,7 @@ Installation - You are seeing this screen because no user exists yet. After a user is created, you are not able to use this screen again. + You see this screen because no user exists yet. After a user is created, you are not able to use this setup page again. Proudly made by @@ -959,7 +959,7 @@ With your setup, every user can create new apps. If you want to change this set <code>UI__ONLYADMINSCANCREATEAPPS=true</code> as environment variable. - You are using the <strong>folder asset store</strong> where all assets are stored in the file system. Please remember to include the asset folder into your backup strategy and map it to a volume, if you are using Docker. + You are using the <strong>folder asset store</strong> where all assets are stored in the file system. Please remember to include the asset folder into your backup strategy and map it to a volume, if you are using docker. You are using the <strong>FTP asset store</strong>. It is not recommended to use this storage type because of bad performance. @@ -974,10 +974,10 @@ System Checklist - You should access Squidex only over one canonical URL and configure this URL with the <code>URLS__BASEURL</code> environment variable. The current base URL <code>{actual}</code> does not match to the base url <code>{configured}</code>. + You should access Squidex only over one canonical URL and configure this URL with the <code>URLS__BASEURL</code> environment variable. The current base URL <code>{actual}</code> does not match to the base url <code>{configured}</code>. This variable must point to the public URL under which your Squidex instance is available. - Congratulations, the <code>URLS__BASEURL</code> environment variable is configured properly. + Congratulations, the <code>URLS__BASEURL</code> environment variable is configured properly. This variable must point to the public URL under which your Squidex instance is available. Installation diff --git a/backend/src/Squidex.Shared/Texts.resx b/backend/src/Squidex.Shared/Texts.resx index 61f552480..b05937da8 100644 --- a/backend/src/Squidex.Shared/Texts.resx +++ b/backend/src/Squidex.Shared/Texts.resx @@ -944,7 +944,7 @@ Installation - You are seeing this screen because no user exists yet. After a user is created, you are not able to use this screen again. + You see this screen because no user exists yet. After a user is created, you are not able to use this setup page again. Proudly made by @@ -959,7 +959,7 @@ With your setup, every user can create new apps. If you want to change this set <code>UI__ONLYADMINSCANCREATEAPPS=true</code> as environment variable. - You are using the <strong>folder asset store</strong> where all assets are stored in the file system. Please remember to include the asset folder into your backup strategy and map it to a volume, if you are using Docker. + You are using the <strong>folder asset store</strong> where all assets are stored in the file system. Please remember to include the asset folder into your backup strategy and map it to a volume, if you are using docker. You are using the <strong>FTP asset store</strong>. It is not recommended to use this storage type because of bad performance. @@ -974,10 +974,10 @@ System Checklist - You should access Squidex only over one canonical URL and configure this URL with the <code>URLS__BASEURL</code> environment variable. The current base URL <code>{actual}</code> does not match to the base url <code>{configured}</code>. + You should access Squidex only over one canonical URL and configure this URL with the <code>URLS__BASEURL</code> environment variable. The current base URL <code>{actual}</code> does not match to the base url <code>{configured}</code>. This variable must point to the public URL under which your Squidex instance is available. - Congratulations, the <code>URLS__BASEURL</code> environment variable is configured properly. + Congratulations, the <code>URLS__BASEURL</code> environment variable is configured properly. This variable must point to the public URL under which your Squidex instance is available. Installation diff --git a/backend/src/Squidex/Areas/Frontend/Startup.cs b/backend/src/Squidex/Areas/Frontend/Startup.cs index 91ff04f76..220aae6a6 100644 --- a/backend/src/Squidex/Areas/Frontend/Startup.cs +++ b/backend/src/Squidex/Areas/Frontend/Startup.cs @@ -100,12 +100,22 @@ namespace Squidex.Areas.Frontend private static bool IsSpaFile(this HttpContext context) { - return context.IsIndex() || !Path.HasExtension(context.Request.Path); + return (context.IsIndex() || !Path.HasExtension(context.Request.Path)) && !context.IsDevServer(); + } + + private static bool IsDevServer(this HttpContext context) + { + return context.Request.Path.StartsWithSegments("/ws", StringComparison.OrdinalIgnoreCase); } private static bool IsHtmlPath(this HttpContext context) { - return context.IsSpaFile() || context.Request.Path.Value?.Contains(".html", StringComparison.OrdinalIgnoreCase) == true; + return context.IsSpaFile() || context.IsHtml(); + } + + private static bool IsHtml(this HttpContext context) + { + return context.Request.Path.Value?.Contains(".html", StringComparison.OrdinalIgnoreCase) == true; } } } diff --git a/backend/src/Squidex/Areas/IdentityServer/Views/Setup/Setup.cshtml b/backend/src/Squidex/Areas/IdentityServer/Views/Setup/Setup.cshtml index 26d52c196..0f596bf2d 100644 --- a/backend/src/Squidex/Areas/IdentityServer/Views/Setup/Setup.cshtml +++ b/backend/src/Squidex/Areas/IdentityServer/Views/Setup/Setup.cshtml @@ -69,7 +69,9 @@ -@T.Get("setup.hint") +
+ @T.Get("setup.hint") +

@T.Get("setup.rules.headline")

@@ -173,7 +175,7 @@
-
+
diff --git a/backend/src/Squidex/Areas/IdentityServer/Views/_Layout.cshtml b/backend/src/Squidex/Areas/IdentityServer/Views/_Layout.cshtml index 8d3cbf9fb..8161f83f2 100644 --- a/backend/src/Squidex/Areas/IdentityServer/Views/_Layout.cshtml +++ b/backend/src/Squidex/Areas/IdentityServer/Views/_Layout.cshtml @@ -14,6 +14,11 @@ { @await RenderSectionAsync("header") } + + + + +
diff --git a/frontend/src/app/features/rules/shared/triggers/asset-changed-trigger.component.html b/frontend/src/app/features/rules/shared/triggers/asset-changed-trigger.component.html index c62fcf7a3..3e6d90dac 100644 --- a/frontend/src/app/features/rules/shared/triggers/asset-changed-trigger.component.html +++ b/frontend/src/app/features/rules/shared/triggers/asset-changed-trigger.component.html @@ -1,30 +1,30 @@
- + - +
-

Conditions

+

{{ 'common.conditions' | sqxTranslate }}

-

Conditions are javascript expressions that define when to trigger, for example:

+

{{ 'rules.conditionHint2' | sqxTranslate }}:

  • - Specific events:
    + {{ 'rules.conditions.event' | sqxTranslate }}:
    event.type == 'Created' || event.type == 'Updated'
  • - Large assets:
    + {{ 'rules.conditions.largeAssets' | sqxTranslate }}:
    event.fileSize > 100000000
  • - Images only:
    + {{ 'rules.conditions.images' | sqxTranslate }}:
    event.isImage
  • diff --git a/frontend/src/app/features/rules/shared/triggers/comment-trigger.component.html b/frontend/src/app/features/rules/shared/triggers/comment-trigger.component.html index 3504317e1..c6fcdf26d 100644 --- a/frontend/src/app/features/rules/shared/triggers/comment-trigger.component.html +++ b/frontend/src/app/features/rules/shared/triggers/comment-trigger.component.html @@ -1,25 +1,25 @@
    - + - +
    -

    Conditions

    +

    {{ 'common.conditions' | sqxTranslate }}

    -

    Conditions are javascript expressions that define when to trigger, for example:

    +

    {{ 'rules.conditionHint2' | sqxTranslate }}:

    • - Specific users:
      + {{ 'rules.conditions.commentUser' | sqxTranslate }}:
      event.mentionedUser.email === 'mail2stehle@gmail.com'
    • - Only for text keywords:
      + {{ 'rules.conditions.commentKeyword' | sqxTranslate }}:
      event.text.indexOf('urgent') >= 0
    • diff --git a/frontend/src/app/features/rules/shared/triggers/content-changed-trigger.component.html b/frontend/src/app/features/rules/shared/triggers/content-changed-trigger.component.html index 8bfa08612..752d1187a 100644 --- a/frontend/src/app/features/rules/shared/triggers/content-changed-trigger.component.html +++ b/frontend/src/app/features/rules/shared/triggers/content-changed-trigger.component.html @@ -1,17 +1,17 @@ - - - + + + @@ -21,11 +21,7 @@ {{triggerSchema.schema.displayName}}
      - + - +
      - + +
      -

      Conditions

      +

      {{ 'common.conditions' | sqxTranslate }}

      -

      Conditions are javascript expressions that define when to trigger, for example:

      +

      {{ 'rules.conditionHint2' | sqxTranslate }}:

      • - Specific events:
        + {{ 'rules.conditions.event' | sqxTranslate }}:
        event.type == 'Created' || event.type == 'Published'
      • - Content has value:
        + {{ 'rules.conditions.contentValue' | sqxTranslate }}:
        event.data.important.iv === true
      • - Updated by user:
        + {{ 'rules.conditions.updatedBy' | sqxTranslate }}:
        user.email === 'user@squidex.io'
      • @@ -79,7 +75,7 @@
      \ No newline at end of file diff --git a/frontend/src/app/features/rules/shared/triggers/schema-changed-trigger.component.html b/frontend/src/app/features/rules/shared/triggers/schema-changed-trigger.component.html index 586285963..19f68eb27 100644 --- a/frontend/src/app/features/rules/shared/triggers/schema-changed-trigger.component.html +++ b/frontend/src/app/features/rules/shared/triggers/schema-changed-trigger.component.html @@ -1,25 +1,25 @@
      - + - +
      -

      Conditions

      +

      {{ 'common.conditions' | sqxTranslate }}

      -

      Conditions are javascript expressions that define when to trigger, for example:

      +

      {{ 'rules.conditionHint2' | sqxTranslate }}:

      • - Specific events:
        + {{ 'rules.conditions.event' | sqxTranslate }}:
        event.type == 'Created' || event.type == 'Updated'
      • - Specific schema only:
        + {{ 'rules.conditions.schema' | sqxTranslate }}:
        schemaId.name === 'my-schema'
      • diff --git a/frontend/src/app/features/rules/shared/triggers/usage-trigger.component.html b/frontend/src/app/features/rules/shared/triggers/usage-trigger.component.html index bf0a2d03f..a59a4cec2 100644 --- a/frontend/src/app/features/rules/shared/triggers/usage-trigger.component.html +++ b/frontend/src/app/features/rules/shared/triggers/usage-trigger.component.html @@ -1,25 +1,25 @@
        - + - The monthly api calls to trigger. + {{ 'rules.conditions.usageLimitHint' | sqxTranslate }}
        - + - The number of days to check or empty to check the current month. + {{ 'rules.conditions.usageDaysHint' | sqxTranslate }}
        \ No newline at end of file diff --git a/frontend/src/app/features/schemas/pages/schema/fields/types/assets-validation.component.html b/frontend/src/app/features/schemas/pages/schema/fields/types/assets-validation.component.html index 8bbc3483d..b87d50667 100644 --- a/frontend/src/app/features/schemas/pages/schema/fields/types/assets-validation.component.html +++ b/frontend/src/app/features/schemas/pages/schema/fields/types/assets-validation.component.html @@ -34,13 +34,13 @@
      - +
      -
      +
      @@ -50,7 +50,7 @@