UX: convert "view all notification" to a link (#30874)

so it respects the user's input of opening it in another tab when
CTRL/META/MIDDLE clicking it.

<img width="471" alt="Screenshot 2025-01-20 at 16 20 14"
src="https://github.com/user-attachments/assets/2ba1a78a-0c12-452e-b054-ef7e7c1338c1"
/>
This commit is contained in:
Régis Hanol 2025-01-20 18:24:08 +01:00 committed by GitHub
parent d88ee33eb6
commit e2c3dff669
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 8 deletions

View File

@ -16,7 +16,7 @@
{{#if this.showAllHref}} {{#if this.showAllHref}}
<DButton <DButton
class="show-all" class="show-all"
@action={{this.showAll}} @href={{this.showAllHref}}
@translatedAriaLabel={{this.showAllTitle}} @translatedAriaLabel={{this.showAllTitle}}
@translatedTitle={{this.showAllTitle}} @translatedTitle={{this.showAllTitle}}
> >

View File

@ -2,7 +2,6 @@ import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking"; import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object"; import { action } from "@ember/object";
import { service } from "@ember/service"; import { service } from "@ember/service";
import DiscourseURL from "discourse/lib/url";
export default class UserMenuItemsList extends Component { export default class UserMenuItemsList extends Component {
@service session; @service session;
@ -87,10 +86,4 @@ export default class UserMenuItemsList extends Component {
`dismissButtonClick must be implemented in ${this.constructor.name}.` `dismissButtonClick must be implemented in ${this.constructor.name}.`
); );
} }
@action
showAll() {
DiscourseURL.routeTo(this.showAllHref);
this.args.closeUserMenu();
}
} }