mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-25 18:03:50 +00:00
web: minor fixes
This commit is contained in:
parent
c43a2ef8dc
commit
c2d8674a7b
@ -64,6 +64,9 @@
|
|||||||
&.selected {
|
&.selected {
|
||||||
background-color: #e0ebf5 !important;
|
background-color: #e0ebf5 !important;
|
||||||
}
|
}
|
||||||
|
&.selected.highlighted {
|
||||||
|
background-color: #7bbefc !important;
|
||||||
|
}
|
||||||
|
|
||||||
&.highlighted {
|
&.highlighted {
|
||||||
background-color: #ffeb99;
|
background-color: #ffeb99;
|
||||||
|
@ -83,7 +83,7 @@ describe('updateUrlFromStore', () => {
|
|||||||
},
|
},
|
||||||
store = mockStore(state)
|
store = mockStore(state)
|
||||||
updateUrlFromStore(store)
|
updateUrlFromStore(store)
|
||||||
expect(history.replaceState).toBeCalledWith(undefined, '', '/#/flows/123/request?s=~u foo')
|
expect(history.replaceState).toBeCalledWith(undefined, '', '/#/flows/123/request?s=~u%20foo')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -33,7 +33,8 @@ export function updateStoreFromUrl(store) {
|
|||||||
query
|
query
|
||||||
.split("&")
|
.split("&")
|
||||||
.forEach((x) => {
|
.forEach((x) => {
|
||||||
const [key, value] = x.split("=", 2)
|
let [key, value] = x.split("=", 2)
|
||||||
|
value = decodeURIComponent(value)
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case Query.SEARCH:
|
case Query.SEARCH:
|
||||||
store.dispatch(setFilter(value))
|
store.dispatch(setFilter(value))
|
||||||
@ -66,7 +67,7 @@ export function updateUrlFromStore(store) {
|
|||||||
}
|
}
|
||||||
const queryStr = Object.keys(query)
|
const queryStr = Object.keys(query)
|
||||||
.filter(k => query[k])
|
.filter(k => query[k])
|
||||||
.map(k => `${k}=${query[k]}`)
|
.map(k => `${k}=${encodeURIComponent(query[k])}`)
|
||||||
.join("&")
|
.join("&")
|
||||||
|
|
||||||
let url
|
let url
|
||||||
|
Loading…
Reference in New Issue
Block a user