DEV: Fix issues with "admin guide" tip (#26520)
- Adjusts placement - Closes the tip when the user clicks on a link in the tip description
This commit is contained in:
parent
377d2ca3ad
commit
e7c6100d9f
|
@ -12,6 +12,7 @@
|
|||
@titleText={{i18n "user_tips.admin_guide.title"}}
|
||||
@contentHtml={{this.userTipContent}}
|
||||
@showSkipButton={{true}}
|
||||
@triggerSelector=".d-header-mode"
|
||||
/>
|
||||
{{/if}}
|
||||
</DButton>
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import Component from "@glimmer/component";
|
||||
import { on } from "@ember/modifier";
|
||||
import { action } from "@ember/object";
|
||||
import { service } from "@ember/service";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
|
@ -29,10 +30,19 @@ export default class UserTipContainer extends Component {
|
|||
this.userTips.skipTips();
|
||||
}
|
||||
|
||||
@action
|
||||
onClick(e) {
|
||||
if (e.target.nodeName === "A") {
|
||||
// Close tip if user clicks on a link in its description
|
||||
this.args.close();
|
||||
}
|
||||
}
|
||||
|
||||
<template>
|
||||
<div class="user-tip__container">
|
||||
<div class="user-tip__title">{{@data.titleText}}</div>
|
||||
<div class="user-tip__content">
|
||||
{{! template-lint-disable no-invalid-interactive }}
|
||||
<div class="user-tip__content" {{on "click" this.onClick}}>
|
||||
{{#if @data.contentHtml}}
|
||||
{{this.safeHtmlContent}}
|
||||
{{else}}
|
||||
|
|
Loading…
Reference in New Issue