diff --git a/app/assets/javascripts/wizard/components/wizard-step.js.es6 b/app/assets/javascripts/wizard/components/wizard-step.js.es6 index 34e1b8fc0a8..5930ffe6a77 100644 --- a/app/assets/javascripts/wizard/components/wizard-step.js.es6 +++ b/app/assets/javascripts/wizard/components/wizard-step.js.es6 @@ -34,6 +34,12 @@ export default Ember.Component.extend({ @computed('step.index') showBackButton: index => index > 0, + @computed('step.banner') + bannerImage(src) { + if (!src) { return; } + return `/images/wizard/${src}`; + }, + @observes('step.id') _stepChanged() { this.set('saving', false); diff --git a/app/assets/javascripts/wizard/templates/components/wizard-step.hbs b/app/assets/javascripts/wizard/templates/components/wizard-step.hbs index 85cee6cb1f7..ada0018f0b1 100644 --- a/app/assets/javascripts/wizard/templates/components/wizard-step.hbs +++ b/app/assets/javascripts/wizard/templates/components/wizard-step.hbs @@ -3,10 +3,15 @@

{{step.title}}

{{/if}} + {{#if bannerImage}} + + {{/if}} + {{#if step.description}}

{{{step.description}}}

{{/if}} + {{#wizard-step-form step=step}} {{#each step.fields as |field|}} {{wizard-field field=field step=step wizard=wizard}} diff --git a/app/assets/stylesheets/wizard.scss b/app/assets/stylesheets/wizard.scss index a67ecc01fb6..37c882dd15f 100644 --- a/app/assets/stylesheets/wizard.scss +++ b/app/assets/stylesheets/wizard.scss @@ -62,7 +62,7 @@ body.wizard { border: 1px solid #ccc; .wizard-step-contents { - min-height: 460px; + min-height: 480px; } .wizard-column-contents { @@ -76,6 +76,9 @@ body.wizard { .wizard-step-description { margin-bottom: 2em; } + .wizard-step-banner { + margin-bottom: 2em; + } .wizard-footer { border-top: 1px solid #ccc; diff --git a/app/serializers/wizard_step_serializer.rb b/app/serializers/wizard_step_serializer.rb index 0adc4486bc3..90f54a9178b 100644 --- a/app/serializers/wizard_step_serializer.rb +++ b/app/serializers/wizard_step_serializer.rb @@ -1,6 +1,6 @@ class WizardStepSerializer < ApplicationSerializer - attributes :id, :next, :previous, :description, :title, :index + attributes :id, :next, :previous, :description, :title, :index, :banner has_many :fields, serializer: WizardFieldSerializer, embed: :objects def id @@ -47,4 +47,12 @@ class WizardStepSerializer < ApplicationSerializer title.present? end + def banner + object.banner + end + + def include_banner? + object.banner.present? + end + end diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index a2d8a43d59b..365ccf96c59 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -3222,8 +3222,6 @@ en: step: locale: title: "Welcome to your Discourse!" - description: "Before you launch your new Discourse community, we’ll need to configure a few things together first. You can come back and change these settings any time." - fields: default_locale: description: "What’s the default language for your community?" diff --git a/lib/wizard/builder.rb b/lib/wizard/builder.rb index a9e12e9209a..ba6901422da 100644 --- a/lib/wizard/builder.rb +++ b/lib/wizard/builder.rb @@ -9,6 +9,8 @@ class Wizard return @wizard unless SiteSetting.wizard_enabled? && @wizard.user.try(:staff?) @wizard.append_step('locale') do |step| + step.banner = "welcome.png" + languages = step.add_field(id: 'default_locale', type: 'dropdown', required: true, @@ -164,7 +166,9 @@ class Wizard DiscourseEvent.trigger(:build_wizard, @wizard) - @wizard.append_step('finished') + @wizard.append_step('finished') do |step| + step.banner = "finished.png" + end @wizard end diff --git a/lib/wizard/step.rb b/lib/wizard/step.rb index 5586a1eb35c..40a8b9f6e5d 100644 --- a/lib/wizard/step.rb +++ b/lib/wizard/step.rb @@ -1,7 +1,7 @@ class Wizard class Step attr_reader :id, :updater - attr_accessor :index, :fields, :next, :previous + attr_accessor :index, :fields, :next, :previous, :banner def initialize(id) @id = id diff --git a/public/images/wizard/apple-mask.png b/public/images/wizard/apple-mask.png index a3ac21f402c..685181060b4 100644 Binary files a/public/images/wizard/apple-mask.png and b/public/images/wizard/apple-mask.png differ diff --git a/public/images/wizard/bubbles.png b/public/images/wizard/bubbles.png index 6847ae35926..1577e1dd94c 100644 Binary files a/public/images/wizard/bubbles.png and b/public/images/wizard/bubbles.png differ diff --git a/public/images/wizard/finished.png b/public/images/wizard/finished.png new file mode 100644 index 00000000000..4baa1539882 Binary files /dev/null and b/public/images/wizard/finished.png differ diff --git a/public/images/wizard/tab.png b/public/images/wizard/tab.png index 9e6c50785db..f799fb154aa 100644 Binary files a/public/images/wizard/tab.png and b/public/images/wizard/tab.png differ diff --git a/public/images/wizard/trout.png b/public/images/wizard/trout.png index 5af72ee4258..48625e4b770 100644 Binary files a/public/images/wizard/trout.png and b/public/images/wizard/trout.png differ diff --git a/public/images/wizard/welcome.png b/public/images/wizard/welcome.png new file mode 100644 index 00000000000..42ab012fe20 Binary files /dev/null and b/public/images/wizard/welcome.png differ