mirror of
https://github.com/discourse/discourse.git
synced 2025-03-09 14:34:35 +00:00
FIX: Theme settings are referenced in JS by settings
, not themeSetting
This commit is contained in:
parent
880311dd4d
commit
5bfa661a87
@ -60,7 +60,7 @@ class ThemeField < ActiveRecord::Base
|
|||||||
validates :name, format: { with: /\A[a-z_][a-z0-9_-]*\z/i },
|
validates :name, format: { with: /\A[a-z_][a-z0-9_-]*\z/i },
|
||||||
if: Proc.new { |field| ThemeField.theme_var_type_ids.include?(field.type_id) }
|
if: Proc.new { |field| ThemeField.theme_var_type_ids.include?(field.type_id) }
|
||||||
|
|
||||||
COMPILER_VERSION = 7
|
COMPILER_VERSION = 8
|
||||||
|
|
||||||
belongs_to :theme
|
belongs_to :theme
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ class ThemeJavascriptCompiler
|
|||||||
template = Tilt::ES6ModuleTranspilerTemplate.new {}
|
template = Tilt::ES6ModuleTranspilerTemplate.new {}
|
||||||
wrapped = <<~PLUGIN_API_JS
|
wrapped = <<~PLUGIN_API_JS
|
||||||
if ('Discourse' in window && typeof Discourse._registerPluginCode === 'function') {
|
if ('Discourse' in window && typeof Discourse._registerPluginCode === 'function') {
|
||||||
const themeSetting = Discourse.__container__
|
const settings = Discourse.__container__
|
||||||
.lookup("service:theme-settings")
|
.lookup("service:theme-settings")
|
||||||
.getObjectForTheme(#{@theme_id});
|
.getObjectForTheme(#{@theme_id});
|
||||||
const themePrefix = (key) => `theme_translations.#{@theme_id}.${key}`;
|
const themePrefix = (key) => `theme_translations.#{@theme_id}.${key}`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user