mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-01-07 03:26:54 +08:00
fix: allow open CLI from anywhere
This commit is contained in:
parent
a13879f2df
commit
7d9b34ecc9
@ -6,13 +6,11 @@ import routes from './scripts/route'
|
||||
|
||||
Object.assign(window, { React, ReactDOM, $ })
|
||||
|
||||
if (blessing.route.startsWith('admin')) {
|
||||
const entry = document.querySelector('[href="#launch-cli"]')
|
||||
entry?.addEventListener('click', async () => {
|
||||
const { launch } = await import('./scripts/cli')
|
||||
launch()
|
||||
})
|
||||
}
|
||||
const entry = document.querySelector('[href="#launch-cli"]')
|
||||
entry?.addEventListener('click', async () => {
|
||||
const { launch } = await import('./scripts/cli')
|
||||
launch()
|
||||
})
|
||||
|
||||
const route = routes.find((route) =>
|
||||
new RegExp(`^${route.path}$`, 'i').test(blessing.route),
|
||||
|
Loading…
Reference in New Issue
Block a user