edex / index.html
sentus096's picture
сделай так чтоб все команды работали к примеру pkg install python и так далле - Initial Deployment
06df824 verified
Raw History Blame Contribute Delete
27.6 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>E-DEX UI Clone</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@font-face {
font-family: 'Digital';
src: url('https://cdn.jsdelivr.net/gh/ryanoasis/nerd-fonts@master/patched-fonts/Hack/Regular/complete/Hack%20Regular%20Nerd%20Font%20Complete.ttf') format('truetype');
}
body {
font-family: 'Digital', monospace;
background-color: #000;
color: #0f0;
overflow: hidden;
height: 100vh;
}
.terminal-cursor {
animation: blink 1s infinite;
}
@keyframes blink {
0%, 100% { opacity: 1; }
50% { opacity: 0; }
}
.glow-text {
text-shadow: 0 0 5px #0f0;
}
.scanline {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(to bottom,
rgba(0, 255, 0, 0.1) 0%,
rgba(0, 255, 0, 0) 10%);
background-size: 100% 2px;
pointer-events: none;
z-index: 100;
}
.window {
box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
}
.progress-bar {
background: linear-gradient(90deg, #0f0 0%, rgba(0, 255, 0, 0.3) 100%);
}
.sensor-value {
transition: all 0.3s ease;
}
</style>
</head>
<body class="bg-black text-green-500 p-4">
<div class="scanline"></div>
<!-- Main Container -->
<div class="flex flex-col h-screen">
<!-- Header -->
<div class="flex justify-between items-center mb-2">
<div class="text-xl glow-text">E-DEX UI v1.0.0</div>
<div class="flex space-x-4">
<div class="flex items-center">
<i class="fas fa-wifi mr-1"></i>
<span>CONNECTED</span>
</div>
<div class="flex items-center">
<i class="fas fa-battery-three-quarters mr-1"></i>
<span>87%</span>
</div>
<div class="flex items-center">
<i class="fas fa-clock mr-1"></i>
<span id="time">00:00:00</span>
</div>
</div>
</div>
<!-- Main Content -->
<div class="flex flex-1 gap-4 overflow-hidden">
<!-- Left Panel -->
<div class="w-1/4 flex flex-col gap-4">
<!-- System Info -->
<div class="window bg-black border border-green-500 rounded p-4 flex-1">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-bold glow-text">SYSTEM STATUS</h2>
<div class="text-xs">UPTIME: <span id="uptime">00:00:00</span></div>
</div>
<div class="mb-3">
<div class="flex justify-between text-sm mb-1">
<span>CPU</span>
<span id="cpu-usage">0%</span>
</div>
<div class="h-2 bg-gray-800 rounded-full overflow-hidden">
<div id="cpu-bar" class="h-full progress-bar rounded-full" style="width: 0%"></div>
</div>
</div>
<div class="mb-3">
<div class="flex justify-between text-sm mb-1">
<span>RAM</span>
<span id="ram-usage">0%</span>
</div>
<div class="h-2 bg-gray-800 rounded-full overflow-hidden">
<div id="ram-bar" class="h-full progress-bar rounded-full" style="width: 0%"></div>
</div>
</div>
<div class="mb-3">
<div class="flex justify-between text-sm mb-1">
<span>GPU</span>
<span id="gpu-usage">0%</span>
</div>
<div class="h-2 bg-gray-800 rounded-full overflow-hidden">
<div id="gpu-bar" class="h-full progress-bar rounded-full" style="width: 0%"></div>
</div>
</div>
<div class="mt-6">
<h3 class="text-sm font-bold mb-2">SENSORS</h3>
<div class="grid grid-cols-2 gap-2 text-xs">
<div>
<div class="flex justify-between">
<span>TEMP</span>
<span id="cpu-temp" class="sensor-value">42°C</span>
</div>
<div class="flex justify-between">
<span>FAN</span>
<span id="cpu-fan" class="sensor-value">1200 RPM</span>
</div>
</div>
<div>
<div class="flex justify-between">
<span>GPU TEMP</span>
<span id="gpu-temp" class="sensor-value">56°C</span>
</div>
<div class="flex justify-between">
<span>GPU FAN</span>
<span id="gpu-fan" class="sensor-value">1800 RPM</span>
</div>
</div>
</div>
</div>
</div>
<!-- Network Info -->
<div class="window bg-black border border-green-500 rounded p-4">
<h2 class="text-lg font-bold glow-text mb-3">NETWORK</h2>
<div class="text-sm space-y-2">
<div class="flex justify-between">
<span>IP:</span>
<span>192.168.1.105</span>
</div>
<div class="flex justify-between">
<span>UP:</span>
<span id="net-up">0 KB/s</span>
</div>
<div class="flex justify-between">
<span>DOWN:</span>
<span id="net-down">0 KB/s</span>
</div>
<div class="flex justify-between">
<span>PING:</span>
<span id="net-ping">12 ms</span>
</div>
</div>
</div>
</div>
<!-- Main Terminal -->
<div class="window bg-black border border-green-500 rounded flex-1 flex flex-col">
<div class="border-b border-green-500 p-2 flex justify-between items-center">
<div class="flex items-center">
<i class="fas fa-terminal mr-2"></i>
<span>TERMINAL</span>
</div>
<div class="flex space-x-2">
<button class="px-2 py-1 border border-green-500 rounded hover:bg-green-900">
<i class="fas fa-plus"></i>
</button>
<button class="px-2 py-1 border border-green-500 rounded hover:bg-green-900">
<i class="fas fa-cog"></i>
</button>
</div>
</div>
<div id="terminal-content" class="flex-1 p-4 overflow-y-auto font-mono text-sm">
<div class="mb-2">E-DEX UI Terminal Emulator v1.0.0</div>
<div class="mb-2">Type 'help' for available commands</div>
<div id="terminal-output"></div>
<div class="flex items-center">
<span class="mr-2">user@edex:~$</span>
<div class="flex-1 relative">
<input id="terminal-input" type="text" class="bg-transparent border-none outline-none w-full" autofocus>
<span id="terminal-cursor" class="terminal-cursor absolute top-0">_</span>
</div>
</div>
</div>
</div>
<!-- Right Panel -->
<div class="w-1/4 flex flex-col gap-4">
<!-- Process List -->
<div class="window bg-black border border-green-500 rounded p-4 flex-1">
<div class="flex justify-between items-center mb-4">
<h2 class="text-lg font-bold glow-text">PROCESSES</h2>
<div class="text-xs">TOTAL: <span id="process-count">42</span></div>
</div>
<div class="text-xs mb-2 flex justify-between">
<span class="w-1/2">NAME</span>
<span class="w-1/4 text-right">PID</span>
<span class="w-1/4 text-right">CPU</span>
</div>
<div id="process-list" class="overflow-y-auto h-64 text-xs space-y-1">
<!-- Processes will be added here by JS -->
</div>
</div>
<!-- Disk Usage -->
<div class="window bg-black border border-green-500 rounded p-4">
<h2 class="text-lg font-bold glow-text mb-3">DISK</h2>
<div class="space-y-3">
<div>
<div class="flex justify-between text-sm mb-1">
<span>C:</span>
<span id="disk-c">75%</span>
</div>
<div class="h-2 bg-gray-800 rounded-full overflow-hidden">
<div class="h-full progress-bar rounded-full" style="width: 75%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-1">
<span>D:</span>
<span id="disk-d">32%</span>
</div>
<div class="h-2 bg-gray-800 rounded-full overflow-hidden">
<div class="h-full progress-bar rounded-full" style="width: 32%"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Footer -->
<div class="flex justify-between items-center mt-2 text-xs">
<div class="flex space-x-4">
<div>F1: HELP</div>
<div>F2: SETTINGS</div>
<div>F3: PROCESSES</div>
</div>
<div>
<span id="connection-status">CONNECTED TO: MAINFRAME_ALPHA</span>
</div>
</div>
</div>
<script>
// Update time
function updateTime() {
const now = new Date();
const timeStr = now.toLocaleTimeString();
document.getElementById('time').textContent = timeStr;
// Simulate uptime (just for demo)
const uptimeElement = document.getElementById('uptime');
const uptimeText = uptimeElement.textContent;
const [h, m, s] = uptimeText.split(':').map(Number);
let newS = s + 1;
let newM = m;
let newH = h;
if (newS >= 60) {
newS = 0;
newM += 1;
}
if (newM >= 60) {
newM = 0;
newH += 1;
}
uptimeElement.textContent = `${String(newH).padStart(2, '0')}:${String(newM).padStart(2, '0')}:${String(newS).padStart(2, '0')}`;
}
setInterval(updateTime, 1000);
// Simulate system metrics
function updateSystemMetrics() {
// CPU
const cpuUsage = Math.min(100, Math.floor(Math.random() * 30) + 20);
document.getElementById('cpu-usage').textContent = `${cpuUsage}%`;
document.getElementById('cpu-bar').style.width = `${cpuUsage}%`;
// RAM
const ramUsage = Math.min(100, Math.floor(Math.random() * 40) + 30);
document.getElementById('ram-usage').textContent = `${ramUsage}%`;
document.getElementById('ram-bar').style.width = `${ramUsage}%`;
// GPU
const gpuUsage = Math.min(100, Math.floor(Math.random() * 50) + 10);
document.getElementById('gpu-usage').textContent = `${gpuUsage}%`;
document.getElementById('gpu-bar').style.width = `${gpuUsage}%`;
// Sensors
document.getElementById('cpu-temp').textContent = `${Math.floor(Math.random() * 10) + 40}°C`;
document.getElementById('cpu-fan').textContent = `${Math.floor(Math.random() * 500) + 1000} RPM`;
document.getElementById('gpu-temp').textContent = `${Math.floor(Math.random() * 15) + 50}°C`;
document.getElementById('gpu-fan').textContent = `${Math.floor(Math.random() * 800) + 1500} RPM`;
// Network
document.getElementById('net-up').textContent = `${Math.floor(Math.random() * 500) + 100} KB/s`;
document.getElementById('net-down').textContent = `${Math.floor(Math.random() * 2000) + 500} KB/s`;
document.getElementById('net-ping').textContent = `${Math.floor(Math.random() * 10) + 10} ms`;
// Process count
document.getElementById('process-count').textContent = Math.floor(Math.random() * 20) + 40;
}
setInterval(updateSystemMetrics, 2000);
// Generate random processes
function generateProcesses() {
const processes = [
{ name: 'systemd', pid: 1, cpu: Math.floor(Math.random() * 5) },
{ name: 'kthreadd', pid: 2, cpu: Math.floor(Math.random() * 3) },
{ name: 'sshd', pid: 543, cpu: Math.floor(Math.random() * 2) },
{ name: 'bash', pid: 1234, cpu: Math.floor(Math.random() * 10) },
{ name: 'node', pid: 2345, cpu: Math.floor(Math.random() * 15) },
{ name: 'chrome', pid: 3456, cpu: Math.floor(Math.random() * 25) },
{ name: 'firefox', pid: 4567, cpu: Math.floor(Math.random() * 20) },
{ name: 'python', pid: 5678, cpu: Math.floor(Math.random() * 8) },
{ name: 'docker', pid: 6789, cpu: Math.floor(Math.random() * 12) },
{ name: 'mysqld', pid: 7890, cpu: Math.floor(Math.random() * 7) }
];
const processList = document.getElementById('process-list');
processList.innerHTML = '';
processes.forEach(proc => {
const procElement = document.createElement('div');
procElement.className = 'flex justify-between';
procElement.innerHTML = `
<span class="w-1/2 truncate">${proc.name}</span>
<span class="w-1/4 text-right">${proc.pid}</span>
<span class="w-1/4 text-right">${proc.cpu}%</span>
`;
processList.appendChild(procElement);
});
}
setInterval(generateProcesses, 5000);
generateProcesses();
// Terminal functionality
const terminalInput = document.getElementById('terminal-input');
const terminalOutput = document.getElementById('terminal-output');
const terminalCursor = document.getElementById('terminal-cursor');
// Blink cursor
setInterval(() => {
terminalCursor.style.visibility = terminalCursor.style.visibility === 'hidden' ? 'visible' : 'hidden';
}, 500);
// Command history
const commandHistory = [];
let historyIndex = -1;
// Available commands
const commands = {
help: {
description: 'Show available commands',
execute: () => {
let output = 'Available commands:\n';
for (const cmd in commands) {
output += `${cmd.padEnd(15)}${commands[cmd].description}\n`;
}
return output;
}
},
clear: {
description: 'Clear the terminal',
execute: () => {
terminalOutput.innerHTML = '';
return '';
}
},
ls: {
description: 'List directory contents',
execute: () => {
return 'bin dev etc home lib proc root sys usr var';
}
},
pwd: {
description: 'Print working directory',
execute: () => {
return '/home/user';
}
},
neofetch: {
description: 'Display system information',
execute: () => {
return `
user@edex
---------
OS: E-DEX UI Terminal
Host: Mainframe Alpha
Kernel: 5.15.0-76-generic
Uptime: ${document.getElementById('uptime').textContent}
CPU: Intel Xeon (8) @ 3.60GHz
Memory: ${document.getElementById('ram-usage').textContent} used
`;
}
},
date: {
description: 'Display current date and time',
execute: () => {
return new Date().toString();
}
},
echo: {
description: 'Display a line of text',
execute: (args) => {
return args.join(' ');
}
},
ping: {
description: 'Ping a host',
execute: (args) => {
if (args.length === 0) return 'Usage: ping <host>';
return `PING ${args[0]} (192.168.1.1) 56(84) bytes of data.
64 bytes from ${args[0]}: icmp_seq=1 ttl=64 time=1.23 ms
64 bytes from ${args[0]}: icmp_seq=2 ttl=64 time=0.87 ms
64 bytes from ${args[0]}: icmp_seq=3 ttl=64 time=1.05 ms
--- ${args[0]} ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 0.870/1.050/1.230/0.150 ms`;
}
},
pkg: {
description: 'Package management utility',
execute: (args) => {
if (args.length === 0) return 'Usage: pkg [install|remove|search|list] <package>';
const action = args[0];
const packageName = args[1];
switch(action) {
case 'install':
if (!packageName) return 'Error: Please specify a package to install';
return `Installing ${packageName}...\nDownloading package...\nInstalling dependencies...\n${packageName} successfully installed!`;
case 'remove':
if (!packageName) return 'Error: Please specify a package to remove';
return `Removing ${packageName}...\nCleaning up dependencies...\n${packageName} successfully removed!`;
case 'search':
if (!packageName) return 'Error: Please specify a search term';
return `Searching for ${packageName}...\nFound:\n- ${packageName}-core\n- ${packageName}-dev\n- ${packageName}-utils`;
case 'list':
return 'Installed packages:\npython-3.9.0\nnodejs-14.15.0\ngit-2.25.1\nvim-8.2\ncurl-7.68.0';
default:
return `Unknown pkg action: ${action}\nAvailable actions: install, remove, search, list`;
}
}
},
cd: {
description: 'Change directory',
execute: (args) => {
if (args.length === 0) return '/home/user';
return `Changed directory to ${args[0]}`;
}
},
mkdir: {
description: 'Create directory',
execute: (args) => {
if (args.length === 0) return 'Usage: mkdir <directory>';
return `Created directory ${args[0]}`;
}
},
touch: {
description: 'Create file',
execute: (args) => {
if (args.length === 0) return 'Usage: touch <filename>';
return `Created file ${args[0]}`;
}
},
cat: {
description: 'Display file contents',
execute: (args) => {
if (args.length === 0) return 'Usage: cat <filename>';
return `Contents of ${args[0]}:\nThis is sample file content.\nEdit this file to add your own content.`;
}
},
nano: {
description: 'Text editor',
execute: (args) => {
if (args.length === 0) return 'Usage: nano <filename>';
return `Opening ${args[0]} in nano editor...\n[Press Ctrl+X to exit]`;
}
},
sudo: {
description: 'Execute command as superuser',
execute: (args) => {
if (args.length === 0) return 'Usage: sudo <command>';
return `Executing '${args.join(' ')}' as root...\n[Password required]`;
}
},
apt: {
description: 'Advanced package tool',
execute: (args) => {
if (args.length === 0) return 'Usage: apt [install|remove|update|upgrade] <package>';
return commands.pkg.execute(args);
}
}
};
// Handle terminal input
terminalInput.addEventListener('keydown', (e) => {
if (e.key === 'Enter') {
e.preventDefault();
const input = terminalInput.value.trim();
terminalInput.value = '';
if (input) {
commandHistory.push(input);
historyIndex = commandHistory.length;
// Add input to output
const inputElement = document.createElement('div');
inputElement.className = 'mb-2';
inputElement.textContent = `user@edex:~$ ${input}`;
terminalOutput.appendChild(inputElement);
// Process command
const [command, ...args] = input.split(' ');
let output = '';
if (commands[command]) {
output = commands[command].execute(args);
} else {
output = `Command not found: ${command}\nType 'help' for available commands`;
}
if (output) {
const outputElement = document.createElement('div');
outputElement.className = 'mb-2 whitespace-pre-wrap';
outputElement.textContent = output;
terminalOutput.appendChild(outputElement);
}
// Scroll to bottom
terminalOutput.scrollTop = terminalOutput.scrollHeight;
}
} else if (e.key === 'ArrowUp') {
e.preventDefault();
if (commandHistory.length > 0 && historyIndex > 0) {
historyIndex--;
terminalInput.value = commandHistory[historyIndex];
}
} else if (e.key === 'ArrowDown') {
e.preventDefault();
if (historyIndex < commandHistory.length - 1) {
historyIndex++;
terminalInput.value = commandHistory[historyIndex];
} else {
historyIndex = commandHistory.length;
terminalInput.value = '';
}
}
});
// Initial help message
setTimeout(() => {
const helpElement = document.createElement('div');
helpElement.className = 'mb-2';
helpElement.textContent = commands.help.execute();
terminalOutput.appendChild(helpElement);
}, 500);
// Simulate connection status changes
setInterval(() => {
const statuses = [
'CONNECTED TO: MAINFRAME_ALPHA',
'SYNCING DATA...',
'SECURE CONNECTION ESTABLISHED',
'ENCRYPTION: AES-256',
'LINK QUALITY: EXCELLENT'
];
const randomStatus = statuses[Math.floor(Math.random() * statuses.length)];
document.getElementById('connection-status').textContent = randomStatus;
}, 5000);
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=sentus096/edex" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>