mirror of
https://github.com/discourse/discourse.git
synced 2024-12-03 14:03:46 +08:00
10f200a5d3
* FEATURE: revamped wizard * UX: Wizard redesign (#17381) * UX: Step 1-2 * swap out images * UX: Finalize all steps * UX: mobile * UX: Fix test * more test * DEV: remove unneeded wizard components * DEV: fix wizard tests * DEV: update rails tests for new wizard * Remove empty hbs files that were created because of rebase * Fixes for rebase * Fix wizard image link * More rebase fixes * Fix rails tests * FIX: Update preview for new color schemes: (#17481) * UX: make layout more responsive, update images * fix typo * DEV: move discourse logo svg to template only component * DEV: formatting improvements * Remove unneeded files * Add tests for privacy step * Fix banner image height for step "ready" Co-authored-by: Jordan Vidrine <30537603+jordanvidrine@users.noreply.github.com> Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
24 lines
695 B
JavaScript
24 lines
695 B
JavaScript
import Component from "@ember/component";
|
|
import { dasherize } from "@ember/string";
|
|
import discourseComputed from "discourse-common/utils/decorators";
|
|
|
|
export default Component.extend({
|
|
classNameBindings: [
|
|
":wizard-container__field",
|
|
"typeClasses",
|
|
"field.invalid",
|
|
],
|
|
|
|
@discourseComputed("field.type", "field.id")
|
|
typeClasses: (type, id) =>
|
|
`${dasherize(type)}-field ${dasherize(type)}-${dasherize(id)}`,
|
|
|
|
@discourseComputed("field.id")
|
|
fieldClass: (id) => `field-${dasherize(id)} wizard-focusable`,
|
|
|
|
@discourseComputed("field.type", "field.id")
|
|
inputComponentName(type, id) {
|
|
return type === "component" ? dasherize(id) : `wizard-field-${type}`;
|
|
},
|
|
});
|