mirror of
https://github.com/chatwoot/chatwoot.git
synced 2026-06-13 21:01:16 +08:00
* feat: add avatar * chore: add more colors * chore: add helpers * chore: build prettier issues * chore: refactor shouldShowImage * chore: code cleanup * Update app/javascript/v3/components/Form/InitialsAvatar.vue Co-authored-by: Sivin Varghese <[email protected]> * chore: revire comments --------- Co-authored-by: Sivin Varghese <[email protected]>
10 lines
267 B
JavaScript
10 lines
267 B
JavaScript
export const replaceRouteWithReload = url => {
|
|
window.location = url;
|
|
};
|
|
|
|
export const userInitial = name => {
|
|
const parts = name.split(/[ -]/).filter(Boolean);
|
|
let initials = parts.map(part => part[0].toUpperCase()).join('');
|
|
return initials.slice(0, 2);
|
|
};
|