60 lines
2.4 KiB
TypeScript
60 lines
2.4 KiB
TypeScript
import React, { useState } from 'react';
|
|
import { X, Copy, Check, Server, Globe, ArrowLeftRight, HardDrive } from 'lucide-react';
|
|
|
|
interface SettingsModalProps {
|
|
isOpen: boolean;
|
|
onClose: () => void;
|
|
}
|
|
|
|
const SettingsModal: React.FC<SettingsModalProps & { saveConnectionInfo: boolean, onToggleSaveConnectionInfo: (checked: boolean) => void }> = ({
|
|
isOpen,
|
|
onClose,
|
|
saveConnectionInfo,
|
|
onToggleSaveConnectionInfo
|
|
}) => {
|
|
if (!isOpen) return null;
|
|
|
|
return (
|
|
<div className="fixed inset-0 z-50 flex items-center justify-center bg-black/20 backdrop-blur-sm p-4">
|
|
<div className="bg-white border border-slate-200 rounded-lg shadow-2xl w-full max-w-md flex flex-col">
|
|
|
|
{/* Header */}
|
|
<div className="flex items-center justify-between p-4 border-b border-slate-200">
|
|
<h2 className="text-lg font-bold text-slate-800 flex items-center gap-2">
|
|
<Server size={20} className="text-blue-600" />
|
|
앱 설정
|
|
</h2>
|
|
<button onClick={onClose} className="text-slate-400 hover:text-slate-600 transition-colors">
|
|
<X size={20} />
|
|
</button>
|
|
</div>
|
|
|
|
{/* Content */}
|
|
<div className="p-6">
|
|
<label className="flex items-center gap-3 p-4 border border-slate-200 rounded-lg cursor-pointer hover:bg-slate-50 transition-colors">
|
|
<div className="relative flex items-center">
|
|
<input
|
|
type="checkbox"
|
|
checked={saveConnectionInfo}
|
|
onChange={(e) => onToggleSaveConnectionInfo(e.target.checked)}
|
|
className="w-5 h-5 text-blue-600 border-slate-300 rounded focus:ring-blue-500"
|
|
/>
|
|
</div>
|
|
<div className="flex-1">
|
|
<span className="font-semibold text-slate-700 block text-sm">빠른 실행 정보 저장</span>
|
|
<span className="text-xs text-slate-500">호스트, 사용자명, 포트 정보를 로컬에 저장합니다.</span>
|
|
</div>
|
|
</label>
|
|
</div>
|
|
|
|
<div className="p-4 border-t border-slate-200 bg-slate-50 rounded-b-lg flex justify-end">
|
|
<button onClick={onClose} className="px-4 py-2 bg-white hover:bg-slate-50 border border-slate-300 text-slate-600 rounded text-sm transition-colors shadow-sm">
|
|
닫기
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default SettingsModal; |