mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix string params for controllers
This commit is contained in:
parent
85acdb3868
commit
3b960e44f3
1 changed files with 11 additions and 8 deletions
|
@ -97,21 +97,24 @@ function dispatchViewEvent(view, eventInfo, eventName, isCancellable) {
|
||||||
return eventResult;
|
return eventResult;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getViewEventDetail(view, options, isRestore) {
|
function getViewEventDetail(view, {state, url, options = {}}, isRestored) {
|
||||||
const url = options.url;
|
|
||||||
const index = url.indexOf('?');
|
const index = url.indexOf('?');
|
||||||
const params = new URLSearchParams(url.substring(index + 1));
|
const searchParams = new URLSearchParams(url.substring(index + 1));
|
||||||
|
const params = {};
|
||||||
|
|
||||||
|
searchParams.forEach((value, key) =>
|
||||||
|
params[key] = value
|
||||||
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
detail: {
|
detail: {
|
||||||
type: view.getAttribute('data-type'),
|
type: view.getAttribute('data-type'),
|
||||||
properties: getProperties(view),
|
properties: getProperties(view),
|
||||||
params: params,
|
params,
|
||||||
isRestored: isRestore,
|
isRestored,
|
||||||
state: options.state,
|
state,
|
||||||
|
|
||||||
// The route options
|
// The route options
|
||||||
options: options.options || {}
|
options
|
||||||
},
|
},
|
||||||
bubbles: true,
|
bubbles: true,
|
||||||
cancelable: false
|
cancelable: false
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue