Add 3 files
Browse files- README.md +6 -4
- index.html +651 -19
- prompts.txt +1 -0
README.md
CHANGED
@@ -1,10 +1,12 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
colorTo: green
|
6 |
sdk: static
|
7 |
pinned: false
|
|
|
|
|
8 |
---
|
9 |
|
10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
1 |
---
|
2 |
+
title: privfingaa-data-vbeta1-01
|
3 |
+
emoji: π³
|
4 |
+
colorFrom: green
|
5 |
colorTo: green
|
6 |
sdk: static
|
7 |
pinned: false
|
8 |
+
tags:
|
9 |
+
- deepsite
|
10 |
---
|
11 |
|
12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
@@ -1,19 +1,651 @@
|
|
1 |
-
<!
|
2 |
-
<html>
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>PrivFingaa - Enhanced Interface</title>
|
7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
9 |
+
<style>
|
10 |
+
.window {
|
11 |
+
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
12 |
+
transition: all 0.3s ease;
|
13 |
+
}
|
14 |
+
.window-header {
|
15 |
+
cursor: move;
|
16 |
+
}
|
17 |
+
.window.minimized {
|
18 |
+
height: 40px;
|
19 |
+
overflow: hidden;
|
20 |
+
}
|
21 |
+
.window.minimized .window-body {
|
22 |
+
display: none;
|
23 |
+
}
|
24 |
+
.draggable {
|
25 |
+
position: absolute;
|
26 |
+
z-index: 1000;
|
27 |
+
}
|
28 |
+
.resizable {
|
29 |
+
resize: both;
|
30 |
+
overflow: auto;
|
31 |
+
}
|
32 |
+
.input-line {
|
33 |
+
transition: background-color 0.2s;
|
34 |
+
}
|
35 |
+
.input-line:hover {
|
36 |
+
background-color: rgba(59, 130, 246, 0.1);
|
37 |
+
}
|
38 |
+
.tab-active {
|
39 |
+
border-bottom: 2px solid #3b82f6;
|
40 |
+
color: #3b82f6;
|
41 |
+
}
|
42 |
+
.json-viewer {
|
43 |
+
font-family: monospace;
|
44 |
+
white-space: pre;
|
45 |
+
}
|
46 |
+
.status-indicator {
|
47 |
+
width: 10px;
|
48 |
+
height: 10px;
|
49 |
+
border-radius: 50%;
|
50 |
+
display: inline-block;
|
51 |
+
margin-right: 5px;
|
52 |
+
}
|
53 |
+
.status-connected {
|
54 |
+
background-color: #10B981;
|
55 |
+
}
|
56 |
+
.status-disconnected {
|
57 |
+
background-color: #EF4444;
|
58 |
+
}
|
59 |
+
</style>
|
60 |
+
</head>
|
61 |
+
<body class="bg-gray-100 font-sans p-4">
|
62 |
+
<div class="container mx-auto">
|
63 |
+
<header class="mb-6">
|
64 |
+
<h1 class="text-3xl font-bold text-gray-800 flex items-center">
|
65 |
+
<i class="fas fa-lock mr-3 text-blue-500"></i>
|
66 |
+
PrivFingaa <span class="text-sm ml-2 bg-blue-100 text-blue-800 px-2 py-1 rounded">Enhanced</span>
|
67 |
+
</h1>
|
68 |
+
<div class="flex items-center mt-2">
|
69 |
+
<span id="connection-status" class="status-indicator status-connected"></span>
|
70 |
+
<span id="connection-text" class="text-sm text-gray-600">Connected to PrivFingaa API</span>
|
71 |
+
<button id="refresh-btn" class="ml-4 text-blue-500 hover:text-blue-700">
|
72 |
+
<i class="fas fa-sync-alt"></i> Refresh
|
73 |
+
</button>
|
74 |
+
</div>
|
75 |
+
</header>
|
76 |
+
|
77 |
+
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4">
|
78 |
+
<!-- Main Data Window -->
|
79 |
+
<div id="main-window" class="window draggable resizable bg-white rounded-lg overflow-hidden" style="width: 600px; height: 500px; left: 20px; top: 100px;">
|
80 |
+
<div class="window-header bg-blue-600 text-white px-4 py-2 flex justify-between items-center">
|
81 |
+
<div class="flex items-center">
|
82 |
+
<i class="fas fa-database mr-2"></i>
|
83 |
+
<span>PrivFingaa Data Manager</span>
|
84 |
+
</div>
|
85 |
+
<div class="window-controls">
|
86 |
+
<button class="minimize-btn px-2 hover:bg-blue-700 rounded">
|
87 |
+
<i class="fas fa-minus"></i>
|
88 |
+
</button>
|
89 |
+
<button class="close-btn px-2 hover:bg-blue-700 rounded ml-1">
|
90 |
+
<i class="fas fa-times"></i>
|
91 |
+
</button>
|
92 |
+
</div>
|
93 |
+
</div>
|
94 |
+
<div class="window-body p-4 h-full overflow-auto">
|
95 |
+
<div class="tabs flex border-b mb-4">
|
96 |
+
<button class="tab-btn py-2 px-4 font-medium tab-active" data-tab="data-tab">Data Records</button>
|
97 |
+
<button class="tab-btn py-2 px-4 font-medium text-gray-600" data-tab="api-tab">API Integration</button>
|
98 |
+
<button class="tab-btn py-2 px-4 font-medium text-gray-600" data-tab="settings-tab">Settings</button>
|
99 |
+
</div>
|
100 |
+
|
101 |
+
<div id="data-tab" class="tab-content">
|
102 |
+
<div class="mb-4 flex justify-between items-center">
|
103 |
+
<h3 class="text-lg font-semibold">PrivFingaa Data Records</h3>
|
104 |
+
<div class="flex space-x-2">
|
105 |
+
<button class="import-btn bg-green-500 hover:bg-green-600 text-white px-3 py-1 rounded text-sm flex items-center">
|
106 |
+
<i class="fas fa-file-import mr-1"></i> Import
|
107 |
+
</button>
|
108 |
+
<button class="export-btn bg-purple-500 hover:bg-purple-600 text-white px-3 py-1 rounded text-sm flex items-center">
|
109 |
+
<i class="fas fa-file-export mr-1"></i> Export
|
110 |
+
</button>
|
111 |
+
<button class="add-line-btn bg-blue-500 hover:bg-blue-600 text-white px-3 py-1 rounded text-sm flex items-center">
|
112 |
+
<i class="fas fa-plus mr-1"></i> Add Record
|
113 |
+
</button>
|
114 |
+
</div>
|
115 |
+
</div>
|
116 |
+
|
117 |
+
<div class="data-lines space-y-2">
|
118 |
+
<!-- Line items will be added here -->
|
119 |
+
</div>
|
120 |
+
</div>
|
121 |
+
|
122 |
+
<div id="api-tab" class="tab-content hidden">
|
123 |
+
<h3 class="text-lg font-semibold mb-4">PrivFingaa API Integration</h3>
|
124 |
+
<div class="space-y-4">
|
125 |
+
<div>
|
126 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">API Endpoint</label>
|
127 |
+
<input type="text" id="api-endpoint" class="w-full p-2 border rounded" value="https://api.privfingaa.com/v1/data" placeholder="Enter API endpoint">
|
128 |
+
</div>
|
129 |
+
<div>
|
130 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">API Key</label>
|
131 |
+
<div class="flex">
|
132 |
+
<input type="password" id="api-key" class="w-full p-2 border rounded-l" placeholder="Enter your API key">
|
133 |
+
<button id="toggle-key" class="bg-gray-200 px-3 rounded-r border border-l-0">
|
134 |
+
<i class="fas fa-eye"></i>
|
135 |
+
</button>
|
136 |
+
</div>
|
137 |
+
</div>
|
138 |
+
<div class="grid grid-cols-2 gap-4">
|
139 |
+
<button id="test-connection" class="bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded flex items-center justify-center">
|
140 |
+
<i class="fas fa-plug mr-2"></i> Test Connection
|
141 |
+
</button>
|
142 |
+
<button id="sync-data" class="bg-green-500 hover:bg-green-600 text-white py-2 px-4 rounded flex items-center justify-center">
|
143 |
+
<i class="fas fa-sync-alt mr-2"></i> Sync Data
|
144 |
+
</button>
|
145 |
+
</div>
|
146 |
+
<div id="api-response" class="bg-gray-50 p-3 rounded text-sm font-mono h-32 overflow-auto hidden">
|
147 |
+
<div class="text-gray-500">API response will appear here...</div>
|
148 |
+
</div>
|
149 |
+
</div>
|
150 |
+
</div>
|
151 |
+
|
152 |
+
<div id="settings-tab" class="tab-content hidden">
|
153 |
+
<h3 class="text-lg font-semibold mb-4">PrivFingaa Settings</h3>
|
154 |
+
<div class="space-y-4">
|
155 |
+
<div>
|
156 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Data Storage</label>
|
157 |
+
<select id="storage-type" class="w-full p-2 border rounded">
|
158 |
+
<option value="local">Local Storage</option>
|
159 |
+
<option value="indexeddb">IndexedDB</option>
|
160 |
+
<option value="api">PrivFingaa Cloud</option>
|
161 |
+
</select>
|
162 |
+
</div>
|
163 |
+
<div>
|
164 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Auto-save Interval (minutes)</label>
|
165 |
+
<input type="number" id="autosave-interval" class="w-full p-2 border rounded" value="5" min="1" max="60">
|
166 |
+
</div>
|
167 |
+
<div>
|
168 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Data Encryption</label>
|
169 |
+
<div class="flex items-center">
|
170 |
+
<input type="checkbox" id="enable-encryption" class="mr-2" checked>
|
171 |
+
<span>Enable AES-256 encryption</span>
|
172 |
+
</div>
|
173 |
+
</div>
|
174 |
+
<div id="encryption-key-container" class="hidden">
|
175 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Encryption Key</label>
|
176 |
+
<input type="password" id="encryption-key" class="w-full p-2 border rounded" placeholder="Enter encryption key">
|
177 |
+
</div>
|
178 |
+
<button id="save-settings" class="bg-blue-500 hover:bg-blue-600 text-white py-2 px-4 rounded w-full">
|
179 |
+
Save Settings
|
180 |
+
</button>
|
181 |
+
</div>
|
182 |
+
</div>
|
183 |
+
</div>
|
184 |
+
</div>
|
185 |
+
|
186 |
+
<!-- Tools Window -->
|
187 |
+
<div id="tools-window" class="window draggable bg-white rounded-lg overflow-hidden" style="width: 350px; height: 300px; left: 650px; top: 100px;">
|
188 |
+
<div class="window-header bg-green-600 text-white px-4 py-2 flex justify-between items-center">
|
189 |
+
<div class="flex items-center">
|
190 |
+
<i class="fas fa-tools mr-2"></i>
|
191 |
+
<span>PrivFingaa Tools</span>
|
192 |
+
</div>
|
193 |
+
<div class="window-controls">
|
194 |
+
<button class="minimize-btn px-2 hover:bg-green-700 rounded">
|
195 |
+
<i class="fas fa-minus"></i>
|
196 |
+
</button>
|
197 |
+
<button class="close-btn px-2 hover:bg-green-700 rounded ml-1">
|
198 |
+
<i class="fas fa-times"></i>
|
199 |
+
</button>
|
200 |
+
</div>
|
201 |
+
</div>
|
202 |
+
<div class="window-body p-4">
|
203 |
+
<div class="space-y-3">
|
204 |
+
<button id="validate-data" class="w-full bg-blue-100 hover:bg-blue-200 text-blue-800 py-2 px-4 rounded flex items-center justify-between">
|
205 |
+
<span>Validate Data</span>
|
206 |
+
<i class="fas fa-check-circle"></i>
|
207 |
+
</button>
|
208 |
+
<button id="export-json" class="w-full bg-purple-100 hover:bg-purple-200 text-purple-800 py-2 px-4 rounded flex items-center justify-between">
|
209 |
+
<span>Export as JSON</span>
|
210 |
+
<i class="fas fa-file-code"></i>
|
211 |
+
</button>
|
212 |
+
<button id="export-csv" class="w-full bg-green-100 hover:bg-green-200 text-green-800 py-2 px-4 rounded flex items-center justify-between">
|
213 |
+
<span>Export as CSV</span>
|
214 |
+
<i class="fas fa-file-csv"></i>
|
215 |
+
</button>
|
216 |
+
<button id="clear-all" class="w-full bg-red-100 hover:bg-red-200 text-red-800 py-2 px-4 rounded flex items-center justify-between">
|
217 |
+
<span>Clear All Data</span>
|
218 |
+
<i class="fas fa-trash-alt"></i>
|
219 |
+
</button>
|
220 |
+
</div>
|
221 |
+
</div>
|
222 |
+
</div>
|
223 |
+
|
224 |
+
<!-- Preview Window -->
|
225 |
+
<div id="preview-window" class="window draggable bg-white rounded-lg overflow-hidden" style="width: 350px; height: 300px; left: 650px; top: 420px;">
|
226 |
+
<div class="window-header bg-purple-600 text-white px-4 py-2 flex justify-between items-center">
|
227 |
+
<div class="flex items-center">
|
228 |
+
<i class="fas fa-eye mr-2"></i>
|
229 |
+
<span>PrivFingaa Preview</span>
|
230 |
+
</div>
|
231 |
+
<div class="window-controls">
|
232 |
+
<button class="minimize-btn px-2 hover:bg-purple-700 rounded">
|
233 |
+
<i class="fas fa-minus"></i>
|
234 |
+
</button>
|
235 |
+
<button class="close-btn px-2 hover:bg-purple-700 rounded ml-1">
|
236 |
+
<i class="fas fa-times"></i>
|
237 |
+
</button>
|
238 |
+
</div>
|
239 |
+
</div>
|
240 |
+
<div class="window-body p-4 overflow-auto">
|
241 |
+
<div class="tabs flex border-b mb-2">
|
242 |
+
<button class="preview-tab-btn py-1 px-3 text-sm font-medium tab-active" data-preview="table">Table View</button>
|
243 |
+
<button class="preview-tab-btn py-1 px-3 text-sm font-medium text-gray-600" data-preview="json">JSON View</button>
|
244 |
+
</div>
|
245 |
+
<div id="table-preview" class="preview-content">
|
246 |
+
<p class="text-gray-500 text-sm">No data to preview. Add some records in the main window.</p>
|
247 |
+
</div>
|
248 |
+
<div id="json-preview" class="preview-content json-viewer hidden">
|
249 |
+
<p class="text-gray-500 text-sm">No data to preview. Add some records in the main window.</p>
|
250 |
+
</div>
|
251 |
+
</div>
|
252 |
+
</div>
|
253 |
+
</div>
|
254 |
+
</div>
|
255 |
+
|
256 |
+
<script>
|
257 |
+
document.addEventListener('DOMContentLoaded', function() {
|
258 |
+
// Window dragging functionality
|
259 |
+
const windows = document.querySelectorAll('.window');
|
260 |
+
windows.forEach(window => {
|
261 |
+
const header = window.querySelector('.window-header');
|
262 |
+
let isDragging = false;
|
263 |
+
let offsetX, offsetY;
|
264 |
+
|
265 |
+
header.addEventListener('mousedown', (e) => {
|
266 |
+
isDragging = true;
|
267 |
+
offsetX = e.clientX - window.getBoundingClientRect().left;
|
268 |
+
offsetY = e.clientY - window.getBoundingClientRect().top;
|
269 |
+
window.style.zIndex = 1000;
|
270 |
+
});
|
271 |
+
|
272 |
+
document.addEventListener('mousemove', (e) => {
|
273 |
+
if (!isDragging) return;
|
274 |
+
window.style.left = (e.clientX - offsetX) + 'px';
|
275 |
+
window.style.top = (e.clientY - offsetY) + 'px';
|
276 |
+
});
|
277 |
+
|
278 |
+
document.addEventListener('mouseup', () => {
|
279 |
+
isDragging = false;
|
280 |
+
});
|
281 |
+
});
|
282 |
+
|
283 |
+
// Window controls
|
284 |
+
document.querySelectorAll('.minimize-btn').forEach(btn => {
|
285 |
+
btn.addEventListener('click', function() {
|
286 |
+
const window = this.closest('.window');
|
287 |
+
window.classList.toggle('minimized');
|
288 |
+
const icon = this.querySelector('i');
|
289 |
+
if (window.classList.contains('minimized')) {
|
290 |
+
icon.classList.replace('fa-minus', 'fa-plus');
|
291 |
+
} else {
|
292 |
+
icon.classList.replace('fa-plus', 'fa-minus');
|
293 |
+
}
|
294 |
+
});
|
295 |
+
});
|
296 |
+
|
297 |
+
document.querySelectorAll('.close-btn').forEach(btn => {
|
298 |
+
btn.addEventListener('click', function() {
|
299 |
+
const window = this.closest('.window');
|
300 |
+
window.style.display = 'none';
|
301 |
+
});
|
302 |
+
});
|
303 |
+
|
304 |
+
// Tab functionality
|
305 |
+
document.querySelectorAll('.tab-btn').forEach(tab => {
|
306 |
+
tab.addEventListener('click', function() {
|
307 |
+
// Remove active class from all tabs
|
308 |
+
document.querySelectorAll('.tab-btn').forEach(t => {
|
309 |
+
t.classList.remove('tab-active');
|
310 |
+
t.classList.add('text-gray-600');
|
311 |
+
});
|
312 |
+
|
313 |
+
// Add active class to clicked tab
|
314 |
+
this.classList.add('tab-active');
|
315 |
+
this.classList.remove('text-gray-600');
|
316 |
+
|
317 |
+
// Hide all tab contents
|
318 |
+
document.querySelectorAll('.tab-content').forEach(content => {
|
319 |
+
content.classList.add('hidden');
|
320 |
+
});
|
321 |
+
|
322 |
+
// Show selected tab content
|
323 |
+
const tabId = this.getAttribute('data-tab');
|
324 |
+
document.getElementById(tabId).classList.remove('hidden');
|
325 |
+
});
|
326 |
+
});
|
327 |
+
|
328 |
+
// Preview tab functionality
|
329 |
+
document.querySelectorAll('.preview-tab-btn').forEach(tab => {
|
330 |
+
tab.addEventListener('click', function() {
|
331 |
+
// Remove active class from all preview tabs
|
332 |
+
document.querySelectorAll('.preview-tab-btn').forEach(t => {
|
333 |
+
t.classList.remove('tab-active');
|
334 |
+
t.classList.add('text-gray-600');
|
335 |
+
});
|
336 |
+
|
337 |
+
// Add active class to clicked tab
|
338 |
+
this.classList.add('tab-active');
|
339 |
+
this.classList.remove('text-gray-600');
|
340 |
+
|
341 |
+
// Hide all preview contents
|
342 |
+
document.querySelectorAll('.preview-content').forEach(content => {
|
343 |
+
content.classList.add('hidden');
|
344 |
+
});
|
345 |
+
|
346 |
+
// Show selected preview content
|
347 |
+
const previewType = this.getAttribute('data-preview');
|
348 |
+
document.getElementById(`${previewType}-preview`).classList.remove('hidden');
|
349 |
+
});
|
350 |
+
});
|
351 |
+
|
352 |
+
// Add line functionality
|
353 |
+
const addLineBtn = document.querySelector('.add-line-btn');
|
354 |
+
const dataLinesContainer = document.querySelector('.data-lines');
|
355 |
+
let lineCounter = 1;
|
356 |
+
|
357 |
+
addLineBtn.addEventListener('click', function() {
|
358 |
+
const lineId = `line-${lineCounter++}`;
|
359 |
+
const lineHtml = `
|
360 |
+
<div class="input-line bg-white border rounded p-3 flex items-center" id="${lineId}">
|
361 |
+
<div class="flex-grow grid grid-cols-3 gap-2">
|
362 |
+
<input type="text" class="p-2 border rounded focus:ring-2 focus:ring-blue-300 focus:border-blue-500" placeholder="ID" data-field="id">
|
363 |
+
<input type="text" class="p-2 border rounded focus:ring-2 focus:ring-blue-300 focus:border-blue-500" placeholder="Name" data-field="name">
|
364 |
+
<input type="text" class="p-2 border rounded focus:ring-2 focus:ring-blue-300 focus:border-blue-500" placeholder="Value" data-field="value">
|
365 |
+
</div>
|
366 |
+
<button class="delete-line-btn ml-3 text-red-500 hover:text-red-700 p-2" data-line="${lineId}">
|
367 |
+
<i class="fas fa-trash-alt"></i>
|
368 |
+
</button>
|
369 |
+
</div>
|
370 |
+
`;
|
371 |
+
dataLinesContainer.insertAdjacentHTML('beforeend', lineHtml);
|
372 |
+
|
373 |
+
// Update preview
|
374 |
+
updatePreview();
|
375 |
+
});
|
376 |
+
|
377 |
+
// Delete line functionality (using event delegation)
|
378 |
+
dataLinesContainer.addEventListener('click', function(e) {
|
379 |
+
if (e.target.closest('.delete-line-btn')) {
|
380 |
+
const btn = e.target.closest('.delete-line-btn');
|
381 |
+
const lineId = btn.getAttribute('data-line');
|
382 |
+
document.getElementById(lineId).remove();
|
383 |
+
|
384 |
+
// Update preview
|
385 |
+
updatePreview();
|
386 |
+
}
|
387 |
+
});
|
388 |
+
|
389 |
+
// Update preview function
|
390 |
+
function updatePreview() {
|
391 |
+
const tablePreview = document.getElementById('table-preview');
|
392 |
+
const jsonPreview = document.getElementById('json-preview');
|
393 |
+
const lines = document.querySelectorAll('.input-line');
|
394 |
+
|
395 |
+
if (lines.length === 0) {
|
396 |
+
tablePreview.innerHTML = '<p class="text-gray-500 text-sm">No data to preview. Add some records in the main window.</p>';
|
397 |
+
jsonPreview.innerHTML = '<p class="text-gray-500 text-sm">No data to preview. Add some records in the main window.</p>';
|
398 |
+
return;
|
399 |
+
}
|
400 |
+
|
401 |
+
// Table view
|
402 |
+
let tableHtml = `
|
403 |
+
<div class="overflow-x-auto">
|
404 |
+
<table class="min-w-full divide-y divide-gray-200 text-sm">
|
405 |
+
<thead class="bg-gray-50">
|
406 |
+
<tr>
|
407 |
+
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">ID</th>
|
408 |
+
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Name</th>
|
409 |
+
<th class="px-4 py-2 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Value</th>
|
410 |
+
</tr>
|
411 |
+
</thead>
|
412 |
+
<tbody class="bg-white divide-y divide-gray-200">
|
413 |
+
`;
|
414 |
+
|
415 |
+
// JSON data collection
|
416 |
+
let jsonData = [];
|
417 |
+
|
418 |
+
lines.forEach(line => {
|
419 |
+
const inputs = line.querySelectorAll('input');
|
420 |
+
const id = inputs[0].value || 'empty';
|
421 |
+
const name = inputs[1].value || 'empty';
|
422 |
+
const value = inputs[2].value || 'empty';
|
423 |
+
|
424 |
+
// Add to table view
|
425 |
+
tableHtml += `
|
426 |
+
<tr>
|
427 |
+
<td class="px-4 py-2 whitespace-nowrap">${id}</td>
|
428 |
+
<td class="px-4 py-2 whitespace-nowrap">${name}</td>
|
429 |
+
<td class="px-4 py-2 whitespace-nowrap">${value}</td>
|
430 |
+
</tr>
|
431 |
+
`;
|
432 |
+
|
433 |
+
// Add to JSON data
|
434 |
+
jsonData.push({
|
435 |
+
id: id,
|
436 |
+
name: name,
|
437 |
+
value: value
|
438 |
+
});
|
439 |
+
});
|
440 |
+
|
441 |
+
tableHtml += `
|
442 |
+
</tbody>
|
443 |
+
</table>
|
444 |
+
</div>
|
445 |
+
`;
|
446 |
+
|
447 |
+
tablePreview.innerHTML = tableHtml;
|
448 |
+
jsonPreview.textContent = JSON.stringify(jsonData, null, 2);
|
449 |
+
}
|
450 |
+
|
451 |
+
// Update preview when inputs change (using event delegation)
|
452 |
+
dataLinesContainer.addEventListener('input', function(e) {
|
453 |
+
if (e.target.tagName === 'INPUT') {
|
454 |
+
updatePreview();
|
455 |
+
}
|
456 |
+
});
|
457 |
+
|
458 |
+
// API Key visibility toggle
|
459 |
+
document.getElementById('toggle-key').addEventListener('click', function() {
|
460 |
+
const keyInput = document.getElementById('api-key');
|
461 |
+
const icon = this.querySelector('i');
|
462 |
+
if (keyInput.type === 'password') {
|
463 |
+
keyInput.type = 'text';
|
464 |
+
icon.classList.replace('fa-eye', 'fa-eye-slash');
|
465 |
+
} else {
|
466 |
+
keyInput.type = 'password';
|
467 |
+
icon.classList.replace('fa-eye-slash', 'fa-eye');
|
468 |
+
}
|
469 |
+
});
|
470 |
+
|
471 |
+
// Test API connection
|
472 |
+
document.getElementById('test-connection').addEventListener('click', function() {
|
473 |
+
const endpoint = document.getElementById('api-endpoint').value;
|
474 |
+
const apiKey = document.getElementById('api-key').value;
|
475 |
+
const responseContainer = document.getElementById('api-response');
|
476 |
+
|
477 |
+
responseContainer.classList.remove('hidden');
|
478 |
+
responseContainer.innerHTML = '<div class="text-blue-500">Testing connection to PrivFingaa API...</div>';
|
479 |
+
|
480 |
+
// Simulate API connection test
|
481 |
+
setTimeout(() => {
|
482 |
+
if (endpoint && apiKey) {
|
483 |
+
responseContainer.innerHTML = `
|
484 |
+
<div class="text-green-500">β Successfully connected to PrivFingaa API</div>
|
485 |
+
<div class="text-gray-500 mt-2">Endpoint: ${endpoint}</div>
|
486 |
+
<div class="text-gray-500">API Key: ${'*'.repeat(apiKey.length)}</div>
|
487 |
+
`;
|
488 |
+
} else {
|
489 |
+
responseContainer.innerHTML = '<div class="text-red-500">β Connection failed. Please check your endpoint and API key.</div>';
|
490 |
+
}
|
491 |
+
}, 1500);
|
492 |
+
});
|
493 |
+
|
494 |
+
// Sync data with API
|
495 |
+
document.getElementById('sync-data').addEventListener('click', function() {
|
496 |
+
const responseContainer = document.getElementById('api-response');
|
497 |
+
responseContainer.classList.remove('hidden');
|
498 |
+
responseContainer.innerHTML = '<div class="text-blue-500">Syncing data with PrivFingaa API...</div>';
|
499 |
+
|
500 |
+
// Simulate data sync
|
501 |
+
setTimeout(() => {
|
502 |
+
responseContainer.innerHTML = `
|
503 |
+
<div class="text-green-500">β Data sync completed successfully</div>
|
504 |
+
<div class="text-gray-500 mt-2">Last sync: ${new Date().toLocaleString()}</div>
|
505 |
+
`;
|
506 |
+
}, 2000);
|
507 |
+
});
|
508 |
+
|
509 |
+
// Export as JSON
|
510 |
+
document.getElementById('export-json').addEventListener('click', function() {
|
511 |
+
const lines = document.querySelectorAll('.input-line');
|
512 |
+
if (lines.length === 0) {
|
513 |
+
alert('No data to export');
|
514 |
+
return;
|
515 |
+
}
|
516 |
+
|
517 |
+
let jsonData = [];
|
518 |
+
lines.forEach(line => {
|
519 |
+
const inputs = line.querySelectorAll('input');
|
520 |
+
jsonData.push({
|
521 |
+
id: inputs[0].value || '',
|
522 |
+
name: inputs[1].value || '',
|
523 |
+
value: inputs[2].value || ''
|
524 |
+
});
|
525 |
+
});
|
526 |
+
|
527 |
+
const blob = new Blob([JSON.stringify(jsonData, null, 2)], { type: 'application/json' });
|
528 |
+
const url = URL.createObjectURL(blob);
|
529 |
+
const a = document.createElement('a');
|
530 |
+
a.href = url;
|
531 |
+
a.download = 'privfingaa-data.json';
|
532 |
+
document.body.appendChild(a);
|
533 |
+
a.click();
|
534 |
+
document.body.removeChild(a);
|
535 |
+
URL.revokeObjectURL(url);
|
536 |
+
});
|
537 |
+
|
538 |
+
// Export as CSV
|
539 |
+
document.getElementById('export-csv').addEventListener('click', function() {
|
540 |
+
const lines = document.querySelectorAll('.input-line');
|
541 |
+
if (lines.length === 0) {
|
542 |
+
alert('No data to export');
|
543 |
+
return;
|
544 |
+
}
|
545 |
+
|
546 |
+
let csvContent = "ID,Name,Value\n";
|
547 |
+
lines.forEach(line => {
|
548 |
+
const inputs = line.querySelectorAll('input');
|
549 |
+
csvContent += `"${inputs[0].value || ''}","${inputs[1].value || ''}","${inputs[2].value || ''}"\n`;
|
550 |
+
});
|
551 |
+
|
552 |
+
const blob = new Blob([csvContent], { type: 'text/csv' });
|
553 |
+
const url = URL.createObjectURL(blob);
|
554 |
+
const a = document.createElement('a');
|
555 |
+
a.href = url;
|
556 |
+
a.download = 'privfingaa-data.csv';
|
557 |
+
document.body.appendChild(a);
|
558 |
+
a.click();
|
559 |
+
document.body.removeChild(a);
|
560 |
+
URL.revokeObjectURL(url);
|
561 |
+
});
|
562 |
+
|
563 |
+
// Clear all data
|
564 |
+
document.getElementById('clear-all').addEventListener('click', function() {
|
565 |
+
if (confirm('Are you sure you want to clear all data?')) {
|
566 |
+
document.querySelector('.data-lines').innerHTML = '';
|
567 |
+
updatePreview();
|
568 |
+
}
|
569 |
+
});
|
570 |
+
|
571 |
+
// Validate data
|
572 |
+
document.getElementById('validate-data').addEventListener('click', function() {
|
573 |
+
const lines = document.querySelectorAll('.input-line');
|
574 |
+
let valid = true;
|
575 |
+
|
576 |
+
lines.forEach(line => {
|
577 |
+
const inputs = line.querySelectorAll('input');
|
578 |
+
if (!inputs[0].value || !inputs[1].value || !inputs[2].value) {
|
579 |
+
line.style.backgroundColor = 'rgba(239, 68, 68, 0.1)';
|
580 |
+
valid = false;
|
581 |
+
} else {
|
582 |
+
line.style.backgroundColor = 'rgba(16, 185, 129, 0.1)';
|
583 |
+
}
|
584 |
+
});
|
585 |
+
|
586 |
+
if (lines.length === 0) {
|
587 |
+
alert('No data to validate');
|
588 |
+
} else if (valid) {
|
589 |
+
alert('All records are valid!');
|
590 |
+
} else {
|
591 |
+
alert('Some records are incomplete. Invalid records are highlighted in red.');
|
592 |
+
}
|
593 |
+
});
|
594 |
+
|
595 |
+
// Encryption settings toggle
|
596 |
+
document.getElementById('enable-encryption').addEventListener('change', function() {
|
597 |
+
const container = document.getElementById('encryption-key-container');
|
598 |
+
if (this.checked) {
|
599 |
+
container.classList.remove('hidden');
|
600 |
+
} else {
|
601 |
+
container.classList.add('hidden');
|
602 |
+
}
|
603 |
+
});
|
604 |
+
|
605 |
+
// Save settings
|
606 |
+
document.getElementById('save-settings').addEventListener('click', function() {
|
607 |
+
alert('Settings saved successfully!');
|
608 |
+
});
|
609 |
+
|
610 |
+
// Refresh button
|
611 |
+
document.getElementById('refresh-btn').addEventListener('click', function() {
|
612 |
+
const statusIndicator = document.getElementById('connection-status');
|
613 |
+
const statusText = document.getElementById('connection-text');
|
614 |
+
|
615 |
+
statusText.textContent = 'Refreshing connection...';
|
616 |
+
|
617 |
+
// Simulate connection refresh
|
618 |
+
setTimeout(() => {
|
619 |
+
statusIndicator.className = 'status-indicator status-connected';
|
620 |
+
statusText.textContent = 'Connected to PrivFingaa API';
|
621 |
+
}, 1000);
|
622 |
+
});
|
623 |
+
|
624 |
+
// Add some sample data on load
|
625 |
+
setTimeout(() => {
|
626 |
+
addLineBtn.click();
|
627 |
+
addLineBtn.click();
|
628 |
+
addLineBtn.click();
|
629 |
+
|
630 |
+
// Fill sample data
|
631 |
+
const inputs = document.querySelectorAll('.input-line input');
|
632 |
+
if (inputs.length >= 3) {
|
633 |
+
inputs[0].value = 'user_001';
|
634 |
+
inputs[1].value = 'John Doe';
|
635 |
+
inputs[2].value = 'admin';
|
636 |
+
|
637 |
+
inputs[3].value = 'user_002';
|
638 |
+
inputs[4].value = 'Jane Smith';
|
639 |
+
inputs[5].value = 'editor';
|
640 |
+
|
641 |
+
inputs[6].value = 'user_003';
|
642 |
+
inputs[7].value = 'Bob Johnson';
|
643 |
+
inputs[8].value = 'viewer';
|
644 |
+
|
645 |
+
updatePreview();
|
646 |
+
}
|
647 |
+
}, 300);
|
648 |
+
});
|
649 |
+
</script>
|
650 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 𧬠<a href="https://enzostvs-deepsite.hf.space?remix=privateuserh/privfingaa-data-vbeta1-01" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
651 |
+
</html>
|
prompts.txt
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
Make this interoperable with privateuserh/privfingaa and provide all necessary labels
|