2017-05-03 23:31:16 +08:00
|
|
|
# we can not guess what to do if customization already started, so skip it
|
|
|
|
if !Theme.exists?
|
|
|
|
STDERR.puts "> Seeding dark and light themes"
|
|
|
|
|
2018-07-24 21:00:20 +08:00
|
|
|
name = I18n.t("color_schemes.dark_theme_name")
|
|
|
|
dark_scheme = ColorScheme.find_by(base_scheme_id: "Dark")
|
|
|
|
dark_scheme ||= ColorScheme.create_from_base(name: name, via_wizard: true, base_scheme_id: "Dark")
|
2017-05-03 23:31:16 +08:00
|
|
|
|
|
|
|
name = I18n.t('color_schemes.dark_theme_name')
|
2017-07-28 09:20:09 +08:00
|
|
|
_dark_theme = Theme.create(name: name, user_id: -1,
|
|
|
|
color_scheme_id: dark_scheme.id,
|
|
|
|
user_selectable: true)
|
2017-05-03 23:31:16 +08:00
|
|
|
|
|
|
|
name = I18n.t('color_schemes.default_theme_name')
|
2017-07-28 09:20:09 +08:00
|
|
|
default_theme = Theme.create(name: name, user_id: -1,
|
|
|
|
user_selectable: true)
|
2017-05-03 23:31:16 +08:00
|
|
|
|
|
|
|
default_theme.set_default!
|
|
|
|
end
|