Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.
TypeScript cloud-alternativecollaborationcollaborative-editingdropboxfile-serverfile-sharingfile-storagefile-syncfull-text-searchhomelabnextcloudon-premiseopen-sourceprivacy-firstprivate-cloudrealtimesecureself-hostedstorage-serverwebdav
feat(frontend): restyle recents widget
johaven9845502df5d7
diff --git a/frontend/src/app/applications/comments/components/widgets/comments-recents-widget.component.html b/frontend/src/app/applications/comments/components/widgets/comments-recents-widget.component.htmlindex 1f4cb687..54ba1f60 100644--- a/frontend/src/app/applications/comments/components/widgets/comments-recents-widget.component.html+++ b/frontend/src/app/applications/comments/components/widgets/comments-recents-widget.component.html@@ -12,7 +12,7 @@@for (c of comments(); track c.id; let last = $last) {<ul class="products-list product-list-in-box" [class.border-0]="last"><li (click)="goToFile(c)" class="item">- <div class="product-img">+ <div style="margin-right: 0.5rem;"><app-user-avatar [user]="c.author"></app-user-avatar></div><div class="product-info">@@ -28,13 +28,13 @@</span></div><div class="product-badge">- <span class="badge rounded-pill bg-purple">{{ c.modifiedAt | amTimeAgo:true }}</span>+ <span class="fs-xxxxs text-muted">{{ c.modifiedAt | amTimeAgo }}</span></div></li></ul>} @empty {- <div class="d-flex flex-column justify-content-center text-align-center text-gray mt-5">- <fa-icon [icon]="icons.faCommentDots" size="4x"></fa-icon>+ <div class="d-flex flex-column justify-content-center text-align-center text-gray p-4" style="min-height: 200px;">+ <fa-icon [icon]="icons.faCommentDots" size="2x"></fa-icon><div class="mt-4" l10nTranslate>No recent comments</div></div>}diff --git a/frontend/src/app/applications/files/components/widgets/files-recents-widget.component.html b/frontend/src/app/applications/files/components/widgets/files-recents-widget.component.htmlindex 09794747..233dbe69 100644--- a/frontend/src/app/applications/files/components/widgets/files-recents-widget.component.html+++ b/frontend/src/app/applications/files/components/widgets/files-recents-widget.component.html@@ -28,13 +28,13 @@</span></div><div class="product-badge">- <span class="badge rounded-pill bg-purple">{{ f.mtime | amTimeAgo:true }}</span>+ <span class="fs-xxxxs text-muted">{{ f.mtime | amTimeAgo }}</span></div></li></ul>} @empty {- <div class="d-flex flex-column justify-content-center text-align-center text-gray mt-5">- <fa-icon [icon]="icons.faFileLines" size="4x"></fa-icon>+ <div class="d-flex flex-column justify-content-center text-align-center text-gray p-4" style="min-height: 200px;">+ <fa-icon [icon]="icons.faFileLines" size="2x"></fa-icon><div class="mt-4" l10nTranslate>No recent files</div></div>}diff --git a/frontend/src/app/applications/recents/components/recents.component.html b/frontend/src/app/applications/recents/components/recents.component.htmlindex 35b8e27d..d6b5d987 100644--- a/frontend/src/app/applications/recents/components/recents.component.html+++ b/frontend/src/app/applications/recents/components/recents.component.html@@ -1,5 +1,5 @@<div appAutoResize class="fs-xs px-2" [useMaxHeight]="false" [resizeOffset]="40">- <div class="row">+ <div class="row recents-grid"><div class="col-md-6"><app-files-recents-widget></app-files-recents-widget></div>@@ -7,4 +7,4 @@<app-comments-recents-widget></app-comments-recents-widget></div></div>-</div>\ No newline at end of file+</div>diff --git a/frontend/src/styles/components/_boxes.scss b/frontend/src/styles/components/_boxes.scssindex e503ebd0..cd479062 100644--- a/frontend/src/styles/components/_boxes.scss+++ b/frontend/src/styles/components/_boxes.scss@@ -70,10 +70,15 @@.box-transparent {position: relative;width: 100%;+ border: 1px solid;+ border-radius: $box-border-radius;+ overflow: hidden;+ transition: box-shadow .2s ease;.box-header {border-bottom: 1px solid;- height: 40px;+ height: auto;+ padding: 0.35rem 0.8rem;> fa-icon {font-size: 1rem;@@ -85,10 +90,21 @@.box-title {font-weight: 500;+ letter-spacing: 0.02em;}}++ .box-body {+ padding: 0.2rem 0.4rem 0.4rem;+ }}+.recents-grid {+ padding-top: .4rem;+ row-gap: 16px;+}++.box-header {display: flex;align-items: center;diff --git a/frontend/src/styles/components/_products.scss b/frontend/src/styles/components/_products.scssindex 33e85b80..550d611e 100644--- a/frontend/src/styles/components/_products.scss+++ b/frontend/src/styles/components/_products.scss@@ -2,21 +2,19 @@list-style: none;margin: 0;padding: 0;- height: 40px;+ height: auto;&.product-list-in-box {border-bottom: .5px solid;> .item {box-shadow: none;- @include border-radius($box-border-radius);}}> .item {display: flex;align-items: center;- @include border-radius($box-border-radius);- padding: 4px 70px 4px 5px;+ padding: 3px 64px 3px 8px;@extend .text-truncate;}@@ -25,16 +23,23 @@}.product-img {- float: left;+ float: none;+ width: 30px;+ height: 30px;+ border-radius: 8px;+ display: grid;+ place-items: center;+ margin-right: 0.5rem;img {- width: 30px;- height: 30px;+ width: 20px;+ height: 20px;+ object-fit: contain;}}.product-info {- margin-left: .3rem;+ margin-left: 0;min-width: 0;}@@ -45,7 +50,7 @@span:first-of-type {@extend .text-truncate;- font-size: $font-size-xxs;+ font-size: $font-size-xs;}}@@ -53,7 +58,7 @@display: flex;align-self: center;position: absolute;- right: 8px;+ right: 10px;font-size: $font-size-xxs;> span {@@ -64,9 +69,7 @@.product-description {@extend .text-truncate;display: block;- font-size: 11px;+ font-size: 10.5px;color: #999;}}--diff --git a/frontend/src/styles/components/_theme_dark.scss b/frontend/src/styles/components/_theme_dark.scssindex c1bf7e0d..619d00fc 100755--- a/frontend/src/styles/components/_theme_dark.scss+++ b/frontend/src/styles/components/_theme_dark.scss@@ -552,19 +552,40 @@}.box-transparent {+ background-color: darken($sidebar-dark-icons-menu-bg, 2%);+ border-color: $sidebar-dark-icons-menu-border-color;+ box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);+> .box-header {- border-bottom-color: $gray;+ background: linear-gradient(+ 180deg,+ darken($sidebar-dark-icons-menu-bg, 2%) 0%,+ darken($sidebar-dark-icons-menu-bg, 6%) 100%+ );+ border-bottom-color: $sidebar-dark-icons-menu-border-color;+ }++ .product-img {+ background-color: darken($sidebar-dark-icons-menu-bg, 6%);+ border: 1px solid $sidebar-dark-icons-menu-border-color;}}.products-list > li:hover {- background-color: lighten($sidebar-dark-apps-menu-title-bg, 1%);+ background-color: lighten($sidebar-dark-apps-menu-title-bg, 8%);}.product-list-in-box {border-bottom-color: $sidebar-dark-icons-menu-border-color;}+ .recents-grid::before {+ background: linear-gradient(+ 180deg,+ rgba($sidebar-dark-icons-menu-bg, 0.7) 0%,+ rgba($sidebar-dark-icons-menu-bg, 0.45) 100%+ );+ }.ui-disabled {background-color: $sidebar-dark-icons-menu-bg !important;diff --git a/frontend/src/styles/components/_theme_light.scss b/frontend/src/styles/components/_theme_light.scssindex 42223ded..dbfe565e 100755--- a/frontend/src/styles/components/_theme_light.scss+++ b/frontend/src/styles/components/_theme_light.scss@@ -497,17 +497,23 @@}.box-transparent {+ background-color: $gray-lightest;+ border-color: $gray-lighter;+ box-shadow: 0 12px 26px rgba(24, 32, 58, 0.1);+> .box-header {+ background: linear-gradient(180deg, $white 0%, $gray-lightest 100%);border-bottom-color: $gray-lighter;}- }- .products-list > li:hover {- background-color: $table-bg-hover;- }+ .box-body {+ background-color: $white;+ }- .product-list-in-box {- border-bottom-color: $gray-lighter;+ .product-img {+ background-color: $gray-lightest;+ border: 0.5px solid darken($gray-lighter, 4%);+ }}.bg-theme {@@ -518,6 +524,48 @@background-color: $gray-lightest !important;}+ .recents-grid::before {+ background: linear-gradient(+ 180deg,+ rgba($gray-light, 0.9) 0%,+ rgba($gray-lightest, 0.7) 100%+ );+ }++ .recents-grid .box-transparent > .box-header {+ background: linear-gradient(+ 180deg,+ mix($primary, $white, 12%) 0%,+ mix($primary, $white, 6%) 100%+ );+ border-bottom-color: mix($primary, $white, 20%);++ > fa-icon {+ color: darken($primary, 15%);+ }++ .box-title {+ color: darken($primary, 18%);+ }++ .btn-link {+ color: darken($primary, 12%);+ }++ .btn-link:hover,+ .btn-link:focus {+ color: darken($primary, 24%);+ }+ }++ .products-list > li:hover {+ background-color: lighten($table-bg-hover, 2%);+ }++ .product-list-in-box {+ border-bottom-color: $gray-lighter;+ }+.avatar-img {background-color: darken($gray-light, 5%);}@@ -526,5 +574,3 @@background-color: $white !important;}}--