added theme support
This commit is contained in:
@@ -1,15 +1,19 @@
|
||||
# SonarDesk Stylist integration — 1.0.0
|
||||
# SonarDesk — Stylist theme integration
|
||||
|
||||
- `resources/themes/sonardesk/views` contains the original frontend Blade templates.
|
||||
- `resources/themes/sonardesk-admin/views` contains the original backend Blade templates.
|
||||
- Both are fully editable independent view trees, with application view fallback.
|
||||
- Active theme is selected by existing Stylist SettingsRepository (`frontend_theme` / `backend_theme`).
|
||||
- The `ApplyActiveTheme` web middleware prepends the active theme view directory for each request.
|
||||
- Public pages and authenticated customer pages use frontend; `/admin` and `/stylist` use backend.
|
||||
- Controllers, routes, licensing, payments, APIs and mail templates remain unchanged.
|
||||
- Theme management now requires AdminOnly permissions.
|
||||
- Existing CSS/JS assets remain in place. Replacement themes may provide new layout asset links.
|
||||
- Run `php artisan optimize:clear` and `php artisan migrate` after deployment.
|
||||
- Check `/stylist` as an administrator, then verify public, account, admin, and checkout pages.
|
||||
- If database already contains old `frontend_theme`/`backend_theme` values, activate the new bundled themes from Stylist.
|
||||
- Theme ZIP installation security and the completeness of third-party theme templates require separate review before production use.
|
||||
Stylist is the primary resolver for ordinary frontend and backend Laravel views. The active theme, its parents, the bundled baseline and finally `resources/views` are searched in that order.
|
||||
|
||||
- Frontend: `resources/themes/sonardesk/views`.
|
||||
- Backend: `resources/themes/sonardesk-admin/views`.
|
||||
- The bundled themes preserve existing markup, CSS, JavaScript, routes and business logic.
|
||||
- `/admin` and `/stylist` use backend; other web pages (including authenticated customer pages) use frontend.
|
||||
- AdminOnly middleware protects Stylist operations.
|
||||
- Bundled and active themes cannot be uninstalled.
|
||||
- Keep `resources/views`: email templates, fallback and compatibility views are required.
|
||||
- New theme ZIPs must include all needed templates, layouts, assets and a valid theme.json. Missing views fall back to baseline.
|
||||
- The middleware does not change asset URLs. Replacement themes must supply their own asset references and use the existing Stylist asset serving facilities.
|
||||
|
||||
## Local validation
|
||||
|
||||
Run `php artisan optimize:clear`, `php artisan migrate`, `php artisan stylist:doctor` (if registered) and `php artisan view:cache` using your configured PHP binary. Test public pages, authentication, checkout, admin, Stylist, and transactional email before deployment.
|
||||
|
||||
This package has not been executed against your ServBay environment. Do not deploy to production without smoke testing.
|
||||
|
||||
Reference in New Issue
Block a user