chore: migrate frontend assets to OSS and same-origin APIs

This commit is contained in:
2026-06-04 16:03:49 +08:00
parent 7c6129555b
commit c7c52c1467
55 changed files with 728 additions and 292 deletions
+70 -29
View File
@@ -596,14 +596,27 @@ textarea.image-workbench-prompt {
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
color: var(--fg-dim);
gap: 12px;
width: 100%;
height: 100%;
color: var(--fg-muted);
font-size: 14px;
}
.image-workbench-empty .anticon {
font-size: 32px;
opacity: 0.5;
font-size: 40px;
opacity: 0.35;
}
.image-workbench-empty strong {
font-size: 18px;
color: var(--fg-body, #eee);
}
.image-workbench-empty span {
max-width: 320px;
text-align: center;
line-height: 1.5;
}
.image-workbench-empty--button {
@@ -824,22 +837,24 @@ textarea.image-workbench-prompt {
.image-workbench-panel--right .image-workbench-result-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
gap: 8px;
margin-top: 8px;
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
gap: 10px;
margin-top: 10px;
}
.image-workbench-result-thumb {
display: block;
overflow: hidden;
border-radius: 6px;
border-radius: 8px;
border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.08));
aspect-ratio: 1;
transition: border-color 0.15s;
transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.image-workbench-result-thumb:hover {
border-color: var(--accent, #2dd4bf);
transform: scale(1.04);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.image-workbench-result-thumb img {
@@ -1598,30 +1613,30 @@ textarea.image-workbench-prompt {
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
gap: 14px;
width: 100%;
height: 100%;
color: var(--fg-muted);
}
.image-workbench-generating strong {
font-size: 20px;
font-size: 22px;
color: var(--fg-default);
}
.image-workbench-progress-bar {
width: 320px;
height: 8px;
border-radius: 4px;
width: min(420px, 80%);
height: 10px;
border-radius: 5px;
background: var(--bg-inset);
overflow: hidden;
}
.image-workbench-progress-fill {
height: 100%;
border-radius: 4px;
background: var(--accent);
transition: width 0.3s ease;
border-radius: 5px;
background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 70%, white));
transition: width 0.35s ease;
}
.image-workbench-cancel {
@@ -1642,30 +1657,30 @@ textarea.image-workbench-prompt {
}
.image-workbench-result-grid {
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: center;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
align-content: center;
justify-items: center;
width: 100%;
height: 100%;
margin: 0;
padding: 24px;
padding: 32px;
overflow-y: auto;
gap: 16px;
gap: 20px;
}
.image-workbench-result-item {
display: block;
border-radius: var(--radius-sm);
border-radius: var(--radius-md, 12px);
overflow: hidden;
border: 1px solid var(--border-weak);
transition: border-color 0.15s, box-shadow 0.15s;
transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}
.image-workbench-result-item:hover {
border-color: var(--accent);
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(var(--accent-rgb, 45, 212, 191), 0.1);
transform: translateY(-2px);
}
.image-workbench-result-item img {
@@ -1674,20 +1689,26 @@ textarea.image-workbench-prompt {
height: auto;
object-fit: contain;
background: var(--bg-inset);
transition: transform 300ms ease;
}
.image-workbench-result-item:hover img {
transform: scale(1.02);
}
.image-workbench-result-card {
display: grid;
min-width: 0;
width: min(100%, 500px);
width: 100%;
max-width: 560px;
align-content: start;
gap: 12px;
gap: 14px;
}
.image-workbench-result-actions {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
gap: 10px;
}
.image-workbench-result-actions button {
@@ -1735,3 +1756,23 @@ textarea.image-workbench-prompt {
opacity: 0.6;
cursor: not-allowed;
}
/* Result card entrance animation */
@keyframes image-workbench-result-enter {
from {
opacity: 0;
transform: translateY(12px) scale(0.97);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}
.image-workbench-result-card {
animation: image-workbench-result-enter 0.4s ease-out both;
}
.image-workbench-result-card:nth-child(2) { animation-delay: 0.08s; }
.image-workbench-result-card:nth-child(3) { animation-delay: 0.16s; }
.image-workbench-result-card:nth-child(4) { animation-delay: 0.24s; }