Port org-scheme theming from kamo-internal so borrower surfaces pick up lender branding

Featurekamolos
ส่งแล้ว
18 พฤษภาคม 2569 เวลา 01:50 UTC
ผู้เขียน
Kamo
ตั้งค่า
df5c98d

Ports the subdomain-driven org-theme system from kamo-internal into kamo-los, scoped down to what makes sense for an unauthenticated borrower-facing surface (no admin provisioning UI, no multi-tenant switching, no force-light-mode override since kamo-los is dark-by- design). How it works: - lib/org/theme.ts mirrors kamo-internal's Theme.tsx — getThemePath / buildThemeBaseForFqdn / orgFqdnFromHostname / KAMO_THEME_CONFIG_LOADED. Drops the deepest alias from the hostname so the borrower at apply.lender.com resolves to org FQDN lender.com → bucket folder lender-com → MinIO base **************** - lib/org/fetchOrganization.ts does the SSR org lookup against **************** via the existing proxy, with the optional KAMOLOS_SERVICE_ACCOUNT_*** for auth. Used by the root layout's generateMetadata() to seed the HTML title + description from the lender's org record before the page even hydrates. - **************** runs on mount, fetches <theme>/json/config.json, then: 1. sets document.title / apple-mobile-web-app-title / description 2. caches themeRevision + logoFullExt to sessionStorage for cache- busting and ThemeLogo 3. injects the favicons (96px, svg, ico, apple-touch, manifest) 4. maps the org's six colour slots onto the --org-* CSS var namespace at :root (NOT --color-*, so the aurora chrome stays canonical across orgs and only accent points opt-in) 5. dispatches KAMO_THEME_CONFIG_LOADED so logo + accent consumers can refresh Skips kamo-internal's force-light-mode <style> injection — kamo-los is intentionally dark. - components/theme/ThemeLogo.tsx renders the org logo from MinIO with aspect-ratio preservation, max-width/height caps, and a fallback prop for when the org isn't provisioned yet (so a broken image never ships). - globals.css gains the --org-primary / -light / -lighter / --org-secondary / -light / -lighter slots, defaulted to the aurora palette (#7B61FF / #21D4A6). - app/layout.tsx mounts DynamicMetaLoader and uses generateMetadata to seed initial title from the SSR org fetch. - BorrowerHeader: the left-side brand mark is now <ThemeLogo variant="logoFull" /> with a "Kamo" wordmark fallback. A 1px --org-primary accent ribbon sits above the header bar so the lender's colour shows up on every post-application surface without disturbing the dark surface palette. Build 32/32, 140 tests pass.

เปลี่ยนแปลงทั้งหมด

เหมือนที่คุณเห็นการขนส่ง?

ทุก คน ที่ ได้ รับ การ ปรับ ปรุง เหล่า นี้ จะ ลง ไป ใน ที่ ทํา งาน ของ คุณ โดย อัตโนมัติ. เริ่มให้อิสระและดูมันเติบโตสัปดาห์แล้วสัปดาห์เล่า.

เริ่ม เป็น อิสระ ตลอด ไปแสดงพริ้นซ์