mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-21 22:58:24 +00:00
web: minor fixes
This commit is contained in:
parent
c43a2ef8dc
commit
c2d8674a7b
@ -64,6 +64,9 @@
|
||||
&.selected {
|
||||
background-color: #e0ebf5 !important;
|
||||
}
|
||||
&.selected.highlighted {
|
||||
background-color: #7bbefc !important;
|
||||
}
|
||||
|
||||
&.highlighted {
|
||||
background-color: #ffeb99;
|
||||
|
@ -83,7 +83,7 @@ describe('updateUrlFromStore', () => {
|
||||
},
|
||||
store = mockStore(state)
|
||||
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
|
||||
.split("&")
|
||||
.forEach((x) => {
|
||||
const [key, value] = x.split("=", 2)
|
||||
let [key, value] = x.split("=", 2)
|
||||
value = decodeURIComponent(value)
|
||||
switch (key) {
|
||||
case Query.SEARCH:
|
||||
store.dispatch(setFilter(value))
|
||||
@ -66,7 +67,7 @@ export function updateUrlFromStore(store) {
|
||||
}
|
||||
const queryStr = Object.keys(query)
|
||||
.filter(k => query[k])
|
||||
.map(k => `${k}=${query[k]}`)
|
||||
.map(k => `${k}=${encodeURIComponent(query[k])}`)
|
||||
.join("&")
|
||||
|
||||
let url
|
||||
|
Loading…
Reference in New Issue
Block a user