mirror of
https://github.com/go-gitea/gitea.git
synced 2026-09-07 05:23:22 +09:00
enhance(web): show attachment URL and UUID in dropzone preview (#39203)
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
co-authored by
wxiaoguang
parent
eb501f6b19
commit
bde1af541c
@@ -1,4 +1,5 @@
|
||||
.ui .field .dropzone {
|
||||
/* because dropzone css is imported after our css, so use double class selector to override dropzone styles */
|
||||
.dropzone.dropzone {
|
||||
border: 2px dashed var(--color-secondary);
|
||||
background: none;
|
||||
box-shadow: none;
|
||||
@@ -7,16 +8,62 @@
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.ui .field .dropzone .dz-message {
|
||||
.dropzone.dropzone .dz-message {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
.dropzone .dz-button {
|
||||
color: var(--color-text-light) !important;
|
||||
.dropzone.dropzone .dz-preview .dz-success-mark svg,
|
||||
.dropzone.dropzone .dz-preview .dz-error-mark svg {
|
||||
fill: currentcolor;
|
||||
}
|
||||
|
||||
.dropzone:hover .dz-button {
|
||||
color: var(--color-text) !important;
|
||||
.dropzone.dropzone .dz-preview .dz-progress {
|
||||
/* by default the progress-bar is vertically centered (top: 50%), it's better to put it after the "details (size, filename)",
|
||||
then the layout from top to bottom is: size, filename, progress */
|
||||
top: 7em;
|
||||
}
|
||||
|
||||
.dropzone .dz-default.dz-message .dz-button {
|
||||
color: var(--color-text-light);
|
||||
}
|
||||
|
||||
.dropzone .dz-default.dz-message .dz-button:hover {
|
||||
color: var(--color-text);
|
||||
}
|
||||
|
||||
.dz-custom-buttons {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: var(--gap-block);
|
||||
margin-top: var(--gap-block);
|
||||
}
|
||||
|
||||
.dz-custom-buttons button {
|
||||
background: transparent;
|
||||
color: var(--color-text-light);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.dz-custom-buttons button:hover {
|
||||
color: var(--color-primary);
|
||||
}
|
||||
|
||||
.dropzone a.dz-filename,
|
||||
.dropzone a.dz-filename *,
|
||||
.dz-custom-buttons button {
|
||||
cursor: pointer !important; /* override ".dz-clickable *" */
|
||||
}
|
||||
|
||||
.dropzone .dz-filename span[data-dz-name] {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.dropzone .dz-filename span[data-dz-name]:hover {
|
||||
display: inline-block;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.dropzone .dz-error-message {
|
||||
@@ -27,7 +74,11 @@
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
border-radius: 0 !important;
|
||||
border-radius: var(--border-radius) !important;
|
||||
}
|
||||
|
||||
.dropzone .dz-file-preview .dz-image {
|
||||
background: var(--color-secondary-bg) !important;
|
||||
}
|
||||
|
||||
.dropzone .dz-image img {
|
||||
@@ -51,9 +102,3 @@
|
||||
.dropzone .dz-preview:hover .dz-image img {
|
||||
filter: opacity(0.5) !important;
|
||||
}
|
||||
|
||||
.ui .field .dropzone .dz-preview .dz-progress {
|
||||
/* by default the progress-bar is vertically centered (top: 50%), it's better to put it after the "details (size, filename)",
|
||||
then the layout from top to bottom is: size, filename, progress */
|
||||
top: 7em;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user