diff --git a/.rubocop.yml b/.rubocop.yml
index 00b581c0d..ac0a64665 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -25,7 +25,7 @@ Style/FrozenStringLiteralComment:
Style/SymbolArray:
Enabled: false
Style/OptionalBooleanParameter:
- Exclude:
+ Exclude:
- 'app/services/email_templates/db_resolver_service.rb'
- 'app/dispatchers/dispatcher.rb'
Style/GlobalVars:
@@ -57,6 +57,7 @@ Rails/ApplicationController:
- 'app/controllers/widgets_controller.rb'
- 'app/controllers/platform_controller.rb'
- 'app/controllers/public_controller.rb'
+ - 'app/controllers/survey/responses_controller.rb'
Style/ClassAndModuleChildren:
EnforcedStyle: compact
Exclude:
@@ -79,7 +80,7 @@ Style/GuardClause:
- 'app/models/message.rb'
- 'db/migrate/20190819005836_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb'
Metrics/AbcSize:
- Exclude:
+ Exclude:
- 'app/controllers/concerns/auth_helper.rb'
- 'db/migrate/20190819005836_add_missing_indexes_on_taggings.acts_as_taggable_on_engine.rb'
- 'db/migrate/20161123131628_devise_token_auth_create_users.rb'
@@ -108,7 +109,7 @@ Rails/BulkChangeTable:
- 'db/migrate/20191027054756_create_contact_inboxes.rb'
- 'db/migrate/20191130164019_add_template_type_to_messages.rb'
- 'db/migrate/20210425093724_convert_integration_hook_settings_field.rb'
-Rails/UniqueValidationWithoutIndex:
+Rails/UniqueValidationWithoutIndex:
Exclude:
- 'app/models/channel/twitter_profile.rb'
- 'app/models/webhook.rb'
diff --git a/app/controllers/survey/responses_controller.rb b/app/controllers/survey/responses_controller.rb
new file mode 100644
index 000000000..8bbd0fe88
--- /dev/null
+++ b/app/controllers/survey/responses_controller.rb
@@ -0,0 +1,10 @@
+class Survey::ResponsesController < ActionController::Base
+ before_action :set_global_config
+ def show; end
+
+ private
+
+ def set_global_config
+ @global_config = GlobalConfig.get('LOGO_THUMBNAIL', 'BRAND_NAME', 'WIDGET_BRAND_URL')
+ end
+end
diff --git a/app/javascript/packs/survey.js b/app/javascript/packs/survey.js
new file mode 100644
index 000000000..3c65f8b82
--- /dev/null
+++ b/app/javascript/packs/survey.js
@@ -0,0 +1,25 @@
+import Vue from 'vue';
+import Vuelidate from 'vuelidate';
+import VueI18n from 'vue-i18n';
+import App from '../survey/App.vue';
+import i18n from '../survey/i18n';
+
+Vue.use(VueI18n);
+Vue.use(Vuelidate);
+
+const i18nConfig = new VueI18n({
+ locale: 'en',
+ messages: i18n,
+});
+
+// Event Bus
+window.bus = new Vue();
+
+Vue.config.productionTip = false;
+
+window.onload = () => {
+ window.WOOT_SURVEY = new Vue({
+ i18n: i18nConfig,
+ render: h => h(App),
+ }).$mount('#app');
+};
diff --git a/app/javascript/widget/components/Branding.vue b/app/javascript/shared/components/Branding.vue
similarity index 88%
rename from app/javascript/widget/components/Branding.vue
rename to app/javascript/shared/components/Branding.vue
index aacf825d3..6a284a6bd 100644
--- a/app/javascript/widget/components/Branding.vue
+++ b/app/javascript/shared/components/Branding.vue
@@ -16,21 +16,28 @@
-
diff --git a/app/javascript/survey/App.vue b/app/javascript/survey/App.vue
new file mode 100755
index 000000000..076ca9fe7
--- /dev/null
+++ b/app/javascript/survey/App.vue
@@ -0,0 +1,20 @@
+
+
+ {{ $t('SURVEY.DESCRIPTION') }}
+