mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-24 14:41:20 -08:00
fix(vast): [PKG-VAST-03] preserve npm initialization with explicit workspace mode
This commit is contained in:
1 parent
314a1c3163
commit
c162d2b3b3
27 files changed
+13189
-191
No files matched your search
@@ -2,18 +2,18 @@ import type { Utilities } from './types'
|
||||
|
||||
let nextId = 0
|
||||
|
||||
export function createContainer(utils: Utilities): HTMLDivElement {
|
||||
export function createContainer(utils: Utilities, workspaceMode: boolean): HTMLDivElement {
|
||||
const container = utils.createElement('div')
|
||||
container.id = `art-vast-${Date.now()}-${++nextId}`
|
||||
container.id = `${workspaceMode ? 'art-vast-' : 'art-'}${Date.now()}-${++nextId}`
|
||||
utils.setStyles(container, {
|
||||
position: 'absolute',
|
||||
inset: '0',
|
||||
width: '100%',
|
||||
height: '100%',
|
||||
zIndex: '150',
|
||||
backgroundColor: 'black',
|
||||
display: 'none',
|
||||
pointerEvents: 'auto',
|
||||
})
|
||||
if (workspaceMode)
|
||||
utils.setStyles(container, { backgroundColor: 'black', pointerEvents: 'auto' })
|
||||
return container
|
||||
}
|
||||
Reference in new issue
Block a user