286 lines
5.5 KiB
CSS
286 lines
5.5 KiB
CSS
/*
|
|
Theme tokens, the Inter font, the page base and the page header come from
|
|
@ipp/core's theme.css. The rest follows Immich's own upload UI: the
|
|
placeholder after its EmptyPlaceholder, the panel and rows after
|
|
UploadPanel and UploadAssetPreview, the overlay after
|
|
DragAndDropUploadOverlay (immich-app/immich web/src, 2026-10).
|
|
*/
|
|
|
|
#upload-main {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 24px;
|
|
max-width: 720px;
|
|
padding: 12px var(--gutter) 48px;
|
|
}
|
|
|
|
button {
|
|
font: inherit;
|
|
color: inherit;
|
|
}
|
|
|
|
/* ===== Placeholder: click or drop to add photos ===== */
|
|
|
|
.upload-placeholder {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
width: 100%;
|
|
padding: 48px 20px;
|
|
border: 1px solid color-mix(in srgb, var(--color-fg) 10%, transparent);
|
|
border-radius: 24px;
|
|
background: var(--color-subtle);
|
|
cursor: pointer;
|
|
transition: background-color 0.15s;
|
|
}
|
|
|
|
.upload-placeholder:hover,
|
|
.upload-placeholder:focus-visible {
|
|
background: color-mix(in srgb, var(--color-primary) 5%, var(--color-subtle));
|
|
outline: none;
|
|
}
|
|
|
|
html.dark .upload-placeholder:hover,
|
|
html.dark .upload-placeholder:focus-visible {
|
|
background: color-mix(in srgb, var(--color-primary) 25%, var(--color-subtle));
|
|
}
|
|
|
|
.upload-placeholder-icon {
|
|
width: 72px;
|
|
height: 72px;
|
|
color: var(--color-primary);
|
|
}
|
|
|
|
.upload-placeholder-title {
|
|
margin-top: 8px;
|
|
font-size: 20px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.upload-placeholder-text {
|
|
font-weight: 300;
|
|
text-align: center;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
/* Nothing to drop on a touch screen */
|
|
@media (hover: none) {
|
|
.upload-drop-hint {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
/* ===== Upload panel ===== */
|
|
|
|
#upload-panel {
|
|
padding: 16px;
|
|
border: 1px solid color-mix(in srgb, var(--color-fg) 12%, transparent);
|
|
border-radius: 12px;
|
|
background: var(--color-subtle);
|
|
font-size: 14px;
|
|
}
|
|
|
|
#upload-panel[hidden] {
|
|
display: none;
|
|
}
|
|
|
|
#upload-progress {
|
|
margin: 0 0 4px;
|
|
font-weight: 500;
|
|
}
|
|
|
|
#upload-counts,
|
|
#upload-note {
|
|
margin: 0;
|
|
font-size: 12px;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
#upload-note {
|
|
margin-top: 4px;
|
|
}
|
|
|
|
#upload-note[hidden] {
|
|
display: none;
|
|
}
|
|
|
|
.upload-count-success { color: var(--color-success); }
|
|
.upload-count-danger { color: var(--color-danger); }
|
|
.upload-count-warning { color: var(--color-warning); }
|
|
|
|
#upload-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
max-height: 480px;
|
|
margin: 16px 0 0;
|
|
padding: 0;
|
|
overflow-y: auto;
|
|
list-style: none;
|
|
}
|
|
|
|
.upload-row {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
padding: 8px;
|
|
border: 1px solid color-mix(in srgb, var(--color-fg) 15%, transparent);
|
|
border-radius: 12px;
|
|
background: color-mix(in srgb, var(--color-primary) 10%, transparent);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.upload-row-line {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.upload-row-icon {
|
|
display: flex;
|
|
flex: 0 0 auto;
|
|
width: 24px;
|
|
height: 24px;
|
|
color: var(--color-primary);
|
|
}
|
|
|
|
.upload-row-icon svg {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.upload-row[data-state="started"] .upload-row-icon svg {
|
|
animation: upload-spin 1s linear infinite;
|
|
}
|
|
|
|
.upload-row[data-state="done"] .upload-row-icon { color: var(--color-success); }
|
|
.upload-row[data-state="duplicate"] .upload-row-icon { color: var(--color-warning); }
|
|
.upload-row[data-state="error"] .upload-row-icon { color: var(--color-danger); }
|
|
|
|
.upload-row-name {
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.upload-row-action {
|
|
display: flex;
|
|
flex: 0 0 auto;
|
|
width: 28px;
|
|
height: 28px;
|
|
padding: 4px;
|
|
border: none;
|
|
border-radius: 50%;
|
|
background: transparent;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.upload-row-action:hover,
|
|
.upload-row-action:focus-visible {
|
|
background: color-mix(in srgb, var(--color-fg) 10%, transparent);
|
|
outline: none;
|
|
}
|
|
|
|
.upload-row-action svg {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
/* Progress bar with its text on top, as Immich draws it */
|
|
.upload-bar {
|
|
position: relative;
|
|
height: 18px;
|
|
margin-top: 5px;
|
|
border-radius: 6px;
|
|
background: rgb(209 213 219);
|
|
overflow: hidden;
|
|
}
|
|
|
|
html.dark .upload-bar {
|
|
background: rgb(55 65 81);
|
|
}
|
|
|
|
.upload-bar-fill {
|
|
height: 100%;
|
|
border-radius: 6px;
|
|
background: rgb(var(--immich-primary));
|
|
transition: width 0.2s linear;
|
|
}
|
|
|
|
.upload-bar-text {
|
|
position: absolute;
|
|
inset: 0;
|
|
margin: 0;
|
|
color: #fff;
|
|
font-size: 10px;
|
|
line-height: 18px;
|
|
text-align: center;
|
|
}
|
|
|
|
.upload-row-error {
|
|
margin: 0;
|
|
color: var(--color-danger);
|
|
}
|
|
|
|
@keyframes upload-spin {
|
|
to { transform: rotate(360deg); }
|
|
}
|
|
|
|
/* ===== Drop overlay ===== */
|
|
|
|
#upload-drop {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 200;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: rgb(243 244 246 / 0.9);
|
|
color: rgb(var(--immich-dark-gray));
|
|
pointer-events: none;
|
|
}
|
|
|
|
html.dark #upload-drop {
|
|
background: rgb(var(--immich-dark-bg) / 0.9);
|
|
color: rgb(var(--immich-gray));
|
|
}
|
|
|
|
#upload-drop[hidden] {
|
|
display: none;
|
|
}
|
|
|
|
.upload-drop-icon {
|
|
width: 128px;
|
|
height: 128px;
|
|
margin: 64px;
|
|
color: var(--color-primary);
|
|
animation: upload-bounce 1s infinite;
|
|
}
|
|
|
|
#upload-drop p {
|
|
margin: 0;
|
|
font-size: 24px;
|
|
}
|
|
|
|
/* Tailwind's animate-bounce, which Immich uses on its overlay */
|
|
@keyframes upload-bounce {
|
|
0%, 100% {
|
|
transform: translateY(-25%);
|
|
animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
|
|
}
|
|
50% {
|
|
transform: none;
|
|
animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.upload-drop-icon,
|
|
.upload-row[data-state="started"] .upload-row-icon svg {
|
|
animation: none;
|
|
}
|
|
}
|