Files
SHiNE-server/shine-UI/styles/components/attachments.css
T
qandClaude Opus 5.5 f8900e531a UI: новый общий стиль, тёмная/светлая тема, настраиваемая палитра
- styles/main.css: роли цветов (по умолчанию «Индиго»), шкала отступов/скруглений/шрифтов,
  цвета отношений для обеих тем; жёсткие цвета в стилях заменены на роли.
- Палитра: пресеты и личные правки, «Оформление» Авто/День/Ночь, долгое нажатие —
  редактор цветов с экспортом/импортом.
- Каналы: пузыри постов автора, плашки дней, строка «Написать в канал…», «О канале»,
  создание канала с адресом из названия; лента открывается на свежих постах.
- Чаты: плоский список, чипы-фильтры, пузыри, плашки дней; нижняя панель скрыта в переписке.
- Корневые разделы — единая шапка; профиль и чужой профиль — общая карточка;
  настройки, кошелёк, сеансы — меню-списки.
- Нижняя панель: иконки без подписей, бейджи на иконках.
- confirmDialog вместо window.confirm/alert; на телефоне диалоги — шторки снизу.
- docs/UI-Design/ISSUES-for-dev.md — найденные ошибки сервера/UI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-26 10:05:26 +03:00

653 lines
13 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-download {
display: inline-flex;
align-items: center;
min-height: 44px;
background: var(--accent);
border-radius: 999px;
color: var(--on-accent);
font-size: 0.82rem;
font-weight: 700;
padding: 0.45rem 0.75rem;
position: relative;
text-decoration: none;
width: max-content;
z-index: 3;
}
.message-attachment-media-frame > .message-attachment-download {
bottom: 0.5rem;
position: absolute;
right: 0.5rem;
}
.message-attachment-download--icon {
width: 36px;
min-height: 36px;
height: 36px;
padding: 0;
justify-content: center;
border-radius: 50%;
color: #fff;
background: rgba(0, 0, 0, 0.45);
backdrop-filter: blur(6px);
-webkit-backdrop-filter: blur(6px);
}
.message-attachment-download--icon svg { width: 18px; height: 18px; }
.message-attachment-download--icon:hover { background: rgba(0, 0, 0, 0.6); }
.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);
}
.message-attachment-file-card .message-attachment-download {
grid-column: 1 / -1;
}
}
.ar-attachment-manager-root .modal { z-index: 120; }
.attachment-viewer-modal {
z-index: 80;
}
.attachment-viewer-card {
background: var(--surface);
border: 1px solid var(--border-subtle);
border-radius: 1.2rem;
box-shadow: none;
color: var(--text-primary);
display: grid;
gap: 0.8rem;
max-height: 92vh;
max-width: min(94vw, 68rem);
padding: 0.9rem;
width: 100%;
}
.attachment-viewer-head,
.attachment-viewer-actions {
align-items: center;
display: flex;
gap: 0.8rem;
justify-content: space-between;
}
.attachment-viewer-title {
font-weight: 800;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.attachment-viewer-body {
align-items: center;
display: grid;
justify-items: center;
min-height: 12rem;
}
.attachment-viewer-media {
background: var(--background);
border-radius: 0.8rem;
max-height: 76vh;
max-width: 100%;
object-fit: contain;
}
.ar-attachment-manager-card {
max-width: min(92vw, 34rem);
gap: 16px;
}
.ar-attachment-manager-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ar-attachment-manager-close { width: 44px; min-width: 44px; padding: 0; font-size: 18px; color: var(--text-secondary); }
.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: 4px 16px; }
.ar-attachment-link { min-height: 44px; padding: 0; justify-self: start; color: var(--accent); background: transparent; font-weight: 500; }
.ar-attachment-file-picker {
min-height: 56px;
padding: 8px;
display: flex;
align-items: center;
gap: 12px;
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: 40px;
padding: 0 14px;
display: inline-flex;
align-items: center;
border-radius: 10px;
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;
}