PluginProbe
Extendify / 0.11.1
Extendify v0.11.1
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / src / Assist / app.js

app.js in Extendify 0.11.1, at src/Assist/app.js

29 lines 1.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { render } from '@wordpress/element'
2 import { AssistLandingPage } from '@assist/AssistLandingPage'
3 import { AdminNotice } from '@assist/components/AdminNotice'
4
5 // Disable Assist while Launch is running
6 const q = new URLSearchParams(window.location.search)
7 const launchActive = ['onboarding'].includes(q.get('extendify'))
8 const launchCompleted = window.extAssistData.launchCompleted
9 const devbuild = window.extAssistData.devbuild
10
11 const assistPage = document.getElementById('extendify-assist-landing-page')
12 const dashboard = document.getElementById('dashboard-widgets-wrap')
13
14 // Assist landing page
15 if (!launchActive && assistPage) {
16 render(<AssistLandingPage />, assistPage)
17 }
18
19 // Launch admin notice - show on devmode too
20 if (dashboard && (!launchCompleted || devbuild)) {
21 const launchAdminNotice = Object.assign(document.createElement('div'), {
22 className: 'extendify-assist',
23 })
24 // Hide the welcome notice if we are going to display ours
25 document.getElementById('welcome-panel')?.remove()
26 dashboard.before(launchAdminNotice)
27 render(<AdminNotice />, launchAdminNotice)
28 }
29