..
This commit is contained in:
@@ -3,6 +3,9 @@
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
|
||||
<meta http-equiv="Pragma" content="no-cache">
|
||||
<meta http-equiv="Expires" content="0">
|
||||
<title>VNC 서버 목록 관리</title>
|
||||
<script src="https://cdn.tailwindcss.com"></script>
|
||||
<script>
|
||||
@@ -22,25 +25,27 @@
|
||||
</script>
|
||||
</head>
|
||||
<body class="bg-gray-50 min-h-screen">
|
||||
<div class="container mx-auto px-4 py-8">
|
||||
<!-- 헤더 -->
|
||||
<div class="bg-white rounded-lg shadow-md p-6 mb-6">
|
||||
<h1 class="text-3xl font-bold text-gray-800 mb-2">VNC 서버 목록 관리</h1>
|
||||
<p class="text-gray-600">VNC 서버를 관리하고 연결할 수 있습니다.</p>
|
||||
<div class="container mx-auto px-4 py-2">
|
||||
|
||||
<!-- 상태 표시 -->
|
||||
<div id="status" class="mb-4"></div>
|
||||
|
||||
<!-- 서버 목록 -->
|
||||
<div class="bg-white rounded-lg shadow-md overflow-hidden mb-4">
|
||||
<div id="serverList">
|
||||
<!-- 서버 목록이 여기에 동적으로 로드됩니다 -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 상태 표시 -->
|
||||
<div id="status" class="mb-6"></div>
|
||||
|
||||
<!-- 버튼 그룹 -->
|
||||
<div class="mb-6 flex space-x-4">
|
||||
<button id="addServerBtn" class="bg-primary hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg transition duration-200">
|
||||
<!-- 툴바 -->
|
||||
<div class="flex space-x-4 mb-4">
|
||||
<button id="addServerBtn" class="bg-primary hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-lg transition duration-200 shadow-sm">
|
||||
<svg class="w-5 h-5 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path>
|
||||
</svg>
|
||||
새 서버 추가
|
||||
</button>
|
||||
<button id="settingsBtn" class="bg-secondary hover:bg-gray-600 text-white font-bold py-2 px-4 rounded-lg transition duration-200">
|
||||
<button id="settingsBtn" class="bg-secondary hover:bg-gray-600 text-white font-bold py-2 px-4 rounded-lg transition duration-200 shadow-sm">
|
||||
<svg class="w-5 h-5 inline mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
|
||||
@@ -48,16 +53,6 @@
|
||||
설정
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 서버 목록 -->
|
||||
<div class="bg-white rounded-lg shadow-md overflow-hidden">
|
||||
<div class="px-6 py-4 border-b border-gray-200">
|
||||
<h2 class="text-xl font-semibold text-gray-800">서버 목록</h2>
|
||||
</div>
|
||||
<div id="serverList" class="divide-y divide-gray-200">
|
||||
<!-- 서버 목록이 여기에 동적으로 로드됩니다 -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 서버 추가/편집 모달 -->
|
||||
@@ -79,6 +74,10 @@
|
||||
<div class="mb-4">
|
||||
<label for="serverCategory" class="block text-sm font-medium text-gray-700 mb-2">카테고리</label>
|
||||
<input type="text" id="serverCategory" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label for="serverTitle" class="block text-sm font-medium text-gray-700 mb-2">제목</label>
|
||||
<input type="text" id="serverTitle" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label for="serverDescription" class="block text-sm font-medium text-gray-700 mb-2">설명</label>
|
||||
@@ -109,6 +108,11 @@
|
||||
<h3 class="text-lg font-semibold text-gray-800">설정</h3>
|
||||
</div>
|
||||
<form id="settingsForm" class="p-6">
|
||||
<div class="mb-4">
|
||||
<label for="userName" class="block text-sm font-medium text-gray-700 mb-2">사용자 이름 <span class="text-red-500">*</span></label>
|
||||
<input type="text" id="userName" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="사용자 이름을 입력하세요" required>
|
||||
<p class="text-sm text-gray-500 mt-1">현재 사용자의 이름을 설정하세요. (필수)</p>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label for="vncViewerPath" class="block text-sm font-medium text-gray-700 mb-2">VNC Viewer 경로</label>
|
||||
<div class="flex space-x-2">
|
||||
@@ -117,6 +121,11 @@
|
||||
</div>
|
||||
<p class="text-sm text-gray-500 mt-1">VNC Viewer 실행 파일의 경로를 설정하세요.</p>
|
||||
</div>
|
||||
<div class="mb-4">
|
||||
<label for="vncArgument" class="block text-sm font-medium text-gray-700 mb-2">VNC 기본 인수</label>
|
||||
<input type="text" id="vncArgument" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent" placeholder="-useclipboard=no -scale=auto -showcontrols=yes">
|
||||
<p class="text-sm text-gray-500 mt-1">VNC 연결 시 사용할 기본 인수를 설정하세요.</p>
|
||||
</div>
|
||||
<div class="mb-6">
|
||||
<label for="webServerPort" class="block text-sm font-medium text-gray-700 mb-2">웹 서버 포트</label>
|
||||
<input type="number" id="webServerPort" value="8080" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent">
|
||||
@@ -149,6 +158,84 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="js/app.js"></script>
|
||||
<!-- 숨겨진 템플릿들 -->
|
||||
<template id="serverItemTemplate">
|
||||
<div class="server-item px-4 py-3 hover:bg-gray-50 transition duration-200 border-b border-gray-100 relative overflow-hidden group">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex-1 cursor-pointer" onclick="app.connectToServer('{{userName}}', '{{serverIP}}')">
|
||||
<div class="flex items-center space-x-3">
|
||||
<div class="w-3 h-3 bg-green-500 rounded-full"></div>
|
||||
<h4 class="text-lg font-medium text-gray-900 hover:text-blue-600 transition duration-200">{{serverName}}</h4>
|
||||
<span class="text-xs text-gray-400 opacity-0 group-hover:opacity-100 transition duration-200">클릭하여 연결</span>
|
||||
</div>
|
||||
<div class="mt-2 text-sm text-gray-600">
|
||||
<p><span class="font-medium">IP:</span> {{serverIP}}</p>
|
||||
{{#if serverCategory}}<p class="mt-1"><span class="font-medium">카테고리:</span> {{serverCategory}}</p>{{/if}}
|
||||
{{#if serverDescription}}<p class="mt-1"><span class="font-medium">설명:</span> {{serverDescription}}</p>{{/if}}
|
||||
{{#if serverArgument}}<p class="mt-1"><span class="font-medium">인수:</span> {{serverArgument}}</p>{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="action-buttons flex space-x-2 transform translate-x-full transition-transform duration-300 ease-in-out group-hover:translate-x-0">
|
||||
<button onclick="app.connectToServer('{{userName}}', '{{serverIP}}')" class="bg-primary hover:bg-blue-700 text-white px-3 py-1 rounded text-sm transition duration-200 shadow-sm">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 10V3L4 14h7v7l9-11h-7z"></path>
|
||||
</svg>
|
||||
</button>
|
||||
<button onclick="app.editServer('{{userName}}', '{{serverIP}}')" class="bg-secondary hover:bg-gray-600 text-white px-3 py-1 rounded text-sm transition duration-200 shadow-sm">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path>
|
||||
</svg>
|
||||
</button>
|
||||
<button onclick="app.deleteServer('{{userName}}', '{{serverIP}}', '{{serverName}}')" class="bg-danger hover:bg-red-700 text-white px-3 py-1 rounded text-sm transition duration-200 shadow-sm">
|
||||
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"></path>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="categoryHeaderTemplate">
|
||||
<div class="category-header px-4 py-2 {{bgClass}} border-b border-gray-200 cursor-pointer hover:bg-gray-100 transition duration-200" onclick="app.toggleCategory('{{categoryName}}', {{depth}})">
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="flex items-center space-x-2">
|
||||
{{#if hasContent}}
|
||||
<svg class="w-4 h-4 text-gray-500 category-icon" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
|
||||
</svg>
|
||||
{{/if}}
|
||||
<h3 class="font-medium text-gray-700">{{categoryName}}</h3>
|
||||
<span class="text-sm text-gray-500">({{totalItems}})</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="emptyServerListTemplate">
|
||||
<div class="px-4 py-6 text-center text-gray-500">
|
||||
<svg class="w-12 h-12 mx-auto mb-4 text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>
|
||||
</svg>
|
||||
<p>등록된 서버가 없습니다.</p>
|
||||
<p class="text-sm">새 서버를 추가해보세요.</p>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="userNameRequiredTemplate">
|
||||
<div class="px-4 py-6 text-center text-gray-500">
|
||||
<svg class="w-12 h-12 mx-auto mb-4 text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"></path>
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z"></path>
|
||||
</svg>
|
||||
<p class="text-lg font-medium mb-2">사용자 설정이 필요합니다</p>
|
||||
<p class="mb-4">서버 목록을 보려면 먼저 사용자 이름을 설정해주세요.</p>
|
||||
<button onclick="app.showSettingsModal()" class="bg-primary hover:bg-blue-700 text-white px-4 py-2 rounded-lg transition duration-200">
|
||||
설정하기
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script src="js/app.js?v=1.0"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user