Initial commit
This commit is contained in:
24
templates/config/frontend/shahoo.env.js.erb
Normal file
24
templates/config/frontend/shahoo.env.js.erb
Normal file
@@ -0,0 +1,24 @@
|
||||
window.env = window.env || {};
|
||||
<% domain = @config['app']['domain'].to_s.strip %>
|
||||
<% brand_slug = domain.split('.').first.to_s.downcase %>
|
||||
<% brand_name = brand_slug.empty? ? @config['app']['name'].to_s : brand_slug.capitalize %>
|
||||
<% exchange_slug = brand_slug.empty? ? brand_name.downcase : brand_slug %>
|
||||
<% shahoo_host = @config['app']['shahoo_host'].to_s.strip %>
|
||||
<% shahoo_host = "#{@config['app']['shahoo_subdomain'] || 'shahoo'}.#{domain}" if shahoo_host.empty? %>
|
||||
window.env.app = {
|
||||
domain: '<%= domain %>',
|
||||
name: '<%= @config['app']['name'] %>',
|
||||
brandName: '<%= brand_name %>',
|
||||
exchangeSlug: '<%= exchange_slug %>',
|
||||
};
|
||||
window.env.api = {
|
||||
rangerUrl: '<%= ssl_helper('ws') %>://<%= shahoo_host %>/api/v2/ranger',
|
||||
};
|
||||
window.env.rangerEnabled = true;
|
||||
window.env.incrementalOrderBook = true;
|
||||
window.env.captcha = {
|
||||
captchaType: '<%= @config['captcha']['type'] %>',
|
||||
siteKey: '<%= @config['captcha']['siteKey'] %>',
|
||||
};
|
||||
window.env.captchaLogin = <%= @config['captchaLogin'] %>;
|
||||
window.env.showLanding = <%= !!@config.dig('app', 'show_landing') %>;
|
||||
Reference in New Issue
Block a user