AKt123479's picture
Build me a working app from this repo https://github.com/Soweto7/open-genspark-ai-browser
5583b3f verified
Raw History Blame Contribute Delete
32.6 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Settings - Open Genspark AI Browser</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<link rel="stylesheet" href="style.css">
<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>
</head>
<body class="bg-gray-50">
<!-- Header -->
<header class="bg-undefined-500 shadow-lg">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between items-center py-4">
<div class="flex items-center">
<i data-feather="cpu" class="w-8 h-8 text-white mr-3"></i>
<h1 class="text-2xl font-bold text-white">Open Genspark AI Browser</h1>
</div>
<nav class="hidden md:flex space-x-8">
<a href="index.html" class="text-white hover:text-undefined-100 transition duration-150 ease-in-out">Home</a>
<a href="models.html" class="text-white hover:text-undefined-100 transition duration-150 ease-in-out">AI Models</a>
<a href="browser.html" class="text-white hover:text-undefined-100 transition duration-150 ease-in-out">Browse</a>
<a href="settings.html" class="text-white hover:text-undefined-100 transition duration-150 ease-in-out">Settings</a>
</nav>
<div class="md:hidden">
<button id="mobile-menu-button" class="text-white hover:text-undefined-100">
<i data-feather="menu"></i>
</button>
</div>
</div>
</div>
</header>
<!-- Mobile Menu -->
<div id="mobile-menu" class="hidden bg-undefined-500 md:hidden">
<div class="px-2 pt-2 pb-3 space-y-1 sm:px-3">
<a href="index.html" class="block text-white hover:text-undefined-100 px-3 py-2 rounded-md text-base font-medium">Home</a>
<a href="models.html" class="block text-white hover:text-undefined-100 px-3 py-2 rounded-md text-base font-medium">AI Models</a>
<a href="browser.html" class="block text-white hover:text-undefined-100 px-3 py-2 rounded-md text-base font-medium">Browse</a>
<a href="settings.html" class="block text-white hover:text-undefined-100 px-3 py-2 rounded-md text-base font-medium">Settings</a>
</div>
</div>
<!-- Main Content -->
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<div class="mb-8">
<h2 class="text-3xl font-extrabold text-gray-900">Settings</h2>
<p class="mt-2 text-gray-600">Configure your AI browser preferences and privacy settings.</p>
</div>
<div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
<!-- Settings Navigation -->
<div class="lg:col-span-1">
<div class="bg-white shadow-lg rounded-lg">
<div class="p-4">
<h3 class="text-lg font-medium text-gray-900 mb-4">Settings Categories</h3>
<nav class="space-y-2">
<button class="settings-nav-btn w-full text-left px-4 py-2 text-sm font-medium rounded hover:bg-gray-100 transition duration-150 text-undefined-600 bg-undefined-50" data-category="general">
<i data-feather="settings" class="w-4 h-4 inline mr-2"></i>
General
</button>
<button class="settings-nav-btn w-full text-left px-4 py-2 text-sm font-medium rounded hover:bg-gray-100 transition duration-150 text-gray-700" data-category="ai">
<i data-feather="cpu" class="w-4 h-4 inline mr-2"></i>
AI Models
</button>
<button class="settings-nav-btn w-full text-left px-4 py-2 text-sm font-medium rounded hover:bg-gray-100 transition duration-150 text-gray-700" data-category="privacy">
<i data-feather="shield" class="w-4 h-4 inline mr-2"></i>
Privacy & Security
</button>
<button class="settings-nav-btn w-full text-left px-4 py-2 text-sm font-medium rounded hover:bg-gray-100 transition duration-150 text-gray-700" data-category="appearance">
<i data-feather="eye" class="w-4 h-4 inline mr-2"></i>
Appearance
</button>
<button class="settings-nav-btn w-full text-left px-4 py-2 text-sm font-medium rounded hover:bg-gray-100 transition duration-150 text-gray-700" data-category="advanced">
<i data-feather="sliders" class="w-4 h-4 inline mr-2"></i>
Advanced
</button>
</nav>
</div>
</div>
</div>
<!-- Settings Content -->
<div class="lg:col-span-2">
<div class="bg-white shadow-lg rounded-lg">
<div class="p-6">
<!-- General Settings -->
<div id="general-settings" class="settings-content">
<h3 class="text-xl font-semibold text-gray-900 mb-6">General Settings</h3>
<div class="space-y-6">
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Default Search Engine</label>
<select class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-undefined-500">
<option>DuckDuckGo</option>
<option>Google</option>
<option>Bing</option>
<option>Brave Search</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Home Page</label>
<input type="text" value="index.html" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-undefined-500">
</div>
<div class="flex items-center justify-between">
<div>
<label class="text-sm font-medium text-gray-700">Enable Notifications</label>
<p class="text-xs text-gray-500">Receive browser notifications and updates</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" checked class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-undefined-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-undefined-500"></div>
</label>
</div>
<div class="flex items-center justify-between">
<div>
<label class="text-sm font-medium text-gray-700">Auto-save Browsing History</label>
<p class="text-xs text-gray-500">Keep track of your browsing activity</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" checked class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-undefined-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-undefined-500"></div>
</label>
</div>
</div>
</div>
<!-- AI Models Settings -->
<div id="ai-settings" class="settings-content hidden">
<h3 class="text-xl font-semibold text-gray-900 mb-6">AI Model Settings</h3>
<div class="space-y-6">
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Preferred AI Model</label>
<select class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-undefined-500">
<option>GPT-4</option>
<option>Claude 3</option>
<option>Gemini Pro</option>
<option>Mistral Large</option>
<option>Auto-select</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">API Key</label>
<input type="password" placeholder="Enter your API key" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-undefined-500">
</div>
<div class="flex items-center justify-between">
<div>
<label class="text-sm font-medium text-gray-700">Enable AI Suggestions</label>
<p class="text-xs text-gray-500">Get AI-powered browsing suggestions</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" checked class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-undefined-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-undefined-500"></div>
</label>
</div>
<div class="flex items-center justify-between">
<div>
<label class="text-sm font-medium text-gray-700">Real-time Analysis</label>
<p class="text-xs text-gray-500">Analyze content as you browse</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-undefined-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-undefined-500"></div>
</label>
</div>
</div>
</div>
<!-- Privacy Settings -->
<div id="privacy-settings" class="settings-content hidden">
<h3 class="text-xl font-semibold text-gray-900 mb-6">Privacy & Security</h3>
<div class="space-y-6">
<div class="flex items-center justify-between">
<div>
<label class="text-sm font-medium text-gray-700">Private Browsing</label>
<p class="text-xs text-gray-500">Browse without saving history</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-undefined-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-undefined-500"></div>
</label>
</div>
<div class="flex items-center justify-between">
<div>
<label class="text-sm font-medium text-gray-700">Block Trackers</label>
<p class="text-xs text-gray-500">Block tracking cookies and scripts</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" checked class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-undefined-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-undefined-500"></div>
</label>
</div>
<div class="flex items-center justify-between">
<div>
<label class="text-sm font-medium text-gray-700">Local AI Processing</label>
<p class="text-xs text-gray-500">Process AI requests locally when possible</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" checked class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-undefined-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-undefined-500"></div>
</label>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Clear Browsing Data</label>
<div class="space-y-2">
<button class="w-full text-left px-4 py-2 text-sm bg-gray-50 rounded hover:bg-gray-100 transition duration-150">
<i data-feather="trash-2" class="w-4 h-4 inline mr-2"></i>
Clear History
</button>
<button class="w-full text-left px-4 py-2 text-sm bg-gray-50 rounded hover:bg-gray-100 transition duration-150">
<i data-feather="trash-2" class="w-4 h-4 inline mr-2"></i>
Clear Cookies
</button>
<button class="w-full text-left px-4 py-2 text-sm bg-gray-50 rounded hover:bg-gray-100 transition duration-150">
<i data-feather="trash-2" class="w-4 h-4 inline mr-2"></i>
Clear Cache
</button>
</div>
</div>
</div>
</div>
<!-- Appearance Settings -->
<div id="appearance-settings" class="settings-content hidden">
<h3 class="text-xl font-semibold text-gray-900 mb-6">Appearance</h3>
<div class="space-y-6">
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Theme</label>
<div class="grid grid-cols-3 gap-2">
<button class="px-4 py-2 border-2 border-undefined-500 text-undefined-500 rounded hover:bg-undefined-50 transition duration-150">
Light
</button>
<button class="px-4 py-2 border border-gray-300 rounded hover:bg-gray-50 transition duration-150">
Dark
</button>
<button class="px-4 py-2 border border-gray-300 rounded hover:bg-gray-50 transition duration-150">
Auto
</button>
</div>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Font Size</label>
<select class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-undefined-500">
<option>Small</option>
<option selected>Medium</option>
<option>Large</option>
<option>Extra Large</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Accent Color</label>
<div class="flex space-x-2">
<button class="w-8 h-8 bg-blue-500 rounded-full border-2 border-gray-300"></button>
<button class="w-8 h-8 bg-purple-500 rounded-full border-2 border-gray-300"></button>
<button class="w-8 h-8 bg-green-500 rounded-full border-2 border-gray-300"></button>
<button class="w-8 h-8 bg-red-500 rounded-full border-2 border-gray-300"></button>
<button class="w-8 h-8 bg-yellow-500 rounded-full border-2 border-gray-300"></button>
</div>
</div>
<div class="flex items-center justify-between">
<div>
<label class="text-sm font-medium text-gray-700">Show Bookmarks Bar</label>
<p class="text-xs text-gray-500">Display bookmarks below address bar</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" checked class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-undefined-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-undefined-500"></div>
</label>
</div>
</div>
</div>
<!-- Advanced Settings -->
<div id="advanced-settings" class="settings-content hidden">
<h3 class="text-xl font-semibold text-gray-900 mb-6">Advanced Settings</h3>
<div class="space-y-6">
<div class="flex items-center justify-between">
<div>
<label class="text-sm font-medium text-gray-700">Developer Mode</label>
<p class="text-xs text-gray-500">Enable developer tools and experimental features</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-undefined-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-undefined-500"></div>
</label>
</div>
<div class="flex items-center justify-between">
<div>
<label class="text-sm font-medium text-gray-700">Hardware Acceleration</label>
<p class="text-xs text-gray-500">Use GPU for better performance</p>
</div>
<label class="relative inline-flex items-center cursor-pointer">
<input type="checkbox" checked class="sr-only peer">
<div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-undefined-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-undefined-500"></div>
</label>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Cache Size Limit</label>
<select class="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-undefined-500">
<option>50 MB</option>
<option>100 MB</option>
<option selected>250 MB</option>
<option>500 MB</option>
<option>1 GB</option>
</select>
</div>
<div>
<label class="block text-sm font-medium text-gray-700 mb-2">Download Location</label>
<div class="flex space-x-2">
<input type="text" value="/Downloads" class="flex-1 px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-undefined-500">
<button class="px-4 py-2 bg-gray-200 text-gray-700 rounded hover:bg-gray-300 transition duration-150">
Browse
</button>
</div>
</div>
<div class="pt-4 border-t border-gray-200">
<button class="w-full px-4 py-2 bg-red-500 text-white rounded hover:bg-red-600 transition duration-150">
Reset All Settings
</button>
</div>
</div>
</div>
<!-- Save Button -->
<div class="mt-8 pt-6 border-t border-gray-200">
<button id="save-settings" class="px-6 py-2 bg-undefined-500 text-white rounded hover:bg-undefined-600 transition duration-150">
Save Settings
</button>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- Footer -->
<footer class="bg-gray-800 mt-12">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<div class="col-span-1 md:col-span-2">
<div class="flex items-center mb-4">
<i data-feather="cpu" class="w-8 h-8 text-undefined-500 mr-3"></i>
<h3 class="text-xl font-bold text-white">Open Genspark AI Browser</h3>
</div>
<p class="text-gray-400 mb-4">Revolutionizing web browsing with intelligent AI integration.</p>
<div class="flex space-x-4">
<a href="https://github.com/Soweto7/open-genspark-ai-browser" class="text-gray-400 hover:text-undefined-500 transition duration-150 ease-in-out">
<i data-feather="github" class="w-6 h-6"></i>
</a>
<a href="#" class="text-gray-400 hover:text-undefined-500 transition duration-150 ease-in-out">
<i data-feather="twitter" class="w-6 h-6"></i>
</a>
<a href="#" class="text-gray-400 hover:text-undefined-500 transition duration-150 ease-in-out">
<i data-feather="linkedin" class="w-6 h-6"></i>
</a>
</div>
</div>
<div>
<h4 class="text-white font-semibold mb-4">Features</h4>
<ul class="space-y-2 text-gray-400">
<li><a href="browser.html" class="hover:text-undefined-500 transition duration-150 ease-in-out">AI Search</a></li>
<li><a href="browser.html" class="hover:text-undefined-500 transition duration-150 ease-in-out">Content Analysis</a></li>
<li><a href="browser.html" class="hover:text-undefined-500 transition duration-150 ease-in-out">Smart Navigation</a></li>
<li><a href="settings.html" class="hover:text-undefined-500 transition duration-150 ease-in-out">Privacy Protection</a></li>
</ul>
</div>
<div>
<h4 class="text-white font-semibold mb-4">Resources</h4>
<ul class="space-y-2 text-gray-400">
<li><a href="https://github.com/Soweto7/open-genspark-ai-browser" target="_blank" class="hover:text-undefined-500 transition duration-150 ease-in-out">Documentation</a></li>
<li><a href="https://github.com/Soweto7/open-genspark-ai-browser" target="_blank" class="hover:text-undefined-500 transition duration-150 ease-in-out">API Reference</a></li>
<li><a href="https://github.com/Soweto7/open-genspark-ai-browser" target="_blank" class="hover:text-undefined-500 transition duration-150 ease-in-out">Community</a></li>
<li><a href="settings.html" class="hover:text-undefined-500 transition duration-150 ease-in-out">Support</a></li>
</ul>
</div>
</div>
<div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400">
<p>&copy; 2024 Open Genspark AI Browser. All rights reserved.</p>
</div>
</div>
</footer>
<script src="script.js"></script>
<script>
// Settings navigation
document.addEventListener('DOMContentLoaded', function() {
const navButtons = document.querySelectorAll('.settings-nav-btn');
const contentSections = document.querySelectorAll('.settings-content');
const saveButton = document.getElementById('save-settings');
navButtons.forEach(button => {
button.addEventListener('click', function() {
const category = this.dataset.category;
// Update active button styling
navButtons.forEach(btn => {
btn.classList.remove('text-undefined-600', 'bg-undefined-50');
btn.classList.add('text-gray-700');
});
this.classList.remove('text-gray-700');
this.classList.add('text-undefined-600', 'bg-undefined-50');
// Show corresponding content
contentSections.forEach(section => {
section.classList.add('hidden');
});
document.getElementById(category + '-settings').classList.remove('hidden');
});
});
// Save settings
saveButton.addEventListener('click', function() {
// Show success message
const notification = document.createElement('div');
notification.className = 'fixed top-4 right-4 bg-green-500 text-white px-4 py-2 rounded shadow-lg z-50';
notification.textContent = 'Settings saved successfully!';
document.body.appendChild(notification);
setTimeout(() => {
notification.remove();
}, 3000);
});
});
</script>
<script>feather.replace();</script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html>