This commit is contained in:
Pete Matsyburka committed 2026-09-23 11:00:17 +03:00
1 parent 79aa034183
commit d071e8c429
5 files changed
+17 -5

No files matched your search

+13 -1
View File
@@ -57,11 +57,23 @@ if (handlers?.native && window === window.top) {
const reportPathConfiguration = () => {
const element = document.getElementById('native_path_configuration')
if (element) handlers.native.postMessage({ type: 'path-configuration', json: element.textContent })
if (!element) return
const config = JSON.parse(element.textContent)
config.rules.forEach(({ properties }) => {
if (properties.native_actions) properties.native_actions = properties.native_actions.map(nativeIcon)
})
handlers.native.postMessage({ type: 'path-configuration', json: JSON.stringify(config) })
}
document.addEventListener('turbo:load', reportPathConfiguration)
document.addEventListener('turbo:before-cache', () => {
document.getElementById('native_path_configuration')?.remove()
})
reportPathConfiguration()
const reportFlash = (element) => {