162 lines
5.6 KiB
HTML
162 lines
5.6 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Настройки — Bitmine</title>
|
|
<style>
|
|
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
background: #f5f5f5;
|
|
padding: 20px;
|
|
}
|
|
.container { max-width: 600px; margin: 0 auto; }
|
|
h1 { color: #333; margin-bottom: 20px; }
|
|
.card {
|
|
background: white;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
|
padding: 24px;
|
|
}
|
|
.form-group { margin-bottom: 20px; }
|
|
label {
|
|
display: block;
|
|
margin-bottom: 8px;
|
|
font-weight: 500;
|
|
color: #333;
|
|
}
|
|
input[type="text"],
|
|
input[type="password"],
|
|
input[type="number"] {
|
|
width: 100%;
|
|
padding: 12px;
|
|
border: 1px solid #ddd;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
}
|
|
input:focus {
|
|
outline: none;
|
|
border-color: #007bff;
|
|
box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
|
|
}
|
|
.help-text {
|
|
font-size: 12px;
|
|
color: #666;
|
|
margin-top: 4px;
|
|
}
|
|
.btn {
|
|
background: #007bff;
|
|
color: white;
|
|
border: none;
|
|
padding: 12px 24px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
font-weight: 500;
|
|
}
|
|
.btn:hover { background: #0056b3; }
|
|
.btn-secondary {
|
|
background: #6c757d;
|
|
margin-left: 10px;
|
|
}
|
|
.btn-secondary:hover { background: #545b62; }
|
|
.error {
|
|
background: #ffebee;
|
|
color: #c62828;
|
|
padding: 16px;
|
|
border-radius: 8px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.success {
|
|
background: #e8f5e9;
|
|
color: #388e3c;
|
|
padding: 16px;
|
|
border-radius: 8px;
|
|
margin-bottom: 20px;
|
|
}
|
|
.back-link {
|
|
display: inline-block;
|
|
margin-bottom: 20px;
|
|
color: #007bff;
|
|
text-decoration: none;
|
|
}
|
|
.back-link:hover { text-decoration: underline; }
|
|
.security-note {
|
|
background: #fff3e0;
|
|
border-left: 4px solid #f57c00;
|
|
padding: 12px;
|
|
margin-top: 20px;
|
|
font-size: 13px;
|
|
color: #e65100;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="container">
|
|
<a href="/" class="back-link">← Назад к списку задач</a>
|
|
|
|
<h1>⚙️ Настройки подключения</h1>
|
|
|
|
<div class="card">
|
|
{% if error.is_some() %}
|
|
<div class="error">{{ error.as_ref().unwrap() }}</div>
|
|
{% endif %}
|
|
|
|
{% if success.is_some() %}
|
|
<div class="success">{{ success.as_ref().unwrap() }}</div>
|
|
{% endif %}
|
|
|
|
<form method="POST" action="/settings">
|
|
<div class="form-group">
|
|
<label for="redmine_url">Redmine URL</label>
|
|
<input
|
|
type="text"
|
|
id="redmine_url"
|
|
name="redmine_url"
|
|
value="{{ redmine_url }}"
|
|
placeholder="https://redmine.example.com"
|
|
required
|
|
>
|
|
<div class="help-text">Полный URL вашего Redmine, например: https://redmine.company.com</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="redmine_api_key">API Key</label>
|
|
<input
|
|
type="password"
|
|
id="redmine_api_key"
|
|
name="redmine_api_key"
|
|
value=""
|
|
placeholder="Ваш API ключ из настроек Redmine"
|
|
required
|
|
>
|
|
<div class="help-text">Ключ можно получить в Настройки → Мой аккаунт → API access key</div>
|
|
</div>
|
|
|
|
<div class="form-group">
|
|
<label for="redmine_user_id">User ID</label>
|
|
<input
|
|
type="number"
|
|
id="redmine_user_id"
|
|
name="redmine_user_id"
|
|
value="{{ redmine_user_id }}"
|
|
placeholder="7"
|
|
required
|
|
>
|
|
<div class="help-text">Ваш ID пользователя в Redmine (видно в профиле или URL)</div>
|
|
</div>
|
|
|
|
<button type="submit" class="btn">💾 Сохранить настройки</button>
|
|
<a href="/" class="btn btn-secondary">Отмена</a>
|
|
</form>
|
|
|
|
<div class="security-note">
|
|
🔒 <strong>Безопасность:</strong> Ваши учётные данные хранятся только в сессии браузера и не сохраняются на сервере.
|
|
При закрытии браузера сессия истекает и данные удаляются.
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|