Visual edit in Lovable
Edited UI in Lovable
This commit is contained in:
@@ -1,14 +1,11 @@
|
||||
|
||||
import React, { useCallback, useEffect, useState, useRef } from 'react';
|
||||
import { getAppVersionInfo, isAndroidPlatform } from '@/utils/platform';
|
||||
import { Label } from '@/components/ui/label';
|
||||
|
||||
interface AppVersionInfoProps {
|
||||
className?: string;
|
||||
showDevInfo?: boolean; // 개발자 정보 표시 여부
|
||||
editable?: boolean; // 편집 가능 여부
|
||||
}
|
||||
|
||||
const AppVersionInfo: React.FC<AppVersionInfoProps> = ({
|
||||
className,
|
||||
showDevInfo = true,
|
||||
@@ -104,34 +101,30 @@ const AppVersionInfo: React.FC<AppVersionInfoProps> = ({
|
||||
}
|
||||
}
|
||||
}, [fetchVersionInfo, error, loading, editable]);
|
||||
|
||||
if (editable) {
|
||||
return <div className={className}>
|
||||
<div className="space-y-3">
|
||||
<div>
|
||||
<Label htmlFor="versionName" className="text-gray-600">앱 버전</Label>
|
||||
<div className="p-2 text-base mt-1">
|
||||
<div className="p-2 text-base mt-1 py-0">
|
||||
{editableVersionName}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="buildNumber" className="text-gray-600">빌드 번호</Label>
|
||||
<div className="p-2 text-base mt-1">
|
||||
<div className="p-2 text-base mt-1 py-0">
|
||||
{editableBuildNumber}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label htmlFor="notes" className="text-gray-600">세부 설명</Label>
|
||||
<div className="p-2 text-base mt-1">
|
||||
사용자가 수정한 버전 정보입니다. 이 파일을 편집하여 앱 버전 정보를 변경할 수 있습니다.
|
||||
</div>
|
||||
<div className="p-2 text-base mt-1 py-0">The first build</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>
|
||||
@@ -146,5 +139,4 @@ const AppVersionInfo: React.FC<AppVersionInfoProps> = ({
|
||||
</div>}
|
||||
</div>;
|
||||
};
|
||||
|
||||
export default AppVersionInfo;
|
||||
export default AppVersionInfo;
|
||||
@@ -106,7 +106,7 @@ const Settings = () => {
|
||||
|
||||
<div className="mt-10 border-t border-gray-200 pt-4">
|
||||
<div>
|
||||
<h2 className="text-sm font-medium text-gray-500 mb-2 px-2">버전 정보 설정</h2>
|
||||
|
||||
<AppVersionInfo showDevInfo={true} editable={true} />
|
||||
</div>
|
||||
|
||||
@@ -118,5 +118,4 @@ const Settings = () => {
|
||||
<NavBar />
|
||||
</div>;
|
||||
};
|
||||
|
||||
export default Settings;
|
||||
export default Settings;
|
||||
Reference in New Issue
Block a user