2015-02-07 06:41:59 +08:00
|
|
|
@import "ui-variables";
|
|
|
|
@import "ui-mixins";
|
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
.file-wrap {
|
2015-06-12 02:52:49 +08:00
|
|
|
cursor: default;
|
2015-02-07 06:41:59 +08:00
|
|
|
display: inline-block;
|
|
|
|
position: relative;
|
2015-03-04 04:24:48 +08:00
|
|
|
font-size: @font-size-small;
|
2015-07-16 04:15:05 +08:00
|
|
|
margin: 0 0 @spacing-standard @spacing-standard;
|
2015-06-26 22:42:41 +08:00
|
|
|
width: calc(~"50% - 23px");
|
2015-09-01 05:56:07 +08:00
|
|
|
min-width: 320px;
|
2015-07-16 04:15:05 +08:00
|
|
|
-webkit-user-drag: element;
|
2015-02-07 06:41:59 +08:00
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
.inner {
|
2016-03-22 09:22:20 +08:00
|
|
|
border-radius: 2px;
|
2015-11-10 10:52:24 +08:00
|
|
|
color: @text-color;
|
2015-07-16 04:15:05 +08:00
|
|
|
background: @background-off-primary;
|
2016-03-22 09:22:20 +08:00
|
|
|
height: 37px;
|
2015-06-26 22:42:41 +08:00
|
|
|
}
|
|
|
|
|
2016-03-24 08:15:55 +08:00
|
|
|
.file-info-wrap {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
padding-left: @spacing-half + 1;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
border: solid 1px rgba(0, 0, 0, 0.09);
|
|
|
|
border-right: none;
|
|
|
|
|
|
|
|
.file-icon {
|
|
|
|
margin-right: 10px;
|
|
|
|
flex-shrink:0;
|
|
|
|
}
|
|
|
|
.file-name {
|
|
|
|
font-weight: @font-weight-medium;
|
|
|
|
flex: 1;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
max-width: 235px;
|
|
|
|
}
|
|
|
|
.file-size {
|
|
|
|
@file-size-color: #b8b8b8;
|
|
|
|
|
|
|
|
margin-left: auto;
|
|
|
|
margin-right: @spacing-three-quarters;
|
|
|
|
color: @file-size-color;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.file-action-icon {
|
|
|
|
@file-icon-color: #c7c7c7;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
flex-shrink: 0;
|
|
|
|
margin-left: auto;
|
|
|
|
padding-top: 1px;
|
|
|
|
height: 100%;
|
|
|
|
width: 37px;
|
|
|
|
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.09);
|
|
|
|
|
|
|
|
img {
|
|
|
|
background-color: @file-icon-color;
|
2015-07-16 04:15:05 +08:00
|
|
|
}
|
2016-03-24 08:15:55 +08:00
|
|
|
|
|
|
|
&:hover img {
|
|
|
|
background-color: darken(@file-icon-color, 20%);
|
|
|
|
}
|
|
|
|
&:active {
|
|
|
|
background-color: darken(@btn-default-bg-color, 5%);
|
2016-03-22 09:22:20 +08:00
|
|
|
}
|
2015-06-18 07:03:50 +08:00
|
|
|
}
|
|
|
|
|
2015-06-12 02:52:49 +08:00
|
|
|
&.file-upload {
|
2015-07-16 04:15:05 +08:00
|
|
|
.file-name {
|
2015-06-12 02:52:49 +08:00
|
|
|
color: @text-color-very-subtle;
|
|
|
|
.uploading {
|
|
|
|
color: @text-color;
|
|
|
|
}
|
2015-02-07 06:41:59 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
.progress-bar-wrap {
|
|
|
|
display: none;
|
2015-02-07 06:41:59 +08:00
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
&.state-downloading, &.state-started, &.state-progress {
|
|
|
|
display: block;
|
2015-06-12 02:52:49 +08:00
|
|
|
}
|
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
&.state-completed, &.state-success {
|
2015-06-12 02:52:49 +08:00
|
|
|
display: block;
|
2015-07-16 04:15:05 +08:00
|
|
|
.progress-foreground { background: @background-color-success; }
|
2015-06-12 02:52:49 +08:00
|
|
|
}
|
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
&.state-aborted, &.state-failed {
|
2015-06-12 02:52:49 +08:00
|
|
|
display: block;
|
2015-07-16 04:15:05 +08:00
|
|
|
.progress-foreground { background: @background-color-error; }
|
2015-06-12 02:52:49 +08:00
|
|
|
}
|
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
.progress-foreground {
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
bottom: 0;
|
|
|
|
height: 2px;
|
|
|
|
width: 0; // Changed by React
|
|
|
|
z-index: 3;
|
|
|
|
display: block;
|
2016-03-16 01:57:43 +08:00
|
|
|
background: @blue-light;
|
2015-07-16 04:15:05 +08:00
|
|
|
border-bottom-left-radius:4px;
|
2015-07-18 09:28:18 +08:00
|
|
|
transition: width .3s linear;
|
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
}
|
|
|
|
.progress-background {
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
bottom: 0;
|
|
|
|
height: 2px;
|
|
|
|
width: 100%;
|
|
|
|
z-index: 2;
|
2015-06-12 02:52:49 +08:00
|
|
|
display: block;
|
2016-03-16 01:57:43 +08:00
|
|
|
background: @background-color-pending;
|
2015-07-16 04:15:05 +08:00
|
|
|
border-bottom-left-radius:4px;
|
|
|
|
border-bottom-right-radius:4px;
|
2015-06-12 02:52:49 +08:00
|
|
|
}
|
2015-02-07 06:41:59 +08:00
|
|
|
}
|
|
|
|
|
2015-06-12 02:52:49 +08:00
|
|
|
}
|
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
.file-wrap.file-image-wrap {
|
2015-06-12 02:52:49 +08:00
|
|
|
position: relative;
|
|
|
|
text-align: center;
|
2015-06-20 02:31:27 +08:00
|
|
|
display:inline-block;
|
|
|
|
vertical-align: top;
|
|
|
|
margin-bottom: @spacing-standard;
|
|
|
|
margin-right: @spacing-standard;
|
2015-06-20 10:29:59 +08:00
|
|
|
margin-left: @spacing-standard;
|
2015-07-16 04:15:05 +08:00
|
|
|
width: initial;
|
|
|
|
max-width: calc(~"100% - 30px");
|
2015-02-07 06:41:59 +08:00
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
.progress-foreground,
|
|
|
|
.progress-foreground {
|
2015-06-12 02:52:49 +08:00
|
|
|
bottom: -2px;
|
|
|
|
}
|
2015-07-16 04:15:05 +08:00
|
|
|
.progress-background {
|
2015-06-12 02:52:49 +08:00
|
|
|
bottom: -2px;
|
|
|
|
}
|
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
.file-action-icon, .file-name-container, .file-name {
|
|
|
|
display: none;
|
2015-06-18 07:03:50 +08:00
|
|
|
}
|
2016-04-27 05:03:08 +08:00
|
|
|
.file-action-icon:active {
|
|
|
|
background: none;
|
|
|
|
-webkit-filter: brightness(95%);
|
|
|
|
}
|
|
|
|
|
2015-06-12 02:52:49 +08:00
|
|
|
&:hover {
|
2015-07-16 04:15:05 +08:00
|
|
|
.file-action-icon, .file-name-container, .file-name {
|
2015-06-12 02:52:49 +08:00
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
.file-action-icon {
|
2015-06-12 02:52:49 +08:00
|
|
|
position: absolute;
|
|
|
|
z-index: 2;
|
2015-06-18 07:03:50 +08:00
|
|
|
right: -8px;
|
|
|
|
top: -8px;
|
2015-06-12 02:52:49 +08:00
|
|
|
width: 26px;
|
|
|
|
border-radius: 0 0 0 3px;
|
2016-03-24 08:15:55 +08:00
|
|
|
box-shadow: none;
|
2016-03-22 09:22:20 +08:00
|
|
|
img {
|
|
|
|
background: none;
|
|
|
|
}
|
2015-06-12 02:52:49 +08:00
|
|
|
}
|
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
.file-preview {
|
2015-06-12 02:52:49 +08:00
|
|
|
position: relative;
|
|
|
|
z-index: 1;
|
2015-06-20 02:31:27 +08:00
|
|
|
overflow: hidden;
|
2015-06-18 07:03:50 +08:00
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
.file-name-container {
|
|
|
|
cursor: default;
|
2015-06-18 07:03:50 +08:00
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
top: 0;
|
|
|
|
z-index: 2;
|
|
|
|
width: 100%;
|
2015-06-20 02:31:27 +08:00
|
|
|
height:100%;
|
|
|
|
min-height:300px;
|
|
|
|
background: linear-gradient(to top, rgba(0,0,0,0.75) 0%,rgba(0,0,0,0) 23%);
|
|
|
|
vertical-align:bottom;
|
|
|
|
|
2015-07-16 04:15:05 +08:00
|
|
|
// Important! file-name-container is on top of the image and prevents you from dragging it.
|
|
|
|
pointer-events: none;
|
|
|
|
|
|
|
|
.file-name {
|
2015-06-20 02:31:27 +08:00
|
|
|
color: @white;
|
|
|
|
left: @spacing-standard;
|
2015-07-16 04:15:05 +08:00
|
|
|
right: @spacing-standard;
|
2015-06-20 02:31:27 +08:00
|
|
|
bottom: @spacing-standard;
|
2015-07-16 04:15:05 +08:00
|
|
|
text-align:left;
|
2015-06-20 02:31:27 +08:00
|
|
|
position: absolute;
|
|
|
|
z-index: 3;
|
|
|
|
}
|
2015-06-18 07:03:50 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
img {
|
|
|
|
position: relative;
|
|
|
|
z-index: 1;
|
|
|
|
max-width: 100%;
|
2015-06-20 02:31:27 +08:00
|
|
|
background: url(../static/images/attachments/transparency-background.png) top left repeat;
|
2016-03-22 09:22:20 +08:00
|
|
|
background-size: 8px;
|
2015-06-18 07:03:50 +08:00
|
|
|
}
|
2015-02-07 06:41:59 +08:00
|
|
|
}
|
2015-06-18 07:03:50 +08:00
|
|
|
|
2015-02-07 06:41:59 +08:00
|
|
|
}
|
2015-10-22 11:32:33 +08:00
|
|
|
|
|
|
|
body.platform-win32 {
|
|
|
|
.file-wrap {
|
|
|
|
.inner {
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|