feat: add AWS media resource management

This commit is contained in:
Codex
2026-05-08 23:40:42 +08:00
parent bf28e37ae5
commit 4e226e7eda
51 changed files with 6796 additions and 199 deletions
+594
View File
@@ -1323,7 +1323,601 @@ html[data-theme] .eversolo-admin-avatar-menu__link {
color: #2f241b;
}
html[data-theme] .aws-media-upload-field {
display: grid;
gap: 8px;
}
html[data-theme] .aws-media-upload-field__controls {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
html[data-theme] .aws-media-upload-field__file {
display: none;
}
html[data-theme] .aws-media-upload-field__button {
border: 1px solid rgba(84, 60, 34, 0.18);
border-radius: 8px;
background: #2f241b;
color: #fff9f1;
cursor: pointer;
font-size: 12px;
font-weight: 700;
line-height: 1;
padding: 10px 12px;
}
html[data-theme] .aws-media-upload-field__button--secondary {
background: rgba(84, 60, 34, 0.07);
color: #2f241b;
}
html[data-theme] .aws-media-upload-field__button:disabled {
cursor: not-allowed;
opacity: 0.52;
}
html[data-theme] .aws-media-upload-field__progress {
height: 6px;
overflow: hidden;
border-radius: 999px;
background: rgba(84, 60, 34, 0.1);
}
html[data-theme] .aws-media-upload-field__progress span {
display: block;
height: 100%;
border-radius: inherit;
background: #816244;
transition: width 180ms ease;
}
html[data-theme] .aws-media-upload-field__status {
margin: 0;
font-size: 12px;
line-height: 1.5;
}
html[data-theme] .aws-media-upload-field__status--info {
color: rgba(47, 36, 27, 0.68);
}
html[data-theme] .aws-media-upload-field__status--success {
color: #2d6a3e;
}
html[data-theme] .aws-media-upload-field__status--error {
color: #8f2d25;
}
html[data-theme] .aws-media-resources {
display: grid;
gap: 18px;
padding: 32px;
color: #2f241b;
}
html[data-theme] .aws-media-resources__header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 20px;
}
html[data-theme] .aws-media-resources__header h1 {
margin: 0;
font-size: 32px;
font-weight: 700;
letter-spacing: 0;
}
html[data-theme] .aws-media-resources__header p {
max-width: 720px;
margin: 8px 0 0;
color: rgba(47, 36, 27, 0.68);
line-height: 1.6;
}
html[data-theme] .aws-media-resources__eyebrow {
margin: 0 0 6px;
color: rgba(47, 36, 27, 0.58);
font-size: 11px;
font-weight: 800;
letter-spacing: 0.12em;
text-transform: uppercase;
}
html[data-theme] .aws-media-resources__toolbar {
display: grid;
grid-template-columns: minmax(180px, 440px) auto;
gap: 10px;
align-items: center;
}
html[data-theme] .aws-media-resources__toolbar input {
min-height: 40px;
border: 1px solid rgba(84, 60, 34, 0.18);
border-radius: 8px;
background: #fff;
color: #2f241b;
padding: 0 12px;
}
html[data-theme] .aws-media-resources__batch-upload {
display: grid;
grid-template-columns: minmax(220px, 440px) auto;
align-items: end;
gap: 10px;
max-width: 680px;
border: 1px solid rgba(84, 60, 34, 0.12);
border-radius: 8px;
background: rgba(255, 253, 249, 0.72);
padding: 12px;
}
html[data-theme] .aws-media-resources__batch-upload label {
display: block;
margin-bottom: 6px;
color: rgba(47, 36, 27, 0.68);
font-size: 12px;
font-weight: 800;
}
html[data-theme] .aws-media-resources__batch-upload select {
width: 100%;
min-height: 40px;
border: 1px solid rgba(84, 60, 34, 0.18);
border-radius: 8px;
background: #fff;
color: #2f241b;
padding: 0 12px;
}
html[data-theme] .aws-media-resources__file-input {
display: none;
}
html[data-theme] .aws-media-resources__button,
html[data-theme] .aws-media-resources__actions button,
html[data-theme] .aws-media-resources__pagination button,
html[data-theme] .aws-media-resources__modal-header button,
html[data-theme] .aws-media-resources__preview-chip,
html[data-theme] .aws-media-resources__queue-header button,
html[data-theme] .aws-media-resources__queue-controls button,
html[data-theme] .aws-media-resources__queue-bubble {
min-height: 34px;
border: 1px solid rgba(84, 60, 34, 0.18);
border-radius: 8px;
background: #2f241b;
color: #fff9f1;
cursor: pointer;
font-size: 12px;
font-weight: 700;
padding: 8px 10px;
}
html[data-theme] .aws-media-resources__button:disabled,
html[data-theme] .aws-media-resources__actions button:disabled,
html[data-theme] .aws-media-resources__pagination button:disabled,
html[data-theme] .aws-media-resources__queue-controls button:disabled {
cursor: not-allowed;
opacity: 0.48;
}
html[data-theme] .aws-media-resources__status {
margin: 0;
border-radius: 8px;
padding: 10px 12px;
font-size: 13px;
}
html[data-theme] .aws-media-resources__status--info {
background: rgba(84, 60, 34, 0.08);
color: rgba(47, 36, 27, 0.72);
}
html[data-theme] .aws-media-resources__status--success {
background: rgba(45, 106, 62, 0.1);
color: #2d6a3e;
}
html[data-theme] .aws-media-resources__status--error {
background: rgba(143, 45, 37, 0.1);
color: #8f2d25;
}
html[data-theme] .aws-media-resources__table-wrap {
overflow-x: auto;
border: 1px solid rgba(84, 60, 34, 0.12);
border-radius: 8px;
background: #fff;
}
html[data-theme] .aws-media-resources__table {
width: 100%;
min-width: 1080px;
border-collapse: collapse;
}
html[data-theme] .aws-media-resources__table th,
html[data-theme] .aws-media-resources__table td {
border-bottom: 1px solid rgba(84, 60, 34, 0.1);
padding: 12px;
text-align: left;
vertical-align: middle;
}
html[data-theme] .aws-media-resources__table th {
background: rgba(84, 60, 34, 0.06);
color: rgba(47, 36, 27, 0.68);
font-size: 12px;
font-weight: 800;
}
html[data-theme] .aws-media-resources__thumb-button {
width: 76px;
height: 52px;
overflow: hidden;
border: 1px solid rgba(84, 60, 34, 0.14);
border-radius: 8px;
background: rgba(84, 60, 34, 0.05);
cursor: pointer;
padding: 0;
}
html[data-theme] .aws-media-resources__thumb-button img {
width: 100%;
height: 100%;
object-fit: cover;
}
html[data-theme] .aws-media-resources__file-chip {
display: inline-flex;
align-items: center;
min-height: 28px;
border-radius: 8px;
background: rgba(84, 60, 34, 0.08);
color: rgba(47, 36, 27, 0.68);
font-size: 12px;
font-weight: 700;
padding: 0 10px;
}
html[data-theme] .aws-media-resources__filename {
max-width: 280px;
overflow-wrap: anywhere;
font-weight: 700;
}
html[data-theme] .aws-media-resources__key {
max-width: 360px;
margin-top: 4px;
color: rgba(47, 36, 27, 0.52);
font-size: 12px;
overflow-wrap: anywhere;
}
html[data-theme] .aws-media-resources__actions {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
html[data-theme] .aws-media-resources__actions button {
background: rgba(84, 60, 34, 0.07);
color: #2f241b;
}
html[data-theme] .aws-media-resources__actions .aws-media-resources__danger {
background: #8f2d25;
color: #fff;
}
html[data-theme] .aws-media-resources__asset-relations {
display: grid;
gap: 10px;
min-width: 230px;
}
html[data-theme] .aws-media-resources__asset-relation {
display: grid;
grid-template-columns: 34px minmax(0, 1fr);
align-items: start;
gap: 8px;
}
html[data-theme] .aws-media-resources__asset-locale {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 24px;
border-radius: 6px;
background: rgba(84, 60, 34, 0.08);
color: rgba(47, 36, 27, 0.68);
font-size: 11px;
font-weight: 800;
}
html[data-theme] .aws-media-resources__asset-link {
display: inline-flex;
max-width: 220px;
overflow: hidden;
color: #2f241b;
font-size: 13px;
font-weight: 800;
text-decoration: underline;
text-overflow: ellipsis;
white-space: nowrap;
}
html[data-theme] .aws-media-resources__asset-create {
display: grid;
gap: 6px;
min-width: 150px;
}
html[data-theme] .aws-media-resources__asset-create span {
overflow: hidden;
color: rgba(47, 36, 27, 0.58);
font-size: 12px;
text-overflow: ellipsis;
white-space: nowrap;
}
html[data-theme] .aws-media-resources__asset-create button {
width: fit-content;
min-height: 30px;
border: 1px solid rgba(84, 60, 34, 0.18);
border-radius: 8px;
background: rgba(84, 60, 34, 0.07);
color: #2f241b;
cursor: pointer;
font-size: 12px;
font-weight: 800;
padding: 6px 9px;
}
html[data-theme] .aws-media-resources__asset-create button:disabled {
cursor: not-allowed;
opacity: 0.52;
}
html[data-theme] .aws-media-resources__pagination {
display: flex;
align-items: center;
justify-content: flex-end;
gap: 8px;
}
html[data-theme] .aws-media-resources__pagination span {
margin-right: 6px;
color: rgba(47, 36, 27, 0.62);
font-size: 13px;
}
html[data-theme] .aws-media-resources__modal {
position: fixed;
z-index: 50;
inset: 0;
display: grid;
place-items: center;
padding: 24px;
}
html[data-theme] .aws-media-resources__modal-backdrop {
position: absolute;
inset: 0;
border: 0;
background: rgba(15, 12, 9, 0.68);
cursor: pointer;
}
html[data-theme] .aws-media-resources__modal-panel {
position: relative;
z-index: 1;
display: grid;
gap: 12px;
width: min(980px, 100%);
max-height: min(760px, calc(100vh - 48px));
overflow: hidden;
border-radius: 8px;
background: #fff;
padding: 14px;
}
html[data-theme] .aws-media-resources__modal-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
html[data-theme] .aws-media-resources__modal-header strong {
overflow-wrap: anywhere;
}
html[data-theme] .aws-media-resources__modal-panel img,
html[data-theme] .aws-media-resources__modal-panel video {
width: 100%;
max-height: calc(100vh - 150px);
background: #111;
object-fit: contain;
}
html[data-theme] .aws-media-resources__queue {
position: fixed;
right: 22px;
bottom: 22px;
z-index: 60;
width: min(520px, calc(100vw - 32px));
overflow: hidden;
border: 1px solid rgba(84, 60, 34, 0.14);
border-radius: 8px;
background: rgba(255, 253, 249, 0.96);
box-shadow: 0 18px 48px rgba(38, 26, 16, 0.18);
}
html[data-theme] .aws-media-resources__queue--collapsed {
width: auto;
border: 0;
background: transparent;
box-shadow: none;
}
html[data-theme] .aws-media-resources__queue-bubble {
min-height: 42px;
padding: 10px 14px;
box-shadow: 0 12px 28px rgba(38, 26, 16, 0.18);
}
html[data-theme] .aws-media-resources__queue-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
border-bottom: 1px solid rgba(84, 60, 34, 0.1);
padding: 12px;
}
html[data-theme] .aws-media-resources__queue-header strong {
font-size: 14px;
}
html[data-theme] .aws-media-resources__queue-header button {
min-height: 30px;
background: rgba(84, 60, 34, 0.08);
color: #2f241b;
}
html[data-theme] .aws-media-resources__queue-list {
display: grid;
gap: 8px;
max-height: min(520px, calc(100vh - 160px));
overflow: auto;
padding: 10px 12px 12px;
}
html[data-theme] .aws-media-resources__queue-item {
display: grid;
grid-template-columns: minmax(0, 1fr) auto;
gap: 8px 10px;
border-radius: 8px;
background: rgba(84, 60, 34, 0.06);
padding: 10px;
}
html[data-theme] .aws-media-resources__queue-item strong,
html[data-theme] .aws-media-resources__queue-item span {
display: block;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
html[data-theme] .aws-media-resources__queue-item strong {
font-size: 13px;
}
html[data-theme] .aws-media-resources__queue-item span,
html[data-theme] .aws-media-resources__queue-item small {
color: rgba(47, 36, 27, 0.62);
font-size: 12px;
}
html[data-theme] .aws-media-resources__queue-item dl {
display: grid;
gap: 4px;
margin: 8px 0 0;
}
html[data-theme] .aws-media-resources__queue-item dl div {
display: grid;
grid-template-columns: 54px minmax(0, 1fr);
gap: 8px;
}
html[data-theme] .aws-media-resources__queue-item dt,
html[data-theme] .aws-media-resources__queue-item dd {
min-width: 0;
margin: 0;
font-size: 11px;
line-height: 1.45;
}
html[data-theme] .aws-media-resources__queue-item dt {
color: rgba(47, 36, 27, 0.5);
font-weight: 700;
}
html[data-theme] .aws-media-resources__queue-item dd {
overflow: hidden;
color: rgba(47, 36, 27, 0.72);
text-overflow: ellipsis;
white-space: nowrap;
}
html[data-theme] .aws-media-resources__queue-item dd a {
color: #2f241b;
font-weight: 800;
text-decoration: underline;
}
html[data-theme] .aws-media-resources__queue-controls {
display: grid;
justify-items: end;
gap: 6px;
}
html[data-theme] .aws-media-resources__queue-controls button {
min-height: 28px;
background: rgba(84, 60, 34, 0.08);
color: #2f241b;
padding: 6px 8px;
}
html[data-theme] .aws-media-resources__queue-progress {
grid-column: 1 / -1;
height: 6px;
overflow: hidden;
border-radius: 999px;
background: rgba(84, 60, 34, 0.12);
}
html[data-theme] .aws-media-resources__queue-progress span {
display: block;
height: 100%;
border-radius: inherit;
background: #2d6a3e;
transition: width 0.18s ease;
}
@media (max-width: 520px) {
html[data-theme] .aws-media-resources {
padding: 20px;
}
html[data-theme] .aws-media-resources__header {
display: grid;
}
html[data-theme] .aws-media-resources__toolbar {
grid-template-columns: 1fr;
}
html[data-theme] .aws-media-resources__batch-upload {
grid-template-columns: 1fr;
}
html[data-theme] .aws-media-resources__queue {
right: 12px;
bottom: 12px;
width: calc(100vw - 24px);
}
html[data-theme] .eversolo-captcha-field__row {
grid-template-columns: 1fr;
}