-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
232 lines (201 loc) · 6.44 KB
/
index.html
File metadata and controls
232 lines (201 loc) · 6.44 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
<!DOCTYPE html>
<html lang="tr">
<head>
<meta charset="UTF-8" />
<meta http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdn.tailwindcss.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data: https://www.google.com https://*.gstatic.com https://*.google.com; connect-src 'self' http://localhost:* https://generativelanguage.googleapis.com;">
<link rel="icon" href="favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>WinVault</title>
<!-- Tailwind CDN (Geliştirme için). Prodüksiyon için yerel kurulum önerilir ama şimdilik hızlı çözüm için kalabilir. -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link
href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap"
rel="stylesheet">
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
fontFamily: {
sans: ['Outfit', 'sans-serif'],
mono: ['JetBrains Mono', 'monospace'],
},
animation: {
'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
}
}
}
}
</script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
<style>
body {
font-family: 'Inter', sans-serif;
/* Default to dark mode colors initially to prevent flash */
background-color: #0f172a;
color: #e2e8f0;
width: 100%;
height: 100vh;
overflow: hidden;
margin: 0;
padding: 0;
box-sizing: border-box;
}
/* Light mode body override via CSS if needed */
html:not(.dark) body {
background-color: #f8fafc;
color: #1e293b;
}
::-webkit-scrollbar {
width: 6px;
}
::-webkit-scrollbar-track {
background: transparent;
}
::-webkit-scrollbar-thumb {
background: #cbd5e1;
border-radius: 3px;
}
.dark ::-webkit-scrollbar-thumb {
background: #334155;
}
::-webkit-scrollbar-thumb:hover {
background: #94a3b8;
}
.dark ::-webkit-scrollbar-thumb:hover {
background: #475569;
}
.glass-panel {
background: rgba(255, 255, 255, 0.7);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
}
.dark .glass-panel {
background: rgba(30, 41, 59, 0.7);
}
/* Amoled (Pitch Black) Mode */
html.amoled body {
background-color: #000000 !important;
color: #ffffff;
}
html.amoled .bg-slate-50,
html.amoled .bg-white,
html.amoled .dark\:bg-slate-900,
html.amoled .dark\:bg-slate-950 {
background-color: #000000 !important;
}
html.amoled .border-slate-200,
html.amoled .dark\:border-slate-800,
html.amoled .dark\:border-slate-700 {
border-color: #111111 !important;
}
html.amoled .glass-panel {
background: rgba(0, 0, 0, 0.7) !important;
border-color: #222222 !important;
}
html.amoled ::-webkit-scrollbar-thumb {
background: #222222;
}
html.amoled ::-webkit-scrollbar-thumb:hover {
background: #333333;
}
/* MasterLogin Amoled Fix */
html.amoled .master-login-bg {
background: #000000 !important;
background-image: none !important;
}
* {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* Image Loading Stability */
img {
display: block;
backface-visibility: hidden;
-webkit-backface-visibility: hidden;
will-change: opacity;
}
/* Context Menu Style */
#custom-context-menu {
display: none;
position: absolute;
z-index: 9999;
background-color: #1e293b;
border: 1px solid #334155;
border-radius: 8px;
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
padding: 4px 0;
min-width: 120px;
}
html:not(.dark) #custom-context-menu {
background-color: #ffffff;
border-color: #e2e8f0;
color: #1e293b;
}
.context-menu-item {
display: flex;
align-items: center;
padding: 8px 12px;
cursor: pointer;
font-size: 13px;
font-weight: 500;
color: #e2e8f0;
transition: background-color 0.2s;
}
html:not(.dark) .context-menu-item {
color: #334155;
}
.context-menu-item:hover {
background-color: #334155;
}
html:not(.dark) .context-menu-item:hover {
background-color: #f1f5f9;
}
</style>
<link rel="stylesheet" href="/index.css">
</head>
<body>
<div id="root" class="h-full w-full"></div>
<!-- Custom Context Menu -->
<div id="custom-context-menu">
<div class="context-menu-item" id="ctx-copy">
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none"
stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"
style="margin-right: 8px;">
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
Kopyala
</div>
</div>
<script>
const contextMenu = document.getElementById('custom-context-menu');
const copyBtn = document.getElementById('ctx-copy');
document.addEventListener('contextmenu', (e) => {
// Only show if text is selected
const selection = window.getSelection();
if (selection.toString().length > 0) {
e.preventDefault();
contextMenu.style.display = 'block';
contextMenu.style.left = `${e.pageX}px`;
contextMenu.style.top = `${e.pageY}px`;
} else {
// If input/textarea, let default menu handle it if possible, or hide ours
contextMenu.style.display = 'none';
}
});
document.addEventListener('click', (e) => {
if (contextMenu.style.display === 'block') {
contextMenu.style.display = 'none';
}
});
copyBtn.addEventListener('click', () => {
document.execCommand('copy');
contextMenu.style.display = 'none';
});
</script>
<script type="module" src="/src/index.tsx"></script>
</body>