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 React, { useCallback, useEffect, useState, useRef } from 'react';
|
||||||
import { getAppVersionInfo, isAndroidPlatform } from '@/utils/platform';
|
import { getAppVersionInfo, isAndroidPlatform } from '@/utils/platform';
|
||||||
import { Label } from '@/components/ui/label';
|
import { Label } from '@/components/ui/label';
|
||||||
|
|
||||||
interface AppVersionInfoProps {
|
interface AppVersionInfoProps {
|
||||||
className?: string;
|
className?: string;
|
||||||
showDevInfo?: boolean;
|
showDevInfo?: boolean;
|
||||||
editable?: boolean;
|
editable?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const AppVersionInfo: React.FC<AppVersionInfoProps> = ({
|
const AppVersionInfo: React.FC<AppVersionInfoProps> = ({
|
||||||
className,
|
className,
|
||||||
showDevInfo = true,
|
showDevInfo = true,
|
||||||
@@ -104,7 +101,6 @@ const AppVersionInfo: React.FC<AppVersionInfoProps> = ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [fetchVersionInfo, error, loading, editable]);
|
}, [fetchVersionInfo, error, loading, editable]);
|
||||||
|
|
||||||
if (editable) {
|
if (editable) {
|
||||||
return <div className={className}>
|
return <div className={className}>
|
||||||
<div className="space-y-3">
|
<div className="space-y-3">
|
||||||
@@ -121,35 +117,23 @@ const AppVersionInfo: React.FC<AppVersionInfoProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="mt-[70px] text-center">
|
<div className="mt-[70px] text-center">
|
||||||
<p className="text-sm text-gray-400 font-semibold">ZELLYY CLOUD</p>
|
<p className="text-gray-400 font-semibold text-lg my-[70px]">ZELLYY CLOUD</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
return <div className={className}>
|
||||||
return (
|
{loading ? <div className="py-1 text-center">
|
||||||
<div className={className}>
|
|
||||||
{loading ? (
|
|
||||||
<div className="py-1 text-center">
|
|
||||||
<p className="text-sm text-gray-400 animate-pulse">버전 정보 로딩 중...</p>
|
<p className="text-sm text-gray-400 animate-pulse">버전 정보 로딩 중...</p>
|
||||||
</div>
|
</div> : error ? <div className="py-1 text-center">
|
||||||
) : error ? (
|
|
||||||
<div className="py-1 text-center">
|
|
||||||
<p className="text-sm text-red-500">빌드 정보 로딩 오류</p>
|
<p className="text-sm text-red-500">빌드 정보 로딩 오류</p>
|
||||||
<button onClick={handleRetry} className="text-xs text-blue-500 underline mt-1 px-2 py-0.5 rounded hover:bg-blue-50">
|
<button onClick={handleRetry} className="text-xs text-blue-500 underline mt-1 px-2 py-0.5 rounded hover:bg-blue-50">
|
||||||
재시도
|
재시도
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div> : <div className="py-1 text-center">
|
||||||
) : (
|
|
||||||
<div className="py-1 text-center">
|
|
||||||
<p className="text-sm">{versionInfo.versionName} (build {versionInfo.buildNumber})</p>
|
<p className="text-sm">{versionInfo.versionName} (build {versionInfo.buildNumber})</p>
|
||||||
{showDevInfo && versionInfo.versionCode && (
|
{showDevInfo && versionInfo.versionCode && <p className="text-xs text-gray-400 mt-1 font-mono">versionCode: {versionInfo.versionCode}</p>}
|
||||||
<p className="text-xs text-gray-400 mt-1 font-mono">versionCode: {versionInfo.versionCode}</p>
|
</div>}
|
||||||
)}
|
</div>;
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default AppVersionInfo;
|
export default AppVersionInfo;
|
||||||
Reference in New Issue
Block a user