Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-22 17:30:29 +01:00
improved code structure
Dieser Commit ist enthalten in:
Ursprung
ee613d74c8
Commit
873b30ac65
1 geänderte Dateien mit 3 neuen und 3 gelöschten Zeilen
|
@ -21,9 +21,6 @@ export default WizardFieldValidator.extend({
|
||||||
showDefault: computed('hasNotSearched', 'hasInput', 'typing', function() {
|
showDefault: computed('hasNotSearched', 'hasInput', 'typing', function() {
|
||||||
return this.hasInput && (this.hasNotSearched || this.typing);
|
return this.hasInput && (this.hasNotSearched || this.typing);
|
||||||
}),
|
}),
|
||||||
insufficientCharacters: computed('typing', 'field.value', function() {
|
|
||||||
return this.hasInput && this.field.value.length < 5 && !this.typing;
|
|
||||||
}),
|
|
||||||
showSimilarTopics: computed('typing', 'hasSimilarTopics', function() {
|
showSimilarTopics: computed('typing', 'hasSimilarTopics', function() {
|
||||||
return this.hasSimilarTopics && !this.typing;
|
return this.hasSimilarTopics && !this.typing;
|
||||||
}),
|
}),
|
||||||
|
@ -31,6 +28,9 @@ export default WizardFieldValidator.extend({
|
||||||
return this.noSimilarTopics && !this.typing;
|
return this.noSimilarTopics && !this.typing;
|
||||||
}),
|
}),
|
||||||
hasValidationCategories: notEmpty('validationCategories'),
|
hasValidationCategories: notEmpty('validationCategories'),
|
||||||
|
insufficientCharacters: computed('typing', 'field.value', function() {
|
||||||
|
return this.hasInput && this.field.value.length < 5 && !this.typing;
|
||||||
|
}),
|
||||||
insufficientCharactersCategories: and('insufficientCharacters', 'hasValidationCategories'),
|
insufficientCharactersCategories: and('insufficientCharacters', 'hasValidationCategories'),
|
||||||
|
|
||||||
@discourseComputed('validation.categories')
|
@discourseComputed('validation.categories')
|
||||||
|
|
Laden …
In neuem Issue referenzieren