-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapplier.html
More file actions
343 lines (307 loc) · 20.4 KB
/
Copy pathapplier.html
File metadata and controls
343 lines (307 loc) · 20.4 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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Job Scraper Dashboard</title>
<link href="https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Mono:wght@300;400;500&display=swap" rel="stylesheet">
<style>
:root {
--bg: #0a0a0f;
--surface: #111118;
--border: #1e1e2e;
--accent: #7c6aff;
--accent2: #ff6a8a;
--accent3: #6affb4;
--text: #e8e8f0;
--muted: #5a5a72;
--card: #13131c;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font-family: 'DM Mono', monospace; min-height: 100vh; overflow-x: hidden; }
body::before {
content: ''; position: fixed; inset: 0;
background-image: linear-gradient(rgba(124,106,255,0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(124,106,255,0.03) 1px, transparent 1px);
background-size: 40px 40px; pointer-events: none; z-index: 0;
}
.wrap { max-width: 900px; margin: 0 auto; padding: 60px 24px; position: relative; z-index: 1; }
header { margin-bottom: 56px; }
.badge { display: inline-block; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent); border: 1px solid rgba(124,106,255,0.3); padding: 4px 10px; border-radius: 2px; margin-bottom: 16px; }
h1 { font-family: 'Syne', sans-serif; font-size: clamp(32px, 5vw, 52px); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 12px; }
h1 span { color: var(--accent); }
.subtitle { color: var(--muted); font-size: 13px; line-height: 1.6; }
.mode-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 40px; }
.mode-card { border: 1px solid var(--border); border-radius: 8px; padding: 20px 16px; cursor: pointer; transition: all 0.2s; background: var(--card); position: relative; overflow: hidden; }
.mode-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform 0.2s; }
.mode-card:hover { border-color: rgba(124,106,255,0.4); }
.mode-card.active { border-color: var(--accent); background: rgba(124,106,255,0.05); }
.mode-card.active::before { transform: scaleX(1); }
.mode-icon { font-size: 20px; margin-bottom: 8px; }
.mode-name { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.mode-desc { font-size: 10px; color: var(--muted); line-height: 1.5; }
.mode-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.tag { font-size: 9px; padding: 2px 6px; border-radius: 2px; background: rgba(124,106,255,0.1); color: var(--accent); letter-spacing: 0.05em; }
.tag.green { background: rgba(106,255,180,0.1); color: var(--accent3); }
.tag.pink { background: rgba(255,106,138,0.1); color: var(--accent2); }
.form-section { margin-bottom: 32px; }
.section-label { font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.field-grid { display: grid; gap: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; }
label { font-size: 11px; color: var(--muted); letter-spacing: 0.05em; }
input, textarea, select { background: var(--surface); border: 1px solid var(--border); color: var(--text); font-family: 'DM Mono', monospace; font-size: 12px; padding: 10px 12px; border-radius: 6px; outline: none; transition: border-color 0.15s; width: 100%; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted); }
select option { background: #1a1a2e; }
.upload-zone { border: 1px dashed var(--border); border-radius: 6px; padding: 24px; text-align: center; cursor: pointer; transition: all 0.2s; position: relative; }
.upload-zone:hover { border-color: var(--accent); background: rgba(124,106,255,0.03); }
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-icon { font-size: 24px; margin-bottom: 8px; }
.upload-text { font-size: 11px; color: var(--muted); }
.upload-name { font-size: 11px; color: var(--accent3); margin-top: 4px; }
.hidden { display: none !important; }
.run-btn { width: 100%; padding: 16px; background: var(--accent); color: white; border: none; border-radius: 8px; font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; cursor: pointer; transition: all 0.2s; letter-spacing: 0.02em; margin-top: 8px; }
.run-btn:hover { background: #6a58f0; transform: translateY(-1px); }
.run-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.run-btn.running { background: transparent; border: 1px solid var(--accent); color: var(--accent); }
.stop-btn { width: 100%; padding: 12px; background: transparent; color: var(--accent2); border: 1px solid rgba(255,106,138,0.4); border-radius: 8px; font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s; margin-top: 8px; display: none; }
.stop-btn:hover { background: rgba(255,106,138,0.08); }
.reset-btn { width: 100%; padding: 12px; background: transparent; color: var(--muted); border: 1px solid var(--border); border-radius: 8px; font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s; margin-top: 8px; display: none; }
.reset-btn:hover { border-color: rgba(124,106,255,0.4); color: var(--text); }
.progress-wrap { margin-top: 32px; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--card); }
.progress-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.progress-title { font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 700; }
.stage-pill { font-size: 10px; padding: 3px 8px; border-radius: 20px; background: rgba(124,106,255,0.15); color: var(--accent); }
.stage-pill.done { background: rgba(106,255,180,0.15); color: var(--accent3); }
.stage-pill.error { background: rgba(255,106,138,0.15); color: var(--accent2); }
.log-box { padding: 16px; height: 200px; overflow-y: auto; font-size: 11px; line-height: 1.8; color: var(--muted); }
.log-box .ok { color: var(--accent3); }
.log-box .err { color: var(--accent2); }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--border); border-top: 1px solid var(--border); }
.stat { padding: 16px; background: var(--card); text-align: center; }
.stat-num { font-family: 'Syne', sans-serif; font-size: 28px; font-weight: 800; color: var(--accent); }
.stat-label { font-size: 10px; color: var(--muted); margin-top: 2px; }
.downloads { margin-top: 32px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.dl-btn { padding: 14px 16px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); color: var(--text); font-family: 'DM Mono', monospace; font-size: 11px; cursor: pointer; transition: all 0.2s; text-align: center; text-decoration: none; display: block; }
.dl-btn:hover { border-color: var(--accent); color: var(--accent); }
.dl-icon { font-size: 20px; display: block; margin-bottom: 6px; }
.dl-name { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 12px; }
.dl-desc { color: var(--muted); font-size: 10px; margin-top: 2px; }
/* Salary tabs */
.tab-btn { background: var(--card); border: 1px solid var(--border); color: var(--muted); font-family: 'DM Mono', monospace; font-size: 11px; padding: 8px 14px; border-radius: 6px; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 6px; }
.tab-btn.active { border-color: var(--accent); color: var(--accent); background: rgba(124,106,255,0.05); }
.tab-btn:hover { border-color: rgba(124,106,255,0.4); }
.tab-count { font-size: 10px; padding: 1px 6px; background: rgba(124,106,255,0.15); border-radius: 10px; }
.src-chip { background: var(--card); border: 1px solid var(--border); color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; padding: 5px 10px; border-radius: 6px; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 5px; }
.src-chip.active { border-color: var(--accent3); color: var(--accent3); background: rgba(106,255,180,0.06); }
.src-chip:hover { border-color: rgba(106,255,180,0.4); }
.job-tag.src { background: rgba(106,255,180,0.12); color: var(--accent3); }
/* Job cards */
.job-card { border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 10px; background: var(--card); display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: start; transition: border-color 0.15s; }
.job-card:hover { border-color: rgba(124,106,255,0.3); }
.job-card.applied-card { opacity: 0.7; border-color: rgba(106,255,180,0.2); }
/* Application Type Modal */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.6); z-index: 1000; align-items: center; justify-content: center; }
.modal.active { display: flex; }
.modal-content { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 24px; max-width: 400px; }
.modal-title { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.modal-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-btn { padding: 12px; border-radius: 6px; border: none; font-family: 'Syne', sans-serif; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.modal-btn.easy { background: rgba(106,255,180,0.15); color: var(--accent3); border: 1px solid rgba(106,255,180,0.3); }
.modal-btn.easy:hover { background: rgba(106,255,180,0.25); }
.modal-btn.cover { background: rgba(124,106,255,0.15); color: var(--accent); border: 1px solid rgba(124,106,255,0.3); }
.modal-btn.cover:hover { background: rgba(124,106,255,0.25); }
.app-type-badge { font-size: 9px; padding: 3px 8px; border-radius: 3px; font-weight: 600; margin-left: 8px; }
.app-type-badge.easy { background: rgba(106,255,180,0.1); color: var(--accent3); }
.app-type-badge.cover { background: rgba(124,106,255,0.1); color: var(--accent); }
.job-title { font-family: 'Syne', sans-serif; font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.job-company { font-size: 11px; color: var(--muted); }
.job-meta { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.job-tag { font-size: 10px; padding: 2px 7px; border-radius: 3px; }
.job-tag.fit { background: rgba(106,255,180,0.1); color: var(--accent3); }
.job-tag.prob { background: rgba(124,106,255,0.1); color: var(--accent); }
.job-tag.salary { background: rgba(255,200,100,0.1); color: #ffc864; }
.job-verdict { font-size: 10px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.job-link { font-size: 11px; color: var(--accent); text-decoration: none; white-space: nowrap; margin-top: 2px; }
.job-link:hover { text-decoration: underline; }
.skills-section { margin-top: 8px; }
.skills-label { font-size: 9px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.skills-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
.skill-tag { font-size: 9px; padding: 2px 6px; border-radius: 3px; }
.skill-tag.matched { background: rgba(106,255,180,0.08); color: var(--accent3); border: 1px solid rgba(106,255,180,0.2); }
.skill-tag.missing { background: rgba(255,106,138,0.08); color: var(--accent2); border: 1px solid rgba(255,106,138,0.2); }
.action-btns { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.apply-btn { font-size: 10px; padding: 5px 10px; border-radius: 4px; border: 1px solid rgba(106,255,180,0.3); background: transparent; color: var(--accent3); cursor: pointer; font-family: 'DM Mono', monospace; transition: all 0.15s; white-space: nowrap; }
.apply-btn:hover { background: rgba(106,255,180,0.08); }
.apply-btn.applied { border-color: rgba(106,255,180,0.15); color: var(--muted); cursor: default; }
.apply-btn.danger { border-color: rgba(255,106,138,0.3); color: var(--accent2); }
.apply-btn.danger:hover { background: rgba(255,106,138,0.08); }
.apply-btn.neutral { border-color: var(--border); color: var(--muted); }
.apply-btn.neutral:hover { border-color: rgba(124,106,255,0.4); color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { display: inline-block; width: 12px; height: 12px; border: 2px solid rgba(124,106,255,0.3); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 8px; vertical-align: middle; }
@media (max-width: 600px) {
.mode-grid { grid-template-columns: 1fr; }
.field-row { grid-template-columns: 1fr; }
.stats-row { grid-template-columns: 1fr; }
.downloads { grid-template-columns: 1fr; }
}
</style>
</head>
<body>
<div class="wrap">
<header>
<div class="badge" style="background:rgba(255,106,138,0.1);color:var(--accent2);border:1px solid rgba(255,106,138,0.2);">Auto-Applier</div>
<h1>Job Applier<br><span>Dashboard</span></h1>
<p class="subtitle">Automatically apply to LinkedIn Easy Apply jobs based on your scored results.</p>
<div style="margin-top: 16px;">
<a href="/" style="color: var(--muted); text-decoration: underline; font-size: 13px;">← Back to Scraper</a>
</div>
</header>
<form id="applier-form" onsubmit="startApplier(event)">
<!-- Applier Settings -->
<div class="form-section">
<div class="section-label">LinkedIn Login for Application</div>
<div class="field-row">
<div class="field"><label>Email</label><input type="email" name="email" placeholder="your@email.com" required></div>
<div class="field"><label>Password</label><input type="password" name="password" placeholder="••••••••" required></div>
</div>
</div>
<div class="form-section">
<div class="section-label">Auto-Apply Rules & Data</div>
<div class="field-grid">
<div class="field-row">
<div class="field">
<label>Minimum Fit Score (0-100)</label>
<input type="number" name="min_score" value="70" min="0" max="100">
</div>
<div class="field">
<label>Maximum Fit Score (0-100)</label>
<input type="number" name="max_score" value="85" min="0" max="100">
<span style="font-size: 10px; color: var(--muted);">Jobs above this score will be skipped so you can apply manually.</span>
</div>
</div>
<div class="field">
<label>Phone Number</label>
<input type="text" name="phone_number" placeholder="+1 234 567 8900">
</div>
<div class="field">
<label>Resume (PDF/DOCX)</label>
<label class="file-upload" style="display:block;">
<input type="file" name="resume" accept=".pdf,.doc,.docx" onchange="showFileName(this, 'resume-name')">
<div style="margin-top:8px;font-size:14px;color:var(--accent);font-weight:500;">
<span style="font-size:18px;margin-right:6px;">📄</span> Click to select file...
</div>
<div id="resume-name" style="margin-top:4px;font-size:12px;color:var(--text);"></div>
</label>
<div style="margin-top:4px;font-size:11px;color:var(--muted);">We'll upload this if the form asks for it.</div>
</div>
<div class="field">
<label>Jobs CSV (Optional)</label>
<label class="file-upload" style="display:block;">
<input type="file" name="jobs_csv" accept=".csv" onchange="showFileName(this, 'csv-name')">
<div style="margin-top:8px;font-size:14px;color:var(--blue);font-weight:500;">
<span style="font-size:18px;margin-right:6px;">📊</span> Select CSV file...
</div>
<div id="csv-name" style="margin-top:4px;font-size:12px;color:var(--text);"></div>
</label>
<div style="margin-top:4px;font-size:11px;color:var(--muted);">Upload a previous results CSV to apply to those jobs.</div>
</div>
</div>
</div>
<button type="submit" class="run-btn" id="run-btn">Run Auto-Applier</button>
</form>
<!-- Progress -->
<div class="progress-wrap" id="progress" style="display:none; margin-top: 32px;">
<div class="progress-header">
<span class="progress-title">Applier Log</span>
<span class="stage-pill" id="stage-pill">Idle</span>
</div>
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px;">
<div class="log-box" id="log-box" style="margin-top: 0;"></div>
<div id="results-box" style="background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; height: 350px; overflow-y: auto;">
<div style="font-size: 12px; color: var(--muted); margin-bottom: 8px;">Applied Jobs</div>
<div id="results-list" style="display: flex; flex-direction: column; gap: 8px;"></div>
</div>
</div>
</div>
</div>
<script>
function showFileName(input, id) {
document.getElementById(id).textContent = input.files[0]?.name || '';
}
async function startApplier(e) {
e.preventDefault();
const formData = new FormData(document.getElementById('applier-form'));
const btn = document.getElementById('run-btn');
btn.disabled = true;
btn.innerHTML = '<span class="spinner"></span>Running...';
btn.classList.add('running');
document.getElementById('progress').style.display = 'block';
document.getElementById('log-box').innerHTML = '';
try {
const res = await fetch('/run_applier', { method: 'POST', body: formData });
const data = await res.json();
if (data.error) { showError(data.error); return; }
startPolling();
} catch (err) { showError(err.message); }
}
let polling;
function startPolling() {
polling = setInterval(async () => {
try {
const res = await fetch('/status');
const data = await res.json();
if (data.stage) document.getElementById('stage-pill').textContent = data.stage;
const box = document.getElementById('log-box');
if (data.logs && data.logs.length) {
box.innerHTML = data.logs.map(l => {
let color = 'var(--text)';
if (l.includes('✓')) color = 'var(--accent)';
if (l.includes('✗') || l.includes('Warning') || l.includes('Error')) color = 'var(--accent2)';
if (l.includes('▶')) color = 'var(--blue)';
return `<div style="color:${color}; padding:2px 0;">${l}</div>`;
}).join('');
box.scrollTop = box.scrollHeight;
}
if (data.applier_results && data.applier_results.length) {
document.getElementById('results-list').innerHTML = data.applier_results.map(r => {
const isOk = r.status === 'Applied';
const bg = isOk ? 'rgba(106,255,180,0.1)' : 'rgba(255,106,138,0.1)';
const border = isOk ? 'rgba(106,255,180,0.3)' : 'rgba(255,106,138,0.3)';
const color = isOk ? 'var(--accent)' : 'var(--accent2)';
return `
<div style="background: ${bg}; border: 1px solid ${border}; border-radius: 6px; padding: 10px;">
<div style="font-weight: 500; font-size: 14px; margin-bottom: 2px;">
<a href="${r.url}" target="_blank" style="color: var(--text); text-decoration: none;">${r.title}</a>
</div>
<div style="font-size: 12px; color: var(--muted); margin-bottom: 6px;">${r.company}</div>
<div style="font-size: 11px; color: ${color}; font-weight: 500;">
${isOk ? '✓ Applied' : '✗ Failed: ' + r.error}
</div>
</div>
`;
}).reverse().join('');
}
if (!data.running) {
clearInterval(polling);
const btn = document.getElementById('run-btn');
btn.disabled = false;
btn.innerHTML = 'Run Auto-Applier';
btn.classList.remove('running');
}
} catch(e) {}
}, 1000);
}
function showError(msg) {
const box = document.getElementById('log-box');
box.innerHTML += `<div style="color:var(--accent2); padding:2px 0;">Error: ${msg}</div>`;
const btn = document.getElementById('run-btn');
btn.disabled = false;
btn.innerHTML = 'Run Auto-Applier';
btn.classList.remove('running');
}
</script>
</body>
</html>