fix: Gateway 화면에서 raw 프로필 ID 노출을 제거한다
불변 profileName은 라우팅과 저장 경계에 유지하고 사용자 출력은 공통 표시명을 사용한다. 기본 인스턴스 suffix를 숨기고 비기본 인스턴스만 사람이 읽을 수 있게 구분한다.
This commit is contained in:
@@ -20,6 +20,19 @@ export const resolveGatewayProfileKoreanName = (profile: string, configuredName?
|
||||
return gatewayProfileKoreanNames.get(profile) ?? profile;
|
||||
};
|
||||
|
||||
/**
|
||||
* User-facing profile label. The immutable profileName (`che:default`) remains
|
||||
* an internal routing/storage key and must not leak into ordinary UI copy.
|
||||
*/
|
||||
export const resolveGatewayProfileDisplayName = (
|
||||
profile: string,
|
||||
instanceKey: string,
|
||||
configuredName?: unknown
|
||||
): string => {
|
||||
const koreanName = resolveGatewayProfileKoreanName(profile, configuredName);
|
||||
return instanceKey === 'default' ? koreanName : `${koreanName} [${instanceKey}]`;
|
||||
};
|
||||
|
||||
const compareGatewayProfiles = (
|
||||
left: { profile: string; instanceKey: string },
|
||||
right: { profile: string; instanceKey: string }
|
||||
|
||||
Reference in New Issue
Block a user