extract site_name and site_description from theme settings into standalone settings

site_name and site_description are shop identity, not theme concerns.
They now live in the Settings table as first-class settings with their
own assigns (@site_name, @site_description) piped through hooks and
plugs. The setup wizard writes site_name on account creation, and the
theme editor reads/writes via Settings.put_setting. Removed the
"configure your shop" checklist item since currency/country aren't
built yet. Also adds shop name field to setup wizard step 1.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
jamey
2026-03-03 14:52:31 +00:00
parent 8ea77e5992
commit 5b41f3fedf
25 changed files with 464 additions and 255 deletions

View File

@@ -85,6 +85,8 @@ defmodule BerrypodWeb.ErrorHTML do
assigns =
assigns
|> Map.put(:theme_settings, theme_settings)
|> Map.put(:site_name, safe_load(&Settings.site_name/0) || "Store Name")
|> Map.put(:site_description, safe_load(&Settings.site_description/0) || "")
|> Map.put(:generated_css, generated_css)
|> Map.put(:logo_image, logo_image)
|> Map.put(:header_image, header_image)

View File

@@ -25,15 +25,16 @@ defmodule BerrypodWeb.FaviconController do
def webmanifest(conn, _params) do
settings = Settings.get_theme_settings()
site_name = Settings.site_name()
short_name =
case settings.favicon_short_name do
name when is_binary(name) and name != "" -> name
_ -> String.slice(settings.site_name, 0, 12)
_ -> String.slice(site_name, 0, 12)
end
manifest = %{
name: settings.site_name,
name: site_name,
short_name: short_name,
theme_color: settings.accent_color || "#000000",
background_color: settings.icon_background_color || "#ffffff",