fix: move credentials and comment inside card, right below icon

This commit is contained in:
2026-04-28 12:16:02 +00:00
parent b9d13733c9
commit b06620a793
2 changed files with 31 additions and 34 deletions
+11 -14
View File
@@ -350,14 +350,14 @@ button {
gap: 0;
}
.svc-credentials {
background: linear-gradient(135deg, #f0f6fc 0%, #e8f2f9 100%);
background: linear-gradient(135deg, #edf5fc 0%, #e2eff8 100%);
border: 1px solid #c7d9ea;
border-top: none;
border-radius: 0 0 12px 12px;
padding: 0.55rem 0.85rem 0.65rem;
border-radius: 8px;
padding: 0.5rem 0.75rem 0.55rem;
margin: 0.65rem 0 0.1rem;
display: flex;
flex-direction: column;
gap: 0.35rem;
gap: 0.3rem;
}
.svc-cred-row {
display: flex;
@@ -614,9 +614,8 @@ button {
backdrop-filter: blur(3px);
}
.dashboard-page .svc-credentials {
background: rgba(224, 240, 252, 0.7);
border-color: rgba(180, 210, 235, 0.6);
backdrop-filter: blur(3px);
background: rgba(210, 232, 248, 0.55);
border-color: rgba(180, 210, 235, 0.5);
}
@@ -716,9 +715,8 @@ button {
border: 1px solid rgba(198, 218, 235, 0.9) !important;
}
.dashboard-page .svc-credentials {
backdrop-filter: none !important;
background: rgba(232, 244, 253, 0.95) !important;
border-color: rgba(180, 210, 235, 0.9) !important;
background: rgba(220, 238, 252, 0.9) !important;
border-color: rgba(180, 210, 235, 0.85) !important;
}
.dashboard-page .panel {
width: 100%;
@@ -890,6 +888,5 @@ button {
.tile-comment del { text-decoration: line-through; color: #7a9aaf; }
.tile-comment input[type=checkbox] { margin-right: 0.3em; }
.tile-wrap:has(.svc-credentials) .tile {
border-radius: 12px 12px 0 0;
}
.svc-credentials + .tile-comment { margin-top: 0.5rem; }
+20 -20
View File
@@ -82,11 +82,29 @@
<div class="tile-icon-box">
<img class="tile-icon" src="{{ service.icon_path or '/static/service-placeholder.svg' }}" alt="icon" />
</div>
<h3>{{ service.name }}</h3>
<p>Открыть сервис</p>
{% if service.svc_login or service.svc_password %}
<div class="svc-credentials" onclick="event.preventDefault();event.stopPropagation()">
{% if service.svc_login %}
<div class="svc-cred-row">
<span class="svc-cred-label">Логин</span>
<span class="svc-cred-value">{{ service.svc_login }}</span>
<button class="svc-cred-copy" type="button" data-copy="{{ service.svc_login }}" title="Копировать логин"></button>
</div>
{% endif %}
{% if service.svc_password %}
<div class="svc-cred-row">
<span class="svc-cred-label">Пароль</span>
<span class="svc-cred-value svc-cred-masked">{{ service.svc_password }}</span>
<button class="svc-cred-copy" type="button" data-copy="{{ service.svc_password }}" title="Копировать пароль"></button>
</div>
{% endif %}
</div>
{% endif %}
{% if service.comment %}
<small class="tile-comment">{{ service_comment_html.get(service.id, '') }}</small>
{% endif %}
<h3>{{ service.name }}</h3>
<p>Открыть сервис</p>
{% if svc_cats %}
<div class="service-categories">
{% for category in svc_cats %}
@@ -95,24 +113,6 @@
</div>
{% endif %}
</a>
{% if service.svc_login or service.svc_password %}
<div class="svc-credentials">
{% if service.svc_login %}
<div class="svc-cred-row">
<span class="svc-cred-label">Логин</span>
<span class="svc-cred-value">{{ service.svc_login }}</span>
<button class="svc-cred-copy" type="button" data-copy="{{ service.svc_login }}" title="Копировать логин">&#xe92c;</button>
</div>
{% endif %}
{% if service.svc_password %}
<div class="svc-cred-row">
<span class="svc-cred-label">Пароль</span>
<span class="svc-cred-value svc-cred-masked">{{ service.svc_password }}</span>
<button class="svc-cred-copy" type="button" data-copy="{{ service.svc_password }}" title="Копировать пароль">&#xe92c;</button>
</div>
{% endif %}
</div>
{% endif %}
</div>
{% else %}
<div class="tile">