feat(mgr): Utilities без Ext tabs (Phase 1c #521) - #537
Conversation
|
Спасибо за Phase 1c! Перед мержем нужен ребейз на текущую 1. Контракт entry Utilities ↔ Import.
2. Локально всё остальное зелёное (php -l, smoke кроме |
Replace Ext utilities shell with a single Vite entry and Help-style mount so all six tabs keep localStorage state without modx-tabs.
3672899 to
4575af0
Compare
|
Rebase на актуальную Дизайн entry Utilities ↔ ImportImport внутри vite.config.js
Gates |
…аницах (#544) (#545) * fix(mgr): inject auth token into ms3.config to kill HTTP_MODAUTH race (#544) Ext-less Vue manager pages fire their first API requests on DOMContentLoaded, before the manager JS populates the MODx.siteId global that request.js used as HTTP_MODAUTH. Those early requests went out tokenless, so the connector rejected them (HTTP 200 body {success:false, message:"Доступ запрещён.", object:{code:401}}), surfacing as intermittent "Доступ запрещён" on orders filters/grid-config while the later list request succeeded (grid filled). #533/#534/#536/#537 exposed the race by dropping the waitForElement guard. Ship the token synchronously in the inline ms3.config block, before the Vue module runs: - manager.class.php: new addVueConfig() helper injects token = getUserToken($contextKey) - customers/notifications/order/orders/settings/utilities: use addVueConfig() - request.js getModAuthToken(): read ms3.config.token first, fall back to MODx.siteId Covers all 6 Ext-less Vue pages. No permission/session change. * test(mgr): assert addVueConfig contract + base token injection (#544) Moving the ms3.config emission into the base addVueConfig() helper took the `var ms3` literal out of the page controllers, so the *VueEntryTest smoke guards that grep each controller for it failed. Switch the required pattern to `addVueConfig`, and add a base-controller guard in CustomersNotificationsVueEntryTest asserting controllers/manager.class.php ships `var ms3` + getUserToken (the #544 token injection that must not regress).
Описание
Phase 1c epic #521 / #524: раздел «Утилиты» монтируется одним Vue app (как Help), без Ext
modx-tabs/utilities.panel.js.utilities.js,utilities.panel.js,import/panel.jsи 6 orphan Vite entriesutilities.tpl,UtilitiesPage.vue, entryutilities.jsvar ms3 = { config }+utilities.min.js/ CSS черезassetsUrllocalStorage(ms3-utilities-active-tab) + remap legacy Ext tab idsgetMs3Config()UtilitiesVueEntryTest.phpТип изменений
Связанные Issues
Closes #524
Refs #521
Overlap с #530: удаление
utilities/import/panel.js(Phase 0). После merge этого PR правки utilities в #530 станут no-op / конфликт на том же файле.Как это было протестировано?
Конфигурация тестирования:
feat/issue-524-utilities-vue-entryЧеклист
Дополнительные заметки
utility_gallery_thumbnails) — structured JSON follow-up.DevInputв vite всё ещё keyed какfields-management→index.html(локальный serve); не влияет на prod entry.