Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- index.html +112 -107
index.html
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="tr">
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
@@ -59,6 +60,7 @@
|
|
| 59 |
transform: translateY(50px);
|
| 60 |
opacity: 0;
|
| 61 |
}
|
|
|
|
| 62 |
to {
|
| 63 |
transform: translateY(0);
|
| 64 |
opacity: 1;
|
|
@@ -116,9 +118,23 @@
|
|
| 116 |
color: var(--gray);
|
| 117 |
}
|
| 118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
.form-control {
|
| 120 |
width: 100%;
|
| 121 |
-
padding: 12px
|
| 122 |
border: 2px solid var(--light);
|
| 123 |
border-radius: 8px;
|
| 124 |
font-size: 14px;
|
|
@@ -240,6 +256,37 @@
|
|
| 240 |
margin-right: 8px;
|
| 241 |
}
|
| 242 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 243 |
/* Main App Styles */
|
| 244 |
.app-container {
|
| 245 |
display: none;
|
|
@@ -458,6 +505,7 @@
|
|
| 458 |
opacity: 0;
|
| 459 |
transform: translateY(20px);
|
| 460 |
}
|
|
|
|
| 461 |
to {
|
| 462 |
opacity: 1;
|
| 463 |
transform: translateY(0);
|
|
@@ -564,6 +612,7 @@
|
|
| 564 |
from {
|
| 565 |
transform: translateX(100%);
|
| 566 |
}
|
|
|
|
| 567 |
to {
|
| 568 |
transform: translateX(0);
|
| 569 |
}
|
|
@@ -630,9 +679,16 @@
|
|
| 630 |
<p>Bu sistem kiralık bir yazılımdır. Lütfen giriş bilgilerinizi kullanın.</p>
|
| 631 |
</div>
|
| 632 |
|
| 633 |
-
<div class="
|
| 634 |
-
<i class="fas fa-
|
| 635 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 636 |
</div>
|
| 637 |
|
| 638 |
<div class="auth-tabs">
|
|
@@ -654,6 +710,7 @@
|
|
| 654 |
<div class="input-group">
|
| 655 |
<i class="fas fa-lock"></i>
|
| 656 |
<input type="password" class="form-control" id="loginPassword" required placeholder="Şifreniz">
|
|
|
|
| 657 |
</div>
|
| 658 |
</div>
|
| 659 |
<button type="submit" class="btn btn-primary">
|
|
@@ -689,6 +746,7 @@
|
|
| 689 |
<div class="input-group">
|
| 690 |
<i class="fas fa-lock"></i>
|
| 691 |
<input type="password" class="form-control" id="registerPassword" required placeholder="Şifreniz">
|
|
|
|
| 692 |
</div>
|
| 693 |
</div>
|
| 694 |
<div class="form-group">
|
|
@@ -696,6 +754,7 @@
|
|
| 696 |
<div class="input-group">
|
| 697 |
<i class="fas fa-lock"></i>
|
| 698 |
<input type="password" class="form-control" id="registerPasswordConfirm" required placeholder="Şifrenizi tekrar girin">
|
|
|
|
| 699 |
</div>
|
| 700 |
</div>
|
| 701 |
<button type="submit" class="btn btn-primary">
|
|
@@ -965,27 +1024,47 @@
|
|
| 965 |
<script>
|
| 966 |
// User Management System
|
| 967 |
let currentUser = null;
|
| 968 |
-
let users =
|
| 969 |
-
|
| 970 |
-
// Initialize
|
| 971 |
-
|
| 972 |
-
|
| 973 |
-
|
| 974 |
-
|
| 975 |
-
|
| 976 |
-
|
| 977 |
-
|
| 978 |
-
|
| 979 |
-
|
| 980 |
-
|
| 981 |
-
|
| 982 |
-
|
| 983 |
-
|
| 984 |
-
|
| 985 |
-
|
| 986 |
-
|
| 987 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 988 |
window.onload = function() {
|
|
|
|
|
|
|
| 989 |
const savedUser = localStorage.getItem('pencereProCurrentUser');
|
| 990 |
if (savedUser) {
|
| 991 |
currentUser = JSON.parse(savedUser);
|
|
@@ -1008,88 +1087,14 @@
|
|
| 1008 |
}
|
| 1009 |
}
|
| 1010 |
|
| 1011 |
-
function
|
| 1012 |
-
|
| 1013 |
-
|
| 1014 |
-
const username = document.getElementById('loginUsername').value.trim();
|
| 1015 |
-
const password = document.getElementById('loginPassword').value;
|
| 1016 |
|
| 1017 |
-
|
| 1018 |
-
|
| 1019 |
-
|
| 1020 |
-
|
| 1021 |
-
if (user) {
|
| 1022 |
-
if (user.status !== 'active') {
|
| 1023 |
-
showToast('Hesabınız devre dışı!', 'error');
|
| 1024 |
-
return;
|
| 1025 |
-
}
|
| 1026 |
-
|
| 1027 |
-
currentUser = user;
|
| 1028 |
-
localStorage.setItem('pencereProCurrentUser', JSON.stringify(user));
|
| 1029 |
-
showToast('Giriş başarılı!', 'success');
|
| 1030 |
-
showApp();
|
| 1031 |
} else {
|
| 1032 |
-
|
| 1033 |
-
|
| 1034 |
-
}
|
| 1035 |
-
|
| 1036 |
-
function handleRegister(event) {
|
| 1037 |
-
event.preventDefault();
|
| 1038 |
-
|
| 1039 |
-
const name = document.getElementById('registerName').value.trim();
|
| 1040 |
-
const username = document.getElementById('registerUsername').value.trim();
|
| 1041 |
-
const email = document.getElementById('registerEmail').value.trim();
|
| 1042 |
-
const password = document.getElementById('registerPassword').value;
|
| 1043 |
-
const passwordConfirm = document.getElementById('registerPasswordConfirm').value;
|
| 1044 |
-
|
| 1045 |
-
if (password !== passwordConfirm) {
|
| 1046 |
-
showToast('Şifreler eşleşmiyor!', 'error');
|
| 1047 |
-
return;
|
| 1048 |
-
}
|
| 1049 |
-
|
| 1050 |
-
if (users.find(u => u.username === username)) {
|
| 1051 |
-
showToast('Bu kullanıcı adı zaten kullanılıyor!', 'error');
|
| 1052 |
-
return;
|
| 1053 |
-
}
|
| 1054 |
-
|
| 1055 |
-
if (users.find(u => u.email === email)) {
|
| 1056 |
-
showToast('Bu e-posta zaten kayıtlı!', 'error');
|
| 1057 |
-
return;
|
| 1058 |
-
}
|
| 1059 |
-
|
| 1060 |
-
const newUser = {
|
| 1061 |
-
id: users.length + 1,
|
| 1062 |
-
username: username,
|
| 1063 |
-
email: email,
|
| 1064 |
-
name: name,
|
| 1065 |
-
password: password,
|
| 1066 |
-
role: 'user',
|
| 1067 |
-
status: 'active',
|
| 1068 |
-
createdAt: new Date().toISOString()
|
| 1069 |
-
};
|
| 1070 |
-
|
| 1071 |
-
users.push(newUser);
|
| 1072 |
-
localStorage.setItem('pencereProUsers', JSON.stringify(users));
|
| 1073 |
-
|
| 1074 |
-
showToast('Kayıt başarılı! Giriş yapabilirsiniz.', 'success');
|
| 1075 |
-
switchTab('login');
|
| 1076 |
-
|
| 1077 |
-
// Clear form
|
| 1078 |
-
document.getElementById('registerForm').reset();
|
| 1079 |
-
}
|
| 1080 |
-
|
| 1081 |
-
function showApp() {
|
| 1082 |
-
document.getElementById('loginContainer').style.display = 'none';
|
| 1083 |
-
document.getElementById('appContainer').style.display = 'block';
|
| 1084 |
-
|
| 1085 |
-
// Update user info in header
|
| 1086 |
-
document.getElementById('userName').textContent = currentUser.name;
|
| 1087 |
-
document.getElementById('userRole').textContent = currentUser.role === 'admin' ? 'Yönetici' : 'Kullanıcı';
|
| 1088 |
-
document.getElementById('userAvatar').textContent = currentUser.name.charAt(0).toUpperCase();
|
| 1089 |
-
|
| 1090 |
-
// Show/hide admin features
|
| 1091 |
-
if (currentUser.role === 'admin') {
|
| 1092 |
-
document.getElementById('usersNavItem').style.display = 'flex';
|
| 1093 |
-
}
|
| 1094 |
-
|
| 1095 |
-
//
|
|
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
<html lang="tr">
|
| 3 |
+
|
| 4 |
<head>
|
| 5 |
<meta charset="UTF-8">
|
| 6 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
| 60 |
transform: translateY(50px);
|
| 61 |
opacity: 0;
|
| 62 |
}
|
| 63 |
+
|
| 64 |
to {
|
| 65 |
transform: translateY(0);
|
| 66 |
opacity: 1;
|
|
|
|
| 118 |
color: var(--gray);
|
| 119 |
}
|
| 120 |
|
| 121 |
+
.input-group .toggle-password {
|
| 122 |
+
position: absolute;
|
| 123 |
+
right: 15px;
|
| 124 |
+
top: 50%;
|
| 125 |
+
transform: translateY(-50%);
|
| 126 |
+
color: var(--gray);
|
| 127 |
+
cursor: pointer;
|
| 128 |
+
transition: var(--transition);
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
.input-group .toggle-password:hover {
|
| 132 |
+
color: var(--primary);
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
.form-control {
|
| 136 |
width: 100%;
|
| 137 |
+
padding: 12px 45px 12px 45px;
|
| 138 |
border: 2px solid var(--light);
|
| 139 |
border-radius: 8px;
|
| 140 |
font-size: 14px;
|
|
|
|
| 256 |
margin-right: 8px;
|
| 257 |
}
|
| 258 |
|
| 259 |
+
.demo-credentials {
|
| 260 |
+
background: #dbeafe;
|
| 261 |
+
border: 1px solid #60a5fa;
|
| 262 |
+
color: #1e40af;
|
| 263 |
+
padding: 12px;
|
| 264 |
+
border-radius: 8px;
|
| 265 |
+
margin-bottom: 20px;
|
| 266 |
+
font-size: 13px;
|
| 267 |
+
}
|
| 268 |
+
|
| 269 |
+
.demo-credentials .credential-item {
|
| 270 |
+
display: flex;
|
| 271 |
+
justify-content: space-between;
|
| 272 |
+
margin: 5px 0;
|
| 273 |
+
}
|
| 274 |
+
|
| 275 |
+
.demo-credentials .copy-btn {
|
| 276 |
+
background: var(--primary);
|
| 277 |
+
color: var(--white);
|
| 278 |
+
border: none;
|
| 279 |
+
padding: 2px 8px;
|
| 280 |
+
border-radius: 4px;
|
| 281 |
+
cursor: pointer;
|
| 282 |
+
font-size: 11px;
|
| 283 |
+
transition: var(--transition);
|
| 284 |
+
}
|
| 285 |
+
|
| 286 |
+
.demo-credentials .copy-btn:hover {
|
| 287 |
+
background: var(--primary-dark);
|
| 288 |
+
}
|
| 289 |
+
|
| 290 |
/* Main App Styles */
|
| 291 |
.app-container {
|
| 292 |
display: none;
|
|
|
|
| 505 |
opacity: 0;
|
| 506 |
transform: translateY(20px);
|
| 507 |
}
|
| 508 |
+
|
| 509 |
to {
|
| 510 |
opacity: 1;
|
| 511 |
transform: translateY(0);
|
|
|
|
| 612 |
from {
|
| 613 |
transform: translateX(100%);
|
| 614 |
}
|
| 615 |
+
|
| 616 |
to {
|
| 617 |
transform: translateX(0);
|
| 618 |
}
|
|
|
|
| 679 |
<p>Bu sistem kiralık bir yazılımdır. Lütfen giriş bilgilerinizi kullanın.</p>
|
| 680 |
</div>
|
| 681 |
|
| 682 |
+
<div class="demo-credentials">
|
| 683 |
+
<h4><i class="fas fa-key"></i> Demo Giriş Bilgileri:</h4>
|
| 684 |
+
<div class="credential-item">
|
| 685 |
+
<span><strong>Yönetici:</strong> admin / admin123</span>
|
| 686 |
+
<button class="copy-btn" onclick="copyCredentials('admin', 'admin123')">Kopyala</button>
|
| 687 |
+
</div>
|
| 688 |
+
<div class="credential-item">
|
| 689 |
+
<span><strong>Test Kullanıcı:</strong> test / test123</span>
|
| 690 |
+
<button class="copy-btn" onclick="copyCredentials('test', 'test123')">Kopyala</button>
|
| 691 |
+
</div>
|
| 692 |
</div>
|
| 693 |
|
| 694 |
<div class="auth-tabs">
|
|
|
|
| 710 |
<div class="input-group">
|
| 711 |
<i class="fas fa-lock"></i>
|
| 712 |
<input type="password" class="form-control" id="loginPassword" required placeholder="Şifreniz">
|
| 713 |
+
<i class="fas fa-eye toggle-password" onclick="togglePassword('loginPassword')"></i>
|
| 714 |
</div>
|
| 715 |
</div>
|
| 716 |
<button type="submit" class="btn btn-primary">
|
|
|
|
| 746 |
<div class="input-group">
|
| 747 |
<i class="fas fa-lock"></i>
|
| 748 |
<input type="password" class="form-control" id="registerPassword" required placeholder="Şifreniz">
|
| 749 |
+
<i class="fas fa-eye toggle-password" onclick="togglePassword('registerPassword')"></i>
|
| 750 |
</div>
|
| 751 |
</div>
|
| 752 |
<div class="form-group">
|
|
|
|
| 754 |
<div class="input-group">
|
| 755 |
<i class="fas fa-lock"></i>
|
| 756 |
<input type="password" class="form-control" id="registerPasswordConfirm" required placeholder="Şifrenizi tekrar girin">
|
| 757 |
+
<i class="fas fa-eye toggle-password" onclick="togglePassword('registerPasswordConfirm')"></i>
|
| 758 |
</div>
|
| 759 |
</div>
|
| 760 |
<button type="submit" class="btn btn-primary">
|
|
|
|
| 1024 |
<script>
|
| 1025 |
// User Management System
|
| 1026 |
let currentUser = null;
|
| 1027 |
+
let users = [];
|
| 1028 |
+
|
| 1029 |
+
// Initialize users with default accounts
|
| 1030 |
+
function initializeUsers() {
|
| 1031 |
+
const savedUsers = localStorage.getItem('pencereProUsers');
|
| 1032 |
+
|
| 1033 |
+
if (savedUsers) {
|
| 1034 |
+
users = JSON.parse(savedUsers);
|
| 1035 |
+
} else {
|
| 1036 |
+
// Create default users
|
| 1037 |
+
users = [
|
| 1038 |
+
{
|
| 1039 |
+
id: 1,
|
| 1040 |
+
username: 'admin',
|
| 1041 |
+
email: 'admin@pencerepro.com',
|
| 1042 |
+
name: 'Administrator',
|
| 1043 |
+
password: 'admin123',
|
| 1044 |
+
role: 'admin',
|
| 1045 |
+
status: 'active',
|
| 1046 |
+
createdAt: new Date().toISOString()
|
| 1047 |
+
},
|
| 1048 |
+
{
|
| 1049 |
+
id: 2,
|
| 1050 |
+
username: 'test',
|
| 1051 |
+
email: 'test@pencerepro.com',
|
| 1052 |
+
name: 'Test User',
|
| 1053 |
+
password: 'test123',
|
| 1054 |
+
role: 'user',
|
| 1055 |
+
status: 'active',
|
| 1056 |
+
createdAt: new Date().toISOString()
|
| 1057 |
+
}
|
| 1058 |
+
];
|
| 1059 |
+
localStorage.setItem('pencereProUsers', JSON.stringify(users));
|
| 1060 |
+
console.log('Default users created:', users);
|
| 1061 |
+
}
|
| 1062 |
+
}
|
| 1063 |
+
|
| 1064 |
+
// Initialize on page load
|
| 1065 |
window.onload = function() {
|
| 1066 |
+
initializeUsers();
|
| 1067 |
+
|
| 1068 |
const savedUser = localStorage.getItem('pencereProCurrentUser');
|
| 1069 |
if (savedUser) {
|
| 1070 |
currentUser = JSON.parse(savedUser);
|
|
|
|
| 1087 |
}
|
| 1088 |
}
|
| 1089 |
|
| 1090 |
+
function togglePassword(fieldId) {
|
| 1091 |
+
const field = document.getElementById(fieldId);
|
| 1092 |
+
const icon = field.nextElementSibling;
|
|
|
|
|
|
|
| 1093 |
|
| 1094 |
+
if (field.type === 'password') {
|
| 1095 |
+
field.type = 'text';
|
| 1096 |
+
icon.classList.remove('fa-eye');
|
| 1097 |
+
icon.classList.add('fa-eye-slash');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1098 |
} else {
|
| 1099 |
+
field.type = 'password';
|
| 1100 |
+
icon.classList.remove('
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|