Files
SHiNE-server/shine-UI/styles/components/attachments.css
T
qandClaude Opus 5.5 2e62616b46 UI v4: новый стиль по макету V3/V4 и доводка экранов
Палитра «Сияние» по умолчанию, новые роли цветов. Лента канала: плоские записи, ряд действий
с равным шагом иконок, дата у записи. Обсуждение со строкой ввода, личный чат, шторки.
Вход и регистрация: стартовый экран (надпись «СИЯНИЕ», сияние мандалы), настройки входа
со статусами серверов, статус логина в одну строку, вход с другого устройства (код, таймер, шаги),
сохранение ключей с переключателями. Корневые разделы – заголовок по центру; фильтр чатов –
переключатель; уведомления – список как в чатах; фото – просмотр на весь экран.
Общее: один зазор под шапкой (--page-top-gap), переключатели высотой с поле ввода,
второстепенные кнопки по одной роли (в том числе на экранах устройств и серверов),
иконки только из ui-icon.js, полоса прокрутки скрыта, среднее тире в текстах интерфейса.

Что нужно от сервера и разработчика – docs/UI-Design/UI-v4-for-dev.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 01:36:52 +03:00

564 lines
12 KiB
CSS

/* Shared attachment UI styles. */
.message-attachments {
display: grid;
gap: 0.5rem;
}
.message-attachment-carousel {
gap: 0.35rem;
margin: 0.5rem 0 0.4rem;
max-width: min(100%, 34rem);
}
.message-attachment-carousel-viewport {
align-items: center;
background: transparent;
border: 1px solid var(--border-subtle);
border-radius: 14px;
display: grid;
min-height: 12rem;
overflow: hidden;
position: relative;
touch-action: pan-y;
}
.message-attachment-carousel-viewport.has-landscape-media {
align-items: start;
min-height: 0;
}
.message-attachment-slide {
align-items: stretch;
display: grid;
min-height: 12rem;
}
.message-attachment-slide.has-landscape-media {
min-height: 0;
}
.message-attachment-arrow {
align-items: center;
border-radius: 999px;
cursor: pointer;
display: inline-flex;
font-size: 1.85rem;
height: 44px;
justify-content: center;
line-height: 1;
position: absolute;
top: 50%;
transform: translateY(-50%);
width: 44px;
z-index: 2;
}
.message-attachment-arrow[hidden] {
display: none;
}
.message-attachment-arrow:disabled {
cursor: default;
opacity: 0.28;
}
.message-attachment-arrow--prev {
left: 0.55rem;
}
.message-attachment-arrow--next {
right: 0.55rem;
}
.message-attachment-counter {
color: var(--text-secondary);
font-size: 0.78rem;
text-align: center;
}
.message-attachment-media-frame {
align-items: center;
background: var(--surface);
cursor: zoom-in;
display: grid;
min-height: 12rem;
overflow: hidden;
position: relative;
}
.message-attachment-media-frame.is-landscape {
min-height: 0;
}
.message-attachment-media {
display: block;
height: min(52vh, 20rem);
max-height: 20rem;
object-fit: contain;
width: 100%;
}
.message-attachment-media.is-landscape {
height: auto;
}
.message-attachment-play {
align-items: center;
background: var(--surface);
border: 1px solid var(--border-subtle);
border-radius: 999px;
color: var(--text-primary);
display: inline-flex;
font-size: 1.7rem;
height: 4rem;
justify-content: center;
left: 50%;
padding-left: 0.18rem;
position: absolute;
top: 50%;
transform: translate(-50%, -50%);
width: 4rem;
}
.message-attachment-media-frame:not(.is-loaded) { background: var(--surface-selected); animation: attachment-loading 1.2s ease-in-out infinite alternate; }
.message-attachment-media-frame.is-loaded { background: transparent; }
@keyframes attachment-loading { from { opacity: 1; } to { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .message-attachment-media-frame:not(.is-loaded) { animation: none; } }
.message-attachment-file-card {
align-items: center;
background: var(--surface);
border: 1px solid var(--border-subtle);
border-radius: 0.8rem;
color: var(--text-primary);
cursor: pointer;
display: grid;
gap: 0.55rem;
grid-template-columns: auto minmax(0, 1fr);
min-height: 3.25rem;
padding: 0.55rem 0.7rem;
}
.message-attachment-file-ext {
align-items: center;
background: var(--accent);
border-radius: 999px;
color: var(--on-accent);
display: inline-flex;
font-size: 0.72rem;
font-weight: 800;
height: 1.7rem;
justify-content: center;
min-width: 3.25rem;
padding: 0 0.55rem;
}
.message-attachment-file-main {
display: grid;
gap: 0.08rem;
min-width: 0;
}
.message-attachment-file-main .message-attachment-meta {
color: var(--text-secondary);
}
.message-attachment-unavailable {
align-items: center;
background: var(--surface);
color: var(--danger);
display: flex;
font-weight: 700;
justify-content: center;
min-height: 12rem;
padding: 1.25rem;
text-align: center;
}
.message-attachment-card {
align-items: center;
background: var(--surface);
border: 1px solid var(--border-subtle);
border-radius: 1rem;
color: var(--text-primary);
display: flex;
gap: 0.7rem;
padding: 0.75rem 0.85rem;
text-decoration: none;
}
.message-attachment-icon {
align-items: center;
background: var(--surface);
border-radius: 0.8rem;
color: var(--text-primary);
display: inline-flex;
flex: 0 0 auto;
height: 2.1rem;
justify-content: center;
width: 2.1rem;
}
.message-attachment-main {
display: grid;
min-width: 0;
}
.message-attachment-name {
font-weight: 700;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.message-attachment-meta {
color: var(--text-secondary);
font-size: 0.78rem;
overflow-wrap: anywhere;
}
@media (max-width: 640px) {
.message-attachment-carousel {
max-width: 100%;
}
.message-attachment-carousel-viewport,
.message-attachment-slide,
.message-attachment-media-frame,
.message-attachment-unavailable {
min-height: 10rem;
}
.message-attachment-media {
height: min(42vh, 16rem);
}
.message-attachment-file-card {
grid-template-columns: auto minmax(0, 1fr);
}
}
.ar-attachment-manager-root .modal { z-index: 120; }
.ar-attachment-manager-card {
max-width: min(92vw, 34rem);
gap: var(--space-3);
}
/* Пустые служебные блоки (сумма, превью, ошибка) не должны давать промежутков. */
.ar-attachment-manager-card :is(.ar-attachment-meta, .inline-error):empty,
.ar-attachment-manager-card [hidden] { display: none; }
.ar-attachment-manager-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ar-attachment-manager-close { display: grid; place-items: center; width: 44px; min-width: 44px; padding: 0; color: var(--text-secondary); }
.ar-attachment-manager-close svg { width: 20px; height: 20px; }
.ar-attachment-note { margin: 0; font-size: .8125rem; line-height: 1.25rem; color: var(--text-secondary); }
.ar-attachment-alt-sources { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); }
.ar-attachment-link { min-height: 36px; padding: 0; justify-self: start; color: var(--action); background: transparent; font-size: var(--text-sm); font-weight: var(--weight-medium); }
/* Та же высота, что у поля ввода (44), кнопка внутри – как в переключателе (34). */
.ar-attachment-file-picker {
min-height: var(--control-height);
padding: 4px;
display: flex;
align-items: center;
gap: var(--space-3);
border: 1px dashed var(--border-control);
border-radius: 12px;
background: var(--surface);
cursor: pointer;
}
.ar-attachment-file-picker:hover { border-color: var(--accent); }
.ar-attachment-file-picker:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ar-attachment-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.ar-attachment-file-btn {
flex-shrink: 0;
min-height: 34px;
padding: 0 14px;
display: inline-flex;
align-items: center;
border-radius: 8px;
font-size: var(--text-md);
color: var(--on-accent);
background: var(--accent);
font-weight: 600;
}
.ar-attachment-file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary); font-size: .875rem; }
.ar-attachment-summary { color: var(--text-primary); font-size: .875rem; }
.ar-attachment-ok { color: var(--success); font-weight: 600; }
.ar-attachment-details { color: var(--text-secondary); font-size: .8125rem; line-height: 1.25rem; }
.ar-attachment-details summary { min-height: 36px; display: flex; align-items: center; color: var(--accent); cursor: pointer; }
.ar-attachment-details > div { overflow-wrap: anywhere; }
.ar-attachment-manager-card--wide {
max-width: min(96vw, 58rem);
}
.ar-attachment-meta {
color: var(--text-secondary);
display: grid;
font-size: 0.86rem;
gap: 0.25rem;
overflow-wrap: anywhere;
}
.ar-attachment-wallet-select option { color: var(--text-primary); background: var(--surface); }
.ar-attachment-history-table-wrap {
max-height: 55vh;
overflow: auto;
}
.ar-attachment-history-table {
border-collapse: collapse;
font-size: 0.84rem;
min-width: 48rem;
width: 100%;
}
.ar-attachment-history-table th,
.ar-attachment-history-table td {
border-bottom: 1px solid var(--border-subtle);
padding: 0.55rem;
text-align: left;
vertical-align: top;
}
.ar-attachment-history-table th {
color: var(--text-secondary);
font-weight: 700;
}
.ar-attachment-history-tiles {
align-content: start;
box-sizing: border-box;
display: grid;
gap: 0.28rem;
grid-auto-rows: min-content;
max-height: 58vh;
max-width: 100%;
min-width: 0;
overflow-x: hidden;
overflow-y: auto;
padding: 0.35rem;
scrollbar-color: var(--border-control) var(--border-subtle);
scrollbar-width: thin;
width: 100%;
}
.ar-attachment-history-tiles::-webkit-scrollbar {
display: block;
height: 4px;
width: 4px;
}
.ar-attachment-history-tiles::-webkit-scrollbar-track {
background: var(--border-subtle);
}
.ar-attachment-history-tiles::-webkit-scrollbar-thumb {
background: var(--border-control);
border-radius: 999px;
}
.ar-attachment-history-tiles::-webkit-scrollbar-thumb:hover {
background: var(--border-control);
}
.ar-attachment-history-tile {
background: var(--surface);
border: 1px solid transparent;
border-radius: 0.52rem;
box-sizing: border-box;
color: var(--text-primary);
display: grid;
gap: 0.12rem;
max-width: 100%;
min-width: 0;
overflow: hidden;
padding: 0.28rem 0.42rem;
width: 100%;
}
.ar-attachment-history-tile.is-selected {
border-color: var(--success);
box-shadow: none;
}
.ar-attachment-history-tile--page {
box-shadow: none;
}
.ar-attachment-history-tile--with-preview {
gap: 0.32rem;
padding: 0.42rem;
}
.ar-attachment-history-preview {
align-items: flex-end;
background: var(--border-subtle);
border-radius: 0.42rem;
display: flex;
justify-content: space-between;
min-height: 7rem;
overflow: hidden;
position: relative;
}
.ar-attachment-history-preview-image {
display: block;
height: 100%;
object-fit: cover;
width: 100%;
}
.ar-attachment-history-preview-badge {
background: var(--surface);
border: 1px solid var(--border-subtle);
border-radius: 999px;
bottom: 0.42rem;
color: var(--text-primary);
font-size: 0.6875rem;
left: 0.42rem;
padding: 0.2rem 0.46rem;
position: absolute;
}
.ar-attachment-history-tile-head {
align-items: flex-start;
display: flex;
gap: 0.65rem;
justify-content: space-between;
}
.ar-attachment-history-name {
display: block;
font-size: 0.78rem;
line-height: 1.08;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ar-attachment-history-tile-head strong {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ar-attachment-history-meta-row {
align-items: center;
color: var(--text-secondary);
display: flex;
flex-wrap: wrap;
font-size: 0.6875rem;
gap: 0.22rem;
line-height: 1.05;
min-width: 0;
}
.ar-attachment-history-txid {
background: var(--border-subtle);
border-radius: 0.34rem;
color: var(--text-secondary);
font-size: 0.6875rem;
line-height: 1.05;
max-width: 100%;
min-width: 0;
overflow: hidden;
padding: 0.14rem 0.24rem;
text-overflow: ellipsis;
white-space: nowrap;
}
.ar-attachment-status {
border-radius: 999px;
flex: 0 0 auto;
font-size: 0.6875rem;
font-weight: 800;
line-height: 1;
padding: 0.2rem 0.32rem;
}
.ar-attachment-status--available {
background: var(--surface-selected);
color: var(--success);
}
.ar-attachment-status--pending {
background: var(--surface-selected);
color: var(--warning);
}
.ar-attachment-status--unavailable {
background: var(--surface-selected);
color: var(--danger);
}
.ar-attachment-placement-flag {
background: var(--surface-selected);
border-radius: 999px;
color: var(--accent);
flex: 0 0 auto;
font-size: 0.6875rem;
font-weight: 800;
line-height: 1;
padding: 0.2rem 0.32rem;
}