-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathresultWindow.html
87 lines (77 loc) · 4.25 KB
/
resultWindow.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<!DOCTYPE html>
<html lang="en" style="background-color: #222831;"></html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Result Window</title>
<link rel="stylesheet" href="resultWindow.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.8.0/styles/github-dark.min.css">
</head>
<body>
<div id="resultWindow">
<header>
<h2>LMenu</h2>
<div id="headerButtons">
<button id="settingsButton" aria-label="Open settings">
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000000">
<path
d="m370-80-16-128q-13-5-24.5-12T307-235l-119 50L78-375l103-78q-1-7-1-13.5v-27q0-6.5 1-13.5L78-585l110-190 119 50q11-8 23-15t24-12l16-128h220l16 128q13 5 24.5 12t22.5 15l119-50 110 190-103 78q1 7 1 13.5v27q0 6.5-2 13.5l103 78-110 190-118-50q-11 8-23 15t-24 12L590-80H370Zm70-80h79l14-106q31-8 57.5-23.5T639-327l99 41 39-68-86-65q5-14 7-29.5t2-31.5q0-16-2-31.5t-7-29.5l86-65-39-68-99 42q-22-23-48.5-38.5T533-694l-13-106h-79l-14 106q-31 8-57.5 23.5T321-633l-99-41-39 68 86 64q-5 15-7 30t-2 32q0 16 2 31t7 30l-86 65 39 68 99-42q22 23 48.5 38.5T427-266l13 106Zm42-180q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Zm-2-140Z" />
</svg>
</button>
<button id="closeButton" aria-label="Close">×</button>
</div>
</header>
<!-- Selectors -->
<div id="selectors">
<select id="promptSelector" aria-label="Select prompt"></select>
<select id="promptLanguageSelector" aria-label="Select language"></select>
</div>
<!-- Result -->
<div id="chatContainer">
<div id="chatMessages"></div> <!-- Container for chat messages -->
</div>
<!-- Buttons -->
<div id="buttons">
<button id="resendButton" aria-label="Resend request">
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000000">
<path
d="M480-160q-134 0-227-93t-93-227q0-134 93-227t227-93q69 0 132 28.5T720-690v-110h80v280H520v-80h168q-32-56-87.5-88T480-720q-100 0-170 70t-70 170q0 100 70 170t170 70q77 0 139-44t87-116h84q-28 106-114 173t-196 67Z">
</path>
</svg>
</button>
<button id="copyButton" aria-label="Copy text">
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#000000">
<path
d="M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z">
</path>
</svg>
</button>
</div>
<!-- Input field and send button -->
<div id="chatInputContainer">
<input type="text" id="chatInput" placeholder="Enter message..." aria-label="Enter message" />
<button id="sendButton" aria-label="Send message">Send</button>
</div>
</div>
<script>
if (window.location.hostname === '127.0.0.1') {
const promptSelector = document.getElementById('promptSelector');
const promptLanguageSelector = document.getElementById('promptLanguageSelector');
const chatMessages = document.getElementById('chatMessages');
promptSelector.innerHTML = `
<option value="1">Test request 1</option>
<option value="2">Test request 2</option>
<option value="3">Test request 3</option>
`;
promptLanguageSelector.innerHTML = `
<option value="ru">Russian</option>
<option value="en">English</option>
`;
chatMessages.innerHTML = `
<div class="userMessage">This is a user message.</div>
<div class="gptResponse">This is a GPT response.</div>
`;
}
</script>
</body>
</html>