Browse Source

Fix colors.

pull/1039/head
Sebastian 3 years ago
parent
commit
0bea625f57
  1. 4
      backend/src/Squidex.Domain.Apps.Entities/Contents/ContentChangedTriggerHandler.cs
  2. 4
      frontend/src/app/features/schemas/pages/schema/fields/types/references-ui.component.html
  3. 4
      frontend/src/app/framework/angular/pipes/colors.pipes.spec.ts
  4. 2
      frontend/src/app/framework/utils/color-helper.ts

4
backend/src/Squidex.Domain.Apps.Entities/Contents/ContentChangedTriggerHandler.cs

@ -97,10 +97,10 @@ public sealed class ContentChangedTriggerHandler : IRuleTriggerHandler, ISubscri
yield break; yield break;
} }
var allTriggers = var allTriggers = context.Rules.Select(x => x.Value.Trigger).OfType<ContentChangedTriggerV2>();
// This method is only called once per event, therefore we check all rules. // This method is only called once per event, therefore we check all rules.
if (!context.Rules.Select(x => x.Value.Trigger).OfType<ContentChangedTriggerV2>().Any(t => MatchesAnySchema(t.ReferencedSchemas, enrichedEvent))) if (!allTriggers.Any(t => MatchesAnySchema(t.ReferencedSchemas, enrichedEvent)))
{ {
yield break; yield break;
} }

4
frontend/src/app/features/schemas/pages/schema/fields/types/references-ui.component.html

@ -29,13 +29,13 @@
</div> </div>
<div class="form-group row"> <div class="form-group row">
<label class="col-3 col-form-label" for="{{field.fieldId}}_query">{{ 'schemas.field.references.query' | sqxTranslate }}</label> <label class="col-3 col-form-label" for="{{field.fieldId}}_query">{{ 'schemas.fieldTypes.references.query' | sqxTranslate }}</label>
<div class="col-9"> <div class="col-9">
<input type="text" class="form-control" id="{{field.fieldId}}_query" formControlName="query"> <input type="text" class="form-control" id="{{field.fieldId}}_query" formControlName="query">
<sqx-form-hint> <sqx-form-hint>
{{ 'schemas.field.references.queryHint' | sqxTranslate }} {{ 'schemas.fieldTypes.references.queryHint' | sqxTranslate }}
</sqx-form-hint> </sqx-form-hint>
</div> </div>
</div> </div>

4
frontend/src/app/framework/angular/pipes/colors.pipes.spec.ts

@ -33,7 +33,7 @@ describe('DarkenPipe', () => {
it('should darken mixed color', () => { it('should darken mixed color', () => {
const result = pipe.transform('#FF91D1', 20); const result = pipe.transform('#FF91D1', 20);
expect(result).toEqual('#cc7574'); expect(result).toEqual('#cc74a7');
}); });
}); });
@ -61,7 +61,7 @@ describe('LightenPipe', () => {
it('should lighten mixed color', () => { it('should lighten mixed color', () => {
const result = pipe.transform('#7F4868', 20); const result = pipe.transform('#7F4868', 20);
expect(result).toEqual('#985756'); expect(result).toEqual('#98567d');
}); });
}); });

2
frontend/src/app/framework/utils/color-helper.ts

@ -93,7 +93,7 @@ export module ColorHelper {
h /= 6; h /= 6;
} }
return { h, s, v }; return { h: h * 360, s, v };
} }
export function hsvToRgb({ h, s, v }: HSVColor): RGBColor { export function hsvToRgb({ h, s, v }: HSVColor): RGBColor {

Loading…
Cancel
Save