Vue normale

Reçu aujourd’hui — 14 avril 2025Framasoft

How to properly change an internal URL with filter:left-menu.links.create.result

Hello -
I’m making a plugin that uses the « filter:left-menu.links.create.result » hook provided by PeerTube. You can view the repo at:

I’m having an issue where when a user clicks a link that points to a different internal URL, the page reload is not triggered. The source code defines the following parameters for a link:

type MenuLink = {
  icon: GlobalIconName
  iconClass?: string
  label: string
  path?: string
  url?: string
  query?: Params
  isPrimaryButton?: boolean // default false
  ngClass?: string
}

So in this context, a link that defines a « path » and a « query » to build a custom internal URL does not trigger a page reload on click. If the base « path » in the link changes, then the page reloads - but if just the « path » is the same, and just the « query » changes, the page does not reload. Hopefully that makes sense.

I’ve tried forcing a page reload by adding a « window.location.reload(); » onClick event, but that does nothing.

I’m sure there is some kind of internal URL processing done by PeerTube to handle this « internal » URL change that I’m not accessing, I simply can not find out what it is. Can someone point me in the right direction?

2 messages - 1 participant(e)

Lire le sujet en entier

❌