Refactor AppVersionInfo component

Refactor AppVersionInfo component to use a textarea for the description field and remove white backgrounds.
This commit is contained in:
gpt-engineer-app[bot]
2025-03-18 14:30:31 +00:00
parent e0c2bbb345
commit 7122a0b8bc

View File

@@ -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;