feat: update residence learning flows
Commit non-media application and asset changes while leaving audio, video, and environment files out of version control. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
68ba22a33f
commit
6d40e19346
184 files changed
+7663
-2203
No files matched your search
@@ -0,0 +1,51 @@
|
||||
const STORAGE_KEY = 'debug:progression-unlock-all'
|
||||
const BADGE_ID = 'progression-debug-badge'
|
||||
|
||||
const isUnlockAllEnabled = () => {
|
||||
return window.sessionStorage.getItem(STORAGE_KEY) !== 'false'
|
||||
}
|
||||
|
||||
const getBadgeText = () => {
|
||||
return isUnlockAllEnabled() ? '测试包:全解锁' : '测试包:真实进度'
|
||||
}
|
||||
|
||||
const updateBadge = () => {
|
||||
let badge = document.getElementById(BADGE_ID)
|
||||
if (!badge) {
|
||||
badge = document.createElement('div')
|
||||
badge.id = BADGE_ID
|
||||
badge.style.position = 'fixed'
|
||||
badge.style.right = '12px'
|
||||
badge.style.top = '12px'
|
||||
badge.style.zIndex = '99999'
|
||||
badge.style.padding = '8px 10px'
|
||||
badge.style.borderRadius = '8px'
|
||||
badge.style.background = 'rgba(0, 0, 0, 0.72)'
|
||||
badge.style.color = '#fff'
|
||||
badge.style.fontSize = '12px'
|
||||
badge.style.lineHeight = '1.5'
|
||||
badge.style.pointerEvents = 'none'
|
||||
badge.style.whiteSpace = 'pre-line'
|
||||
document.body.appendChild(badge)
|
||||
}
|
||||
|
||||
badge.textContent = `${getBadgeText()}\nCtrl+Shift+U 切换`
|
||||
}
|
||||
|
||||
const toggleUnlockAll = () => {
|
||||
const nextValue = isUnlockAllEnabled() ? 'false' : 'true'
|
||||
window.sessionStorage.setItem(STORAGE_KEY, nextValue)
|
||||
updateBadge()
|
||||
window.location.reload()
|
||||
}
|
||||
|
||||
export const setupProgressionDebug = () => {
|
||||
updateBadge()
|
||||
|
||||
window.addEventListener('keydown', (event) => {
|
||||
if (!event.ctrlKey || !event.shiftKey || event.key.toLowerCase() !== 'u') return
|
||||
|
||||
event.preventDefault()
|
||||
toggleUnlockAll()
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user