Add password validation with i18n support and GitHub button improvements
- Add password field to UserUpdate schema for password change on edit - Implement password validation in update_user endpoint - Add i18n translations for password validation errors (ru/en) - Update SecurityService.validate_password to support language parameter - Add GitHub icon and repository name 'pvemanager' to header button - Fix internal server error when updating user password - Clean up hardcoded translations in frontend
This commit is contained in:
@@ -549,6 +549,55 @@ header h2 {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* GitHub Button */
|
||||
.github-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 7px 16px;
|
||||
border-radius: var(--radius-md);
|
||||
border: 1px solid var(--border-default);
|
||||
background: var(--bg-surface);
|
||||
color: var(--text-primary);
|
||||
text-decoration: none;
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
transition: all var(--transition-fast);
|
||||
white-space: nowrap;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.github-btn:hover {
|
||||
background: var(--bg-surface-elevated);
|
||||
color: var(--text-primary);
|
||||
border-color: var(--text-muted);
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.github-star-icon {
|
||||
flex-shrink: 0;
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.github-btn:hover .github-star-icon {
|
||||
opacity: 1;
|
||||
color: #fbbf24;
|
||||
}
|
||||
|
||||
.github-text {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.github-stars {
|
||||
font-variant-numeric: tabular-nums;
|
||||
min-width: 30px;
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
padding-left: 8px;
|
||||
border-left: 1px solid var(--border-default);
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
Main Content
|
||||
============================================ */
|
||||
@@ -1625,6 +1674,21 @@ table tr:hover {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
/* Compact GitHub button on very small screens */
|
||||
.github-btn {
|
||||
padding: 7px 10px;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.github-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.github-stars {
|
||||
font-size: 0.75rem;
|
||||
padding-left: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
|
||||
@@ -32,6 +32,15 @@ const translations = {
|
||||
language_changed: "Язык изменён. Страница будет перезагружена...",
|
||||
error_occurred: "Произошла ошибка",
|
||||
confirm_delete: "Вы уверены, что хотите удалить?",
|
||||
|
||||
// Updates
|
||||
update_check_disabled: "Проверка обновлений отключена",
|
||||
checking_updates: "Проверка обновлений...",
|
||||
check_updates: "Проверить обновления",
|
||||
update_available: "Доступно обновление",
|
||||
no_updates: "Установлена последняя версия",
|
||||
update_warning: "Панель будет недоступна во время обновления",
|
||||
updating_system: "Обновление системы...",
|
||||
},
|
||||
|
||||
en: {
|
||||
@@ -62,6 +71,15 @@ const translations = {
|
||||
language_changed: "Language changed. Page will reload...",
|
||||
error_occurred: "An error occurred",
|
||||
confirm_delete: "Are you sure you want to delete?",
|
||||
|
||||
// Updates
|
||||
update_check_disabled: "Update check is disabled",
|
||||
checking_updates: "Checking for updates...",
|
||||
check_updates: "Check for Updates",
|
||||
update_available: "Update available",
|
||||
no_updates: "You have the latest version",
|
||||
update_warning: "Panel will be unavailable during update",
|
||||
updating_system: "Updating system...",
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user