File size: 9,724 Bytes
f757315 | 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 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Settings - ResumeRocket</title>
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#d946ef',
secondary: '#6b7280'
}
}
}
}
</script>
<style>
.gradient-bg {
background: linear-gradient(135deg, #fdf4ff 0%, #faf5ff 100%);
}
</style>
</head>
<body class="gradient-bg min-h-screen">
<!-- Navigation -->
<nav class="bg-white shadow-sm border-b">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<div class="w-8 h-8 bg-primary rounded-lg flex items-center justify-center">
<i data-feather="rocket" class="text-white w-4 h-4"></i>
</div>
<span class="ml-2 text-xl font-bold text-gray-900">ResumeRocket</span>
</div>
<div class="hidden md:ml-6 md:flex md:space-x-8">
<a href="index.html" class="border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">Home</a>
<a href="job.html" class="border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">Job Description</a>
<a href="resumes.html" class="border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">Resumes</a>
<a href="candidates.html" class="border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">Candidates</a>
<a href="analytics.html" class="border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">Analytics</a>
<a href="settings.html" class="border-primary text-gray-900 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">Settings</a>
</div>
</div>
<div class="flex items-center space-x-4">
<span class="text-sm text-gray-500">Settings</span>
</div>
</div>
</div>
</nav>
<!-- Breadcrumbs -->
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4">
<nav class="flex" aria-label="Breadcrumb">
<ol class="flex items-center space-x-4">
<li>
<div>
<a href="index.html" class="text-gray-400 hover:text-gray-500">
<i data-feather="home" class="w-4 h-4"></i>
</a>
</div>
</li>
<li>
<div class="flex items-center">
<i data-feather="chevron-right" class="w-4 h-4 text-gray-400"></i>
<span class="ml-4 text-sm font-medium text-gray-500">Settings</span>
</div>
</li>
</ol>
</nav>
</div>
<!-- Main Content -->
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<div class="bg-white rounded-lg shadow-lg p-6">
<h1 class="text-2xl font-bold text-gray-900 mb-6">Application Settings</h1>
<!-- API Configuration -->
<div class="mb-8">
<h2 class="text-lg font-medium text-gray-900 mb-4">API Configuration</h2>
<div class="space-y-4">
<div>
<label for="api-base-url" class="block text-sm font-medium text-gray-700">API Base URL</label>
<input type="text" id="api-base-url" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm focus:ring-primary focus:border-primary sm:text-sm" placeholder="http://localhost:8000">
</div>
<button id="test-api-btn" class="bg-primary hover:bg-fuchsia-600 text-white px-4 py-2 rounded-lg text-sm font-medium">
Test Connection
</button>
</div>
<!-- Theme Settings -->
<div class="mb-8">
<h2 class="text-lg font-medium text-gray-900 mb-4">Theme Settings</h2>
<div class="flex items-center space-x-4">
<span class="text-sm font-medium text-gray-700">Dark Mode</span>
<input type="checkbox" id="dark-mode" class="rounded border-gray-300 text-primary focus:ring-primary">
<label for="dark-mode" class="text-sm text-gray-500">Toggle dark mode</label>
</div>
<!-- Cache Management -->
<div class="mb-8">
<h2 class="text-lg font-medium text-gray-900 mb-4">Cache Management</label>
<div class="space-y-2">
<button id="clear-cache-btn" class="bg-white border border-gray-300 text-gray-700 px-4 py-2 rounded-lg text-sm font-medium hover:bg-gray-50">
Clear Local Cache
</button>
</div>
<!-- Danger Zone -->
<div class="border-t border-gray-200 pt-8">
<h2 class="text-lg font-medium text-gray-900 mb-4">Danger Zone</h2>
<div class="space-y-4">
<div>
<button id="clear-resumes-btn" class="bg-white border border-red-300 text-red-700 px-4 py-2 rounded-lg text-sm font-medium hover:bg-red-50">
Clear All Resumes
</button>
<div>
<button id="clear-results-btn" class="bg-white border border-red-300 text-red-700 px-4 py-2 rounded-lg text-sm font-medium">
Clear Last Run Results
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
feather.replace();
const testApiBtn = document.getElementById('test-api-btn');
const darkMode = document.getElementById('dark-mode');
const clearCacheBtn = document.getElementById('clear-cache-btn');
const clearResumesBtn = document.getElementById('clear-resumes-btn');
const clearResultsBtn = document.getElementById('clear-results-btn');
// Load settings
function loadSettings() {
const settings = JSON.parse(localStorage.getItem('resumerocket_settings') || '{}');
document.getElementById('api-base-url').value = settings.apiBaseUrl || 'http://localhost:8000';
}
// Test API connection
testApiBtn.addEventListener('click', () => {
const apiBaseUrl = document.getElementById('api-base-url').value;
if (!apiBaseUrl) {
alert('Please enter an API base URL');
return;
}
// Simulate API test
setTimeout(() => {
alert('API connection successful!');
// Save settings
const settings = JSON.parse(localStorage.getItem('resumerocket_settings') || '{}');
settings.apiBaseUrl = apiBaseUrl;
localStorage.setItem('resumerocket_settings', JSON.stringify(settings));
}, 1000);
});
// Clear cache
clearCacheBtn.addEventListener('click', () => {
if (confirm('Are you sure you want to clear all local cache? This will reset the application.')) {
localStorage.clear();
alert('Cache cleared successfully!');
window.location.href = 'index.html';
}
});
// Clear resumes
clearResumesBtn.addEventListener('click', () => {
if (confirm('Are you sure you want to clear all uploaded resumes?')) {
const state = JSON.parse(localStorage.getItem('resumerocket_state') || '{}');
state.resumes = [];
localStorage.setItem('resumerocket_state', JSON.stringify(state));
alert('All resumes cleared!');
}
});
// Clear results
clearResultsBtn.addEventListener('click', () => {
if (confirm('Are you sure you want to clear the last run results?')) {
const state = JSON.parse(localStorage.getItem('resumerocket_state') || '{}');
state.result = null;
state.lastRun = null;
localStorage.setItem('resumerocket_state', JSON.stringify(state));
alert('Last run results cleared!');
}
});
// Initialize
loadSettings();
</script>
</body>
</html>
|