Ghost/ghost/admin/app/components/posts/debug/email-error-message.js
Peter Zimon 63d216c321
Email debug updates (#16185)
no refs.

This commit fixes a couple of UX issues on the email debug screen:

- shows [...] button only for errors actually longer than the available
space to avoid confusion about where there's more error text
- use actual avatars instead of fake red/blue dots to make it consistent
with the rest of the app
- adds click through to member details screen to easily access member
data if needed
- updates text select for provider ID for easier copying
- removes unused "Download full error message" icon
2023-01-26 15:12:26 +01:00

16 lines
421 B
JavaScript

import Component from '@glimmer/component';
import {action} from '@ember/object';
import {tracked} from '@glimmer/tracking';
export default class EmailErrorMessage extends Component {
@tracked more = false;
@action
setup(element) {
const errorContainer = element.querySelector('span');
if (element.offsetWidth <= errorContainer.offsetWidth) {
this.more = true;
}
}
}