web: improve truncation of strings
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
This commit is contained in:
		| @ -2,6 +2,7 @@ import "@goauthentik/admin/events/EventInfo"; | ||||
| import { ActionToLabel } from "@goauthentik/admin/events/utils"; | ||||
| import { DEFAULT_CONFIG } from "@goauthentik/common/api/config"; | ||||
| import { EventWithContext } from "@goauthentik/common/events"; | ||||
| import { truncate } from "@goauthentik/common/utils"; | ||||
| import "@goauthentik/elements/Tabs"; | ||||
| import "@goauthentik/elements/buttons/Dropdown"; | ||||
| import "@goauthentik/elements/buttons/ModalButton"; | ||||
| @ -78,7 +79,7 @@ export class RecentEventsCard extends Table<Event> { | ||||
|             item.user?.username | ||||
|                 ? html`<div> | ||||
|                           <a href="#/identity/users/${item.user.pk}" | ||||
|                               >${item.user?.username.substring(0, 15)}</a | ||||
|                               >${truncate(item.user?.username, 15)}</a | ||||
|                           > | ||||
|                       </div> | ||||
|                       ${item.user.on_behalf_of | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Jens Langhammer
					Jens Langhammer