-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpermission-popup.html
101 lines (97 loc) · 2.51 KB
/
permission-popup.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>CloseAssist - Microphone Permission</title>
<style>
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 20px;
background-color: #f5f5f5;
color: #333;
}
.container {
max-width: 100%;
margin: 0 auto;
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
text-align: center;
}
h1 {
font-size: 24px;
margin-bottom: 20px;
color: #333;
}
p {
margin-bottom: 20px;
line-height: 1.5;
}
.status {
margin: 20px 0;
padding: 15px;
border-radius: 4px;
font-weight: 500;
}
.status.pending {
background-color: #e3f2fd;
color: #0d47a1;
}
.status.success {
background-color: #e8f5e9;
color: #1b5e20;
}
.status.error {
background-color: #ffebee;
color: #b71c1c;
}
button {
background-color: #4285f4;
color: white;
border: none;
padding: 10px 20px;
border-radius: 4px;
font-size: 16px;
cursor: pointer;
transition: background-color 0.3s;
}
button:hover {
background-color: #2a75f3;
}
button:disabled {
background-color: #cccccc;
cursor: not-allowed;
}
.icon {
font-size: 48px;
margin-bottom: 20px;
}
.hidden {
display: none;
}
</style>
</head>
<body>
<div class="container">
<h1>Microphone Permission Required</h1>
<p>CloseAssist needs access to your microphone to record your voice along with tab audio.</p>
<div id="step1" class="step">
<p>Click the button below to allow microphone access:</p>
<button id="requestPermissionBtn">Allow Microphone Access</button>
</div>
<div id="step2" class="step hidden">
<div id="status" class="status pending">Requesting permission...</div>
<p id="helpText" class="hidden">If the permission dialog doesn't appear, make sure your browser settings allow this site to access the microphone.</p>
</div>
<div id="step3" class="step hidden">
<div id="resultIcon" class="icon">✓</div>
<div id="resultStatus" class="status success">Permission granted successfully!</div>
<p>You can now close this window and return to the extension.</p>
<button id="closeButton">Close Window</button>
</div>
</div>
<script src="permission-popup.js"></script>
</body>
</html>