| import '@material/web/icon/icon.js'; |
| import '@material/web/iconbutton/icon-button.js'; |
| import {css, html, LitElement} from 'lit'; |
| import {SHARED_MD3_STYLES} from '../../../../common/styles/md3.js'; |
| export default class TwptFlattenThreadQuoteAuthor extends LitElement { |
| prevMessage: {type: Object}, |
| max-width: max(25%, 150px); |
| color: var(--TWPT-interop-secondary-text, #444746); |
| :host > *:not(:last-child) { |
| <md-icon class="reply-icon">reply</md-icon> |
| <span class="name">${this.prevMessage?.author?.[1]?.[1]}</span> |
| @click=${this.focusParent}> |
| <md-icon>arrow_upward</md-icon> |
| const parentNode = document.querySelector( |
| '[data-twpt-message-id="' + this.prevMessage?.id + '"]'); |
| parentNode.focus({preventScroll: true}); |
| parentNode.scrollIntoView({behavior: 'smooth', block: 'start'}); |
| window.customElements.define( |
| 'twpt-flatten-thread-quote-author', TwptFlattenThreadQuoteAuthor); |