minor ui improvements for profile
This commit is contained in:
@@ -1,9 +1,15 @@
|
||||
import type { IServiceProfile } from '@openpanel/db';
|
||||
|
||||
export function getProfileName(profile: IServiceProfile | undefined | null) {
|
||||
export function getProfileName(
|
||||
profile: IServiceProfile | undefined | null,
|
||||
short = true
|
||||
) {
|
||||
if (!profile) return 'Unknown';
|
||||
|
||||
if (!profile.isExternal) {
|
||||
if (short) {
|
||||
return profile.id.slice(0, 4) + '...' + profile.id.slice(-4);
|
||||
}
|
||||
return profile.id;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user