Compare commits
3 Commits
786c515bfe
...
8dac00318f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8dac00318f | ||
|
|
05b1ceda93 | ||
|
|
c7190499df |
@@ -1,3 +1,9 @@
|
||||
## 3.4.1 (10 Nov 2024)
|
||||
|
||||
* fix: no copy and delete for shadow root
|
||||
* fix: fetch remains pending when error occurs
|
||||
* fix: theme not updated if system theme changed
|
||||
|
||||
## 3.4.0 (27 Sep 2024)
|
||||
|
||||
* feat: support shadow dom [#158](https://github.com/liriliri/eruda/issues/158)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "eruda",
|
||||
"version": "3.4.0",
|
||||
"version": "3.4.1",
|
||||
"description": "Console for Mobile Browsers",
|
||||
"main": "eruda.js",
|
||||
"browserslist": [
|
||||
@@ -45,7 +45,7 @@
|
||||
"autoprefixer": "^9.7.4",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"babel-loader": "^8.2.5",
|
||||
"chobitsu": "^1.8.1",
|
||||
"chobitsu": "^1.8.4",
|
||||
"core-js": "^3.37.1",
|
||||
"css-loader": "^3.4.2",
|
||||
"es-check": "^6.2.1",
|
||||
@@ -61,7 +61,7 @@
|
||||
"karma-jquery": "^0.2.4",
|
||||
"karma-sourcemap-loader": "^0.3.7",
|
||||
"karma-webpack": "^5.0.0",
|
||||
"licia": "^1.43.0",
|
||||
"licia": "^1.44.0",
|
||||
"luna-box-model": "^1.0.0",
|
||||
"luna-console": "^1.3.5",
|
||||
"luna-data-grid": "^1.0.0",
|
||||
|
||||
@@ -10,9 +10,10 @@ import isNum from 'licia/isNum'
|
||||
import nextTick from 'licia/nextTick'
|
||||
import $ from 'licia/$'
|
||||
import toNum from 'licia/toNum'
|
||||
import isDarkMode from 'licia/isDarkMode'
|
||||
import extend from 'licia/extend'
|
||||
import isStr from 'licia/isStr'
|
||||
import theme from 'licia/theme'
|
||||
import upperFirst from 'licia/upperFirst'
|
||||
import startWith from 'licia/startWith'
|
||||
import ready from 'licia/ready'
|
||||
import pointerEvent from 'licia/pointerEvent'
|
||||
@@ -265,19 +266,19 @@ export default class DevTools extends Emitter {
|
||||
$container.rmClass(c('safe-area'))
|
||||
}
|
||||
}
|
||||
_setTheme(theme) {
|
||||
_setTheme(t) {
|
||||
const { $container } = this
|
||||
|
||||
if (theme === 'System preference') {
|
||||
theme = isDarkMode() ? 'Dark' : 'Light'
|
||||
if (t === 'System preference') {
|
||||
t = upperFirst(theme.get())
|
||||
}
|
||||
|
||||
if (isDarkTheme(theme)) {
|
||||
if (isDarkTheme(t)) {
|
||||
$container.addClass(c('dark'))
|
||||
} else {
|
||||
$container.rmClass(c('dark'))
|
||||
}
|
||||
evalCss.setTheme(theme)
|
||||
evalCss.setTheme(t)
|
||||
}
|
||||
_setTransparency(opacity) {
|
||||
if (!isNum(opacity)) return
|
||||
@@ -396,5 +397,12 @@ export default class DevTools extends Emitter {
|
||||
window.addEventListener('resize', this._checkSafeArea)
|
||||
|
||||
emitter.on(emitter.SCALE, this._updateTabHeight)
|
||||
|
||||
theme.on('change', () => {
|
||||
const t = this.config.get('theme')
|
||||
if (t === 'System preference') {
|
||||
this._setTheme(t)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,6 +203,22 @@ export default class Network extends Tool {
|
||||
|
||||
request.render()
|
||||
}
|
||||
_loadingFailed = (params) => {
|
||||
const request = this._requests[params.requestId]
|
||||
if (!this._isRecording || !request) {
|
||||
return
|
||||
}
|
||||
|
||||
const time = params.timestamp * 1000
|
||||
request.time = time - request.startTime
|
||||
request.displayTime = ms(request.time)
|
||||
|
||||
request.hasErr = true
|
||||
request.status = 0
|
||||
request.done = true
|
||||
|
||||
request.render()
|
||||
}
|
||||
_copyCurl = () => {
|
||||
const request = this._selectedRequest
|
||||
|
||||
@@ -322,6 +338,7 @@ export default class Network extends Tool {
|
||||
network.on('responseReceivedExtraInfo', this._resReceivedExtraInfo)
|
||||
network.on('responseReceived', this._resReceived)
|
||||
network.on('loadingFinished', this._loadingFinished)
|
||||
network.on('loadingFailed', this._loadingFailed)
|
||||
|
||||
emitter.on(emitter.SCALE, this._updateScale)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user