Refactor AppVersionInfo component
Refactor AppVersionInfo component to use a textarea for the description field and remove white backgrounds.
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
|
||||
import React, { useCallback, useEffect, useState, useRef } from 'react';
|
||||
import { getAppVersionInfo, isAndroidPlatform } from '@/utils/platform';
|
||||
import { Input } from '@/components/ui/input';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { Textarea } from '@/components/ui/textarea';
|
||||
|
||||
interface AppVersionInfoProps {
|
||||
className?: string;
|
||||
showDevInfo?: boolean; // 개발자 정보 표시 여부
|
||||
editable?: boolean; // 편집 가능 여부
|
||||
}
|
||||
|
||||
const AppVersionInfo: React.FC<AppVersionInfoProps> = ({
|
||||
className,
|
||||
showDevInfo = true,
|
||||
@@ -103,30 +104,34 @@ const AppVersionInfo: React.FC<AppVersionInfoProps> = ({
|
||||
}
|
||||
}
|
||||
}, [fetchVersionInfo, error, loading, editable]);
|
||||
|
||||
if (editable) {
|
||||
return <div className={className}>
|
||||
<div className="space-y-3">
|
||||
<div>
|
||||
<Label htmlFor="versionName">앱 버전</Label>
|
||||
<div className="neuro-flat p-3 rounded-md border border-gray-200 bg-white text-base mt-1">
|
||||
<div className="neuro-pressed p-3 rounded-md text-base mt-1">
|
||||
{editableVersionName}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="buildNumber">빌드 번호</Label>
|
||||
<div className="neuro-flat p-3 rounded-md border border-gray-200 bg-white text-base mt-1">
|
||||
<div className="neuro-pressed p-3 rounded-md text-base mt-1">
|
||||
{editableBuildNumber}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="notes">세부 설명</Label>
|
||||
<Textarea id="notes" placeholder="추가 정보를 입력하세요" className="h-20" />
|
||||
<div className="neuro-pressed p-3 rounded-md text-base mt-1 h-20">
|
||||
사용자가 수정한 버전 정보입니다. 이 파일을 편집하여 앱 버전 정보를 변경할 수 있습니다.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>;
|
||||
}
|
||||
|
||||
return <div className={className}>
|
||||
{loading ? <div className="py-1 text-center">
|
||||
<p className="text-sm text-gray-400 animate-pulse">버전 정보 로딩 중...</p>
|
||||
@@ -141,4 +146,5 @@ const AppVersionInfo: React.FC<AppVersionInfoProps> = ({
|
||||
</div>}
|
||||
</div>;
|
||||
};
|
||||
export default AppVersionInfo;
|
||||
|
||||
export default AppVersionInfo;
|
||||
|
||||
Reference in New Issue
Block a user