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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="ko">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
6 |
+
<title>LoveCall Pro</title>
|
7 |
+
<link rel="manifest" href="manifest.json">
|
8 |
+
<meta name="theme-color" content="#ff4757">
|
9 |
+
<style>
|
10 |
+
:root {
|
11 |
+
--primary: #ff4757;
|
12 |
+
--accent: #2ed573;
|
13 |
+
--dark: #2f3542;
|
14 |
+
--light: #f1f2f6;
|
15 |
+
}
|
16 |
+
|
17 |
+
* {
|
18 |
+
margin: 0;
|
19 |
+
padding: 0;
|
20 |
+
box-sizing: border-box;
|
21 |
+
-webkit-tap-highlight-color: transparent;
|
22 |
+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
23 |
+
}
|
24 |
+
|
25 |
+
body {
|
26 |
+
background: var(--light);
|
27 |
+
height: 100vh;
|
28 |
+
overflow-x: hidden;
|
29 |
+
}
|
30 |
+
|
31 |
+
.app-container {
|
32 |
+
max-width: 100%;
|
33 |
+
margin: 0 auto;
|
34 |
+
background: white;
|
35 |
+
min-height: 100vh;
|
36 |
+
position: relative;
|
37 |
+
}
|
38 |
+
|
39 |
+
.header {
|
40 |
+
background: var(--primary);
|
41 |
+
padding: 20px;
|
42 |
+
color: white;
|
43 |
+
text-align: center;
|
44 |
+
position: sticky;
|
45 |
+
top: 0;
|
46 |
+
z-index: 100;
|
47 |
+
}
|
48 |
+
|
49 |
+
.status-bar {
|
50 |
+
background: rgba(255,255,255,0.2);
|
51 |
+
padding: 8px;
|
52 |
+
border-radius: 20px;
|
53 |
+
margin-top: 10px;
|
54 |
+
font-size: 0.9em;
|
55 |
+
}
|
56 |
+
|
57 |
+
.main-section {
|
58 |
+
padding: 20px;
|
59 |
+
}
|
60 |
+
|
61 |
+
.contact-card {
|
62 |
+
background: white;
|
63 |
+
border-radius: 15px;
|
64 |
+
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
|
65 |
+
padding: 20px;
|
66 |
+
margin-bottom: 20px;
|
67 |
+
position: relative;
|
68 |
+
}
|
69 |
+
|
70 |
+
.contact-header {
|
71 |
+
display: flex;
|
72 |
+
align-items: center;
|
73 |
+
gap: 15px;
|
74 |
+
}
|
75 |
+
|
76 |
+
.contact-avatar {
|
77 |
+
width: 60px;
|
78 |
+
height: 60px;
|
79 |
+
background: var(--primary);
|
80 |
+
border-radius: 50%;
|
81 |
+
display: flex;
|
82 |
+
align-items: center;
|
83 |
+
justify-content: center;
|
84 |
+
font-size: 24px;
|
85 |
+
color: white;
|
86 |
+
}
|
87 |
+
|
88 |
+
.emergency-trigger {
|
89 |
+
width: 200px;
|
90 |
+
height: 200px;
|
91 |
+
margin: 30px auto;
|
92 |
+
position: relative;
|
93 |
+
}
|
94 |
+
|
95 |
+
.trigger-outer {
|
96 |
+
width: 100%;
|
97 |
+
height: 100%;
|
98 |
+
background: var(--primary);
|
99 |
+
border-radius: 50%;
|
100 |
+
display: flex;
|
101 |
+
align-items: center;
|
102 |
+
justify-content: center;
|
103 |
+
animation: pulse 2s infinite;
|
104 |
+
}
|
105 |
+
|
106 |
+
.trigger-inner {
|
107 |
+
width: 90%;
|
108 |
+
height: 90%;
|
109 |
+
background: white;
|
110 |
+
border-radius: 50%;
|
111 |
+
display: flex;
|
112 |
+
align-items: center;
|
113 |
+
justify-content: center;
|
114 |
+
flex-direction: column;
|
115 |
+
}
|
116 |
+
|
117 |
+
.setup-section {
|
118 |
+
padding: 20px;
|
119 |
+
background: var(--light);
|
120 |
+
border-radius: 15px;
|
121 |
+
margin-top: 20px;
|
122 |
+
}
|
123 |
+
|
124 |
+
.setup-step {
|
125 |
+
margin-bottom: 15px;
|
126 |
+
padding: 15px;
|
127 |
+
background: white;
|
128 |
+
border-radius: 10px;
|
129 |
+
box-shadow: 0 2px 8px rgba(0,0,0,0.05);
|
130 |
+
}
|
131 |
+
|
132 |
+
.button {
|
133 |
+
padding: 15px 30px;
|
134 |
+
border: none;
|
135 |
+
border-radius: 25px;
|
136 |
+
background: var(--primary);
|
137 |
+
color: white;
|
138 |
+
font-size: 16px;
|
139 |
+
font-weight: bold;
|
140 |
+
cursor: pointer;
|
141 |
+
transition: transform 0.2s;
|
142 |
+
width: 100%;
|
143 |
+
margin-top: 10px;
|
144 |
+
}
|
145 |
+
|
146 |
+
.button:active {
|
147 |
+
transform: scale(0.98);
|
148 |
+
}
|
149 |
+
|
150 |
+
.permission-alert {
|
151 |
+
background: #fff3cd;
|
152 |
+
border: 1px solid #ffeeba;
|
153 |
+
color: #856404;
|
154 |
+
padding: 15px;
|
155 |
+
border-radius: 10px;
|
156 |
+
margin: 20px 0;
|
157 |
+
}
|
158 |
+
|
159 |
+
.status-indicator {
|
160 |
+
display: inline-block;
|
161 |
+
width: 12px;
|
162 |
+
height: 12px;
|
163 |
+
border-radius: 50%;
|
164 |
+
margin-right: 8px;
|
165 |
+
}
|
166 |
+
|
167 |
+
.status-active {
|
168 |
+
background: var(--accent);
|
169 |
+
box-shadow: 0 0 0 rgba(46, 213, 115, 0.4);
|
170 |
+
animation: pulse-green 2s infinite;
|
171 |
+
}
|
172 |
+
|
173 |
+
@keyframes pulse {
|
174 |
+
0% {
|
175 |
+
box-shadow: 0 0 0 0 rgba(255, 71, 87, 0.4);
|
176 |
+
}
|
177 |
+
70% {
|
178 |
+
box-shadow: 0 0 0 20px rgba(255, 71, 87, 0);
|
179 |
+
}
|
180 |
+
100% {
|
181 |
+
box-shadow: 0 0 0 0 rgba(255, 71, 87, 0);
|
182 |
+
}
|
183 |
+
}
|
184 |
+
|
185 |
+
@keyframes pulse-green {
|
186 |
+
0% {
|
187 |
+
box-shadow: 0 0 0 0 rgba(46, 213, 115, 0.4);
|
188 |
+
}
|
189 |
+
70% {
|
190 |
+
box-shadow: 0 0 0 10px rgba(46, 213, 115, 0);
|
191 |
+
}
|
192 |
+
100% {
|
193 |
+
box-shadow: 0 0 0 0 rgba(46, 213, 115, 0);
|
194 |
+
}
|
195 |
+
}
|
196 |
+
|
197 |
+
#volumeIndicator {
|
198 |
+
position: fixed;
|
199 |
+
top: 50%;
|
200 |
+
left: 50%;
|
201 |
+
transform: translate(-50%, -50%);
|
202 |
+
background: rgba(0,0,0,0.8);
|
203 |
+
color: white;
|
204 |
+
padding: 20px;
|
205 |
+
border-radius: 10px;
|
206 |
+
display: none;
|
207 |
+
z-index: 1000;
|
208 |
+
}
|
209 |
+
|
210 |
+
.subscription-info {
|
211 |
+
margin-top: 20px;
|
212 |
+
padding: 15px;
|
213 |
+
background: #e8f5e9;
|
214 |
+
border-radius: 10px;
|
215 |
+
font-size: 0.9em;
|
216 |
+
color: #2e7d32;
|
217 |
+
}
|
218 |
+
</style>
|
219 |
+
</head>
|
220 |
+
<body>
|
221 |
+
<div class="app-container">
|
222 |
+
<div class="header">
|
223 |
+
<h1>LoveCall Pro</h1>
|
224 |
+
<div class="status-bar">
|
225 |
+
<span class="status-indicator status-active"></span>
|
226 |
+
๊ธด๊ธ ํตํ ์๋น์ค ํ์ฑํ๋จ
|
227 |
+
</div>
|
228 |
+
</div>
|
229 |
+
|
230 |
+
<div class="main-section">
|
231 |
+
<div class="contact-card">
|
232 |
+
<div class="contact-header">
|
233 |
+
<div class="contact-avatar">โค๏ธ</div>
|
234 |
+
<div>
|
235 |
+
<h2 id="emergencyContact">๊ธด๊ธ ์ฐ๋ฝ์ฒ</h2>
|
236 |
+
<p id="contactPhone">์ฐ๋ฝ์ฒ๋ฅผ ๋ฑ๋กํด์ฃผ์ธ์</p>
|
237 |
+
</div>
|
238 |
+
</div>
|
239 |
+
</div>
|
240 |
+
|
241 |
+
<div class="emergency-trigger">
|
242 |
+
<div class="trigger-outer">
|
243 |
+
<div class="trigger-inner">
|
244 |
+
<span style="font-size: 36px">SOS</span>
|
245 |
+
<span style="font-size: 14px; margin-top: 8px">๊ธด๊ธ ํธ์ถ ์ค๋น๋จ</span>
|
246 |
+
</div>
|
247 |
+
</div>
|
248 |
+
</div>
|
249 |
+
|
250 |
+
<div class="permission-alert">
|
251 |
+
<strong>๊ถํ ํ์</strong>
|
252 |
+
<p>๊ธด๊ธ ํตํ ๊ธฐ๋ฅ์ ์ฌ์ฉํ๊ธฐ ์ํด ์ ํ ๊ถํ์ด ํ์ํฉ๋๋ค.</p>
|
253 |
+
<button class="button" onclick="requestPermissions()">๊ถํ ํ์ฉํ๊ธฐ</button>
|
254 |
+
</div>
|
255 |
+
|
256 |
+
<div class="setup-section">
|
257 |
+
<h3>์ค์ ๋ฐฉ๋ฒ</h3>
|
258 |
+
<div class="setup-step">
|
259 |
+
<h4>1. ๊ธด๊ธ ์ฐ๋ฝ์ฒ ๋ฑ๋ก</h4>
|
260 |
+
<button class="button" onclick="registerContact()">์ฐ๋ฝ์ฒ ๋ฑ๋กํ๊ธฐ</button>
|
261 |
+
</div>
|
262 |
+
<div class="setup-step">
|
263 |
+
<h4>2. ๋ณผ๋ฅจ ๋ฒํผ ํ
์คํธ</h4>
|
264 |
+
<button class="button" onclick="testVolumeButton()">ํ
์คํธ ์์</button>
|
265 |
+
</div>
|
266 |
+
</div>
|
267 |
+
|
268 |
+
<div class="subscription-info">
|
269 |
+
ํ๋ฆฌ๋ฏธ์ ์๋น์ค ์ด์ฉ์ค (์ 5,000์)
|
270 |
+
<br>๋ค์ ๊ฒฐ์ ์ผ: 2024๋
2์ 1์ผ
|
271 |
+
</div>
|
272 |
+
</div>
|
273 |
+
</div>
|
274 |
+
|
275 |
+
<div id="volumeIndicator">
|
276 |
+
๋ณผ๋ฅจ ๋ฒํผ ๊ฐ์ง์ค... <span id="countdown">5</span>์ด
|
277 |
+
</div>
|
278 |
+
|
279 |
+
<script>
|
280 |
+
let volumeButtonPressed = false;
|
281 |
+
let pressTimer = null;
|
282 |
+
let countdownInterval = null;
|
283 |
+
|
284 |
+
// ๊ถํ ์์ฒญ
|
285 |
+
async function requestPermissions() {
|
286 |
+
try {
|
287 |
+
if ('permissions' in navigator) {
|
288 |
+
const result = await navigator.permissions.query({ name: 'microphone' });
|
289 |
+
if (result.state === 'granted') {
|
290 |
+
alert('๊ถํ์ด ํ์ฉ๋์์ต๋๋ค.');
|
291 |
+
} else {
|
292 |
+
const permission = await navigator.mediaDevices.getUserMedia({ audio: true });
|
293 |
+
alert('๊ถํ์ด ํ์ฉ๋์์ต๋๋ค.');
|
294 |
+
}
|
295 |
+
}
|
296 |
+
} catch (error) {
|
297 |
+
alert('๊ถํ ์์ฒญ ์ค ์ค๋ฅ๊ฐ ๋ฐ์ํ์ต๋๋ค. ์ค์ ์์ ์ง์ ํ์ฉํด์ฃผ์ธ์.');
|
298 |
+
}
|
299 |
+
}
|
300 |
+
|
301 |
+
// ์ฐ๋ฝ์ฒ ๋ฑ๋ก
|
302 |
+
function registerContact() {
|
303 |
+
const name = prompt('๊ธด๊ธ ์ฐ๋ฝ์ฒ ์ด๋ฆ์ ์
๋ ฅํ์ธ์:');
|
304 |
+
const phone = prompt('์ ํ๋ฒํธ๋ฅผ ์
๋ ฅํ์ธ์ (- ์์ด):');
|
305 |
+
|
306 |
+
if (name && phone) {
|
307 |
+
document.getElementById('emergencyContact').textContent = name;
|
308 |
+
document.getElementById('contactPhone').textContent = phone;
|
309 |
+
localStorage.setItem('emergencyContact', JSON.stringify({ name, phone }));
|
310 |
+
alert('๊ธด๊ธ ์ฐ๋ฝ์ฒ๊ฐ ๋ฑ๋ก๋์์ต๋๋ค.');
|
311 |
+
}
|
312 |
+
}
|
313 |
+
|
314 |
+
// ๋ณผ๋ฅจ ๋ฒํผ ํ
์คํธ
|
315 |
+
function testVolumeButton() {
|
316 |
+
const indicator = document.getElementById('volumeIndicator');
|
317 |
+
const countdown = document.getElementById('countdown');
|
318 |
+
let seconds = 5;
|
319 |
+
|
320 |
+
indicator.style.display = 'block';
|
321 |
+
|
322 |
+
countdownInterval = setInterval(() => {
|
323 |
+
seconds--;
|
324 |
+
countdown.textContent = seconds;
|
325 |
+
|
326 |
+
if (seconds <= 0) {
|
327 |
+
clearInterval(countdownInterval);
|
328 |
+
indicator.style.display = 'none';
|
329 |
+
alert('ํ
์คํธ๊ฐ ์๋ฃ๋์์ต๋๋ค.');
|
330 |
+
}
|
331 |
+
}, 1000);
|
332 |
+
}
|
333 |
+
|
334 |
+
// ๋ณผ๋ฅจ ๋ฒํผ ์ด๋ฒคํธ ์ฒ๋ฆฌ
|
335 |
+
document.addEventListener('keydown', (e) => {
|
336 |
+
if (e.key === 'VolumeUp') {
|
337 |
+
if (!volumeButtonPressed) {
|
338 |
+
volumeButtonPressed = true;
|
339 |
+
pressTimer = setTimeout(() => {
|
340 |
+
const contact = JSON.parse(localStorage.getItem('emergencyContact'));
|
341 |
+
if (contact) {
|
342 |
+
window.location.href = `tel:${contact.phone}`;
|
343 |
+
} else {
|
344 |
+
alert('๊ธด๊ธ ์ฐ๋ฝ์ฒ๋ฅผ ๋จผ์ ๋ฑ๋กํด์ฃผ์ธ์.');
|
345 |
+
}
|
346 |
+
}, 5000);
|
347 |
+
}
|
348 |
+
}
|
349 |
+
});
|
350 |
+
|
351 |
+
document.addEventListener('keyup', (e) => {
|
352 |
+
if (e.key === 'VolumeUp') {
|
353 |
+
volumeButtonPressed = false;
|
354 |
+
if (pressTimer) {
|
355 |
+
clearTimeout(pressTimer);
|
356 |
+
}
|
357 |
+
}
|
358 |
+
});
|
359 |
+
|
360 |
+
// ์ ์ฅ๋ ์ฐ๋ฝ์ฒ ๋ถ๋ฌ์ค๊ธฐ
|
361 |
+
window.onload = () => {
|
362 |
+
const savedContact = localStorage.getItem('emergencyContact');
|
363 |
+
if (savedContact) {
|
364 |
+
const contact = JSON.parse(savedContact);
|
365 |
+
document.getElementById('emergencyContact').textContent = contact.name;
|
366 |
+
document.getElementById('contactPhone').textContent = contact.phone;
|
367 |
+
}
|
368 |
+
};
|
369 |
+
|
370 |
+
// ์๋น์ค ์์ปค ๋ฑ๋ก
|
371 |
+
if ('serviceWorker' in navigator) {
|
372 |
+
navigator.serviceWorker.register('service-worker.js')
|
373 |
+
.then(registration => {
|
374 |
+
console.log('ServiceWorker registration successful');
|
375 |
+
})
|
376 |
+
.catch(err => {
|
377 |
+
console.log('ServiceWorker registration failed: ', err);
|
378 |
+
});
|
379 |
+
}
|
380 |
+
</script>
|
381 |
+
</body>
|
382 |
+
</html>
|