diff --git a/src/Squidex/app/features/assets/pages/asset.component.html b/src/Squidex/app/features/assets/pages/asset.component.html
index 056377cbf..91669dc4b 100644
--- a/src/Squidex/app/features/assets/pages/asset.component.html
+++ b/src/Squidex/app/features/assets/pages/asset.component.html
@@ -1,12 +1,21 @@
-
-
![]()
+
+
{{fileType}}
+
+
+
![]()
+
\ No newline at end of file
diff --git a/src/Squidex/app/features/assets/pages/asset.component.scss b/src/Squidex/app/features/assets/pages/asset.component.scss
index 1cb4dbd71..54771de50 100644
--- a/src/Squidex/app/features/assets/pages/asset.component.scss
+++ b/src/Squidex/app/features/assets/pages/asset.component.scss
@@ -3,6 +3,9 @@
$card-size: 240px;
+$color-type-background: #000;
+$color-type-foreground: #fff;
+
:host {
padding-bottom: 1rem;
}
@@ -14,12 +17,38 @@ $card-size: 240px;
&-block {
padding: .8rem .8rem 0;
+ position: relative;
}
&-footer {
border: 0;
+ background: transparent;
+ padding: .8rem;
+ padding-top: .4rem;
+ }
+}
+
+.file {
+ &-info {
font-size: .8rem;
+ }
+
+ &-name {
+ @include truncate;
+ font-size: 1rem;
font-weight: normal;
- padding: .8rem;
+ line-height: 2rem;
+ }
+
+ &-type {
+ @include absolute(1.1rem, auto, auto, 1.1rem);
+ @include border-radius(2px);
+ @include opacity(.8);
+ background: $color-type-background;
+ border: 0;
+ padding: .1rem .3rem;
+ font-size: .8rem;
+ font-weight: normal;
+ color: $color-type-foreground;
}
}
\ No newline at end of file
diff --git a/src/Squidex/app/features/assets/pages/asset.component.ts b/src/Squidex/app/features/assets/pages/asset.component.ts
index e4570eafb..31c419099 100644
--- a/src/Squidex/app/features/assets/pages/asset.component.ts
+++ b/src/Squidex/app/features/assets/pages/asset.component.ts
@@ -14,6 +14,7 @@ import {
AppsStoreService,
AssetDto,
AssetsService,
+ fadeAnimation,
NotificationService,
UsersProviderService
} from 'shared';
@@ -21,7 +22,10 @@ import {
@Component({
selector: 'sqx-asset',
styleUrls: ['./asset.component.scss'],
- templateUrl: './asset.component.html'
+ templateUrl: './asset.component.html',
+ animations: [
+ fadeAnimation
+ ]
})
export class AssetComponent extends AppComponentBase implements OnInit {
@Input()
@@ -31,7 +35,27 @@ export class AssetComponent extends AppComponentBase implements OnInit {
public asset: AssetDto;
public get previewUrl(): Observable
{
- return this.appName().map(app => this.apiUrl.buildUrl(`api/assets/${this.asset.id}/?width=230&height=140&mode=Crop`));
+ return this.appName().map(app => this.apiUrl.buildUrl(`api/assets/${this.asset.id}/?width=230&height=155&mode=Crop`));
+ }
+
+ public get fileType(): string {
+ let result = '';
+
+ if (this.asset != null) {
+ result = this.asset.mimeType.split('/')[1];
+ }
+
+ return result;
+ }
+
+ public get fileName(): string {
+ let result = '';
+
+ if (this.asset != null) {
+ result = this.asset.fileName;
+ }
+
+ return result;
}
public get fileInfo(): string {
diff --git a/src/Squidex/app/features/assets/pages/assets-page.component.scss b/src/Squidex/app/features/assets/pages/assets-page.component.scss
index c69b86595..e392eee55 100644
--- a/src/Squidex/app/features/assets/pages/assets-page.component.scss
+++ b/src/Squidex/app/features/assets/pages/assets-page.component.scss
@@ -3,6 +3,7 @@
.file-drop {
& {
+ @include transition(border-color .4s ease);
border: 2px dashed $color-border;
background: transparent;
padding: 1rem;
@@ -11,17 +12,23 @@
margin-right: 0;
}
- &-or {
- font-size: .8rem;
+ &.drag {
+ border-color: darken($color-border, 10%);
+ border-style: dashed;
+ cursor: copy;
}
- &-button {
- margin: .5rem 0;
+ &-or {
+ font-size: .8rem;
}
&-info {
color: $color-subtext;
}
+
+ &-button {
+ margin: .5rem 0;
+ }
}
.btn {
diff --git a/src/Squidex/app/features/content/pages/schemas/schemas-page.component.html b/src/Squidex/app/features/content/pages/schemas/schemas-page.component.html
index f17f76336..2274b91b3 100644
--- a/src/Squidex/app/features/content/pages/schemas/schemas-page.component.html
+++ b/src/Squidex/app/features/content/pages/schemas/schemas-page.component.html
@@ -6,7 +6,7 @@
Schemas
-