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
chore(frontend): cleanup virtual-scroll component & some other fixes
johavencf3d1f569fe6
diff --git a/frontend/src/app/applications/files/components/dialogs/files-trash-empty-dialog.component.html b/frontend/src/app/applications/files/components/dialogs/files-trash-empty-dialog.component.htmlindex 0b797faf..3af8f05c 100755--- a/frontend/src/app/applications/files/components/dialogs/files-trash-empty-dialog.component.html+++ b/frontend/src/app/applications/files/components/dialogs/files-trash-empty-dialog.component.html@@ -9,7 +9,7 @@<button (click)="layout.closeDialog()" aria-label="Close" class="btn-close btn-close-white" type="button"></button></div><div class="modal-body">- <div l10nTranslate>Would you like to empty the trash ?</div>+ <div class="mb-3" l10nTranslate>Would you like to empty the trash ?</div><small l10nTranslate>All items will be permanently deleted</small></div><div class="modal-footer">diff --git a/frontend/src/app/applications/files/components/sidebar/files-clipboard.component.html b/frontend/src/app/applications/files/components/sidebar/files-clipboard.component.htmlindex a6a8e02d..502892c8 100644--- a/frontend/src/app/applications/files/components/sidebar/files-clipboard.component.html+++ b/frontend/src/app/applications/files/components/sidebar/files-clipboard.component.html@@ -13,7 +13,7 @@@if (files.length) {<div class="px-2 pt-2 pb-2 fs-xs"><div class="d-flex justify-content-between mt-2">- <select [(ngModel)]="selectedAction" class="form-select my-auto">+ <select [(ngModel)]="selectedAction" class="form-select form-select-sm">@for (item of operations| keyvalue: originalOrderKeyValue; track item.key) {<option [ngValue]="item.key" l10nTranslate>{{ item.value.text }}</option>}@@ -21,7 +21,7 @@<button (click)="doAction()" class="btn btn-xs btn-primary ms-1" type="button" l10nTranslate>Confirm</button></div></div>- <hr class="mx-0 mt-2 mb-0">+ <hr class="mx-0 my-2"><div appAutoResize class="sidebar-item" [resizeOffset]=120>@for (f of files; track f.id) {<div class="sidebar-item-container">diff --git a/frontend/src/app/applications/files/components/sidebar/files-selection.component.html b/frontend/src/app/applications/files/components/sidebar/files-selection.component.htmlindex 4ef6526d..b9309c7f 100644--- a/frontend/src/app/applications/files/components/sidebar/files-selection.component.html+++ b/frontend/src/app/applications/files/components/sidebar/files-selection.component.html@@ -2,20 +2,20 @@@if (multiple()) {<div class="fs-sm"><div class="d-flex justify-content-center mt-2">- <button (click)="addToClipboard()" class="btn btn-sm btn-primary me-1" type="button" l10nTranslate>+ <button (click)="addToClipboard()" class="btn btn-primary me-1" type="button" l10nTranslate><fa-icon [icon]="icons.faClipboardCheck"></fa-icon>Send to Clipboard</button></div></div>- <hr class="mx-0 mt-2 mb-0">+ <hr class="mx-0 mt-3 mb-1">}<div appAutoResize class="fs-sm" [resizeOffset]=resizeOffset()>@if (multiple()) {<div class="flex-column p-2 w-100">@for (f of files(); track f.id) {<div class="d-inline-flex w-100 align-content-center align-items-center mx-1">- <img [src]="f.mimeUrl" alt="" class="me-1" height="30" width="auto" (error)="f.fallBackMimeUrl()">+ <img [src]="f.mimeUrl" alt="" class="me-1" height="28" width="auto" (error)="f.fallBackMimeUrl()"><span class="text-truncate">{{ f.name }}</span></div>}diff --git a/frontend/src/app/applications/spaces/components/spaces-browser.component.html b/frontend/src/app/applications/spaces/components/spaces-browser.component.htmlindex 910781a5..3888d880 100644--- a/frontend/src/app/applications/spaces/components/spaces-browser.component.html+++ b/frontend/src/app/applications/spaces/components/spaces-browser.component.html@@ -515,7 +515,7 @@<span l10nTranslate>{{ serverConnectionErrorMessage }}</span></div>} @else if (!isTrashRepo && !loading && !stats.elements) {- <div class="fs-sm text-center text-muted text-bold no-select p-4">+ <div class="fs-base text-center text-gray fw-bold no-select p-4"><span l10nTranslate>Drag and drop your files here</span></div>}diff --git a/frontend/src/app/applications/users/components/user-applications.component.html b/frontend/src/app/applications/users/components/user-applications.component.htmlindex 0d5fb4cc..cef8c042 100644--- a/frontend/src/app/applications/users/components/user-applications.component.html+++ b/frontend/src/app/applications/users/components/user-applications.component.html@@ -14,7 +14,7 @@@if (store.appStoreManifest()) {<div class="profile-page user-applications-page d-flex flex-column fs-sm" appAutoResize [resizeOffset]="80" style="height: 100%"><div class="container-fluid p-2">- <div class="row g-3">+ <div class="row g-4">@for (app of APP_STORE_PLATFORM_LIST; track $index) {<div class="col-12 col-md-6 col-xl-4 d-flex"><div class="card dialog-tab-card dialog-check-card--interactive app-download-card text-center w-100 h-100">diff --git a/frontend/src/app/common/components/navigation-view/navigation-view.component.html b/frontend/src/app/common/components/navigation-view/navigation-view.component.htmlindex 67af1f07..413711a1 100644--- a/frontend/src/app/common/components/navigation-view/navigation-view.component.html+++ b/frontend/src/app/common/components/navigation-view/navigation-view.component.html@@ -1,6 +1,6 @@<div class="btn-group" dropdown><button class="btn btn-default dropdown-toggle" dropdownToggle type="button">- <fa-icon [icon]="icons.faCog"></fa-icon>+ <fa-icon [icon]="icons.faSliders"></fa-icon></button><ul *dropdownMenu class="dropdown-menu dropdown-menu-right" role="menu"><li class="dropdown-header text-bold" l10nTranslate>Display</li>@@ -26,4 +26,4 @@</li>}</ul>-</div>\ No newline at end of file+</div>diff --git a/frontend/src/app/common/components/navigation-view/navigation-view.component.ts b/frontend/src/app/common/components/navigation-view/navigation-view.component.tsindex 1ad06dd0..8053df1c 100644--- a/frontend/src/app/common/components/navigation-view/navigation-view.component.ts+++ b/frontend/src/app/common/components/navigation-view/navigation-view.component.ts@@ -2,7 +2,7 @@ import { KeyValuePipe } from '@angular/common'import { ChangeDetectionStrategy, Component, EventEmitter, inject, Input, Output } from '@angular/core'import { FaIconComponent } from '@fortawesome/angular-fontawesome'import { IconDefinition } from '@fortawesome/fontawesome-svg-core'-import { faArrowDown, faArrowUp, faCog, faTh, faThLarge, faThList } from '@fortawesome/free-solid-svg-icons'+import { faArrowDown, faArrowUp, faSliders, faTh, faThLarge, faThList } from '@fortawesome/free-solid-svg-icons'import { L10nTranslateDirective } from 'angular-l10n'import { BsDropdownModule } from 'ngx-bootstrap/dropdown'import { LayoutService } from '../../../layout/layout.service'@@ -33,7 +33,7 @@ export class NavigationViewComponent {@Output() switchView = new EventEmitter<ViewMode>()@Output() sortBy = new EventEmitter()protected readonly originalOrderKeyValue = originalOrderKeyValue- protected readonly icons = { faCog, faArrowDown, faArrowUp }+ protected readonly icons = { faSliders, faArrowDown, faArrowUp }protected viewsMode: Record<string, ViewMode> = {tl: { enabled: false, text: 'List', icon: faThList },th: { enabled: true, text: 'S', icon: faTh, maxBadges: 0, dimensions: 96, image: 56, imageRes: 128, faSize: 30, textSize: 11, margins: 18 },diff --git a/frontend/src/app/common/components/virtual-scroll.component.ts b/frontend/src/app/common/components/virtual-scroll.component.tsindex 4d14f8b0..d290cf07 100644--- a/frontend/src/app/common/components/virtual-scroll.component.ts+++ b/frontend/src/app/common/components/virtual-scroll.component.ts@@ -2,7 +2,6 @@ import {ChangeDetectionStrategy,Component,ElementRef,- EventEmitter,HostBinding,inject,Input,@@ -10,13 +9,11 @@ import {OnChanges,OnDestroy,OnInit,- Output,Renderer2,SimpleChanges,ViewChild} from '@angular/core'-import { of, repeat, skip, Subject, Subscription } from 'rxjs'-import { debounceTime, switchMap } from 'rxjs/operators'+import { Subscription } from 'rxjs'import { LayoutService } from '../../layout/layout.service'@Component({@@ -56,11 +53,8 @@ import { LayoutService } from '../../layout/layout.service'export class VirtualScrollComponent<T> implements OnInit, OnChanges, OnDestroy {@ViewChild('content', { read: ElementRef, static: true }) contentElementRef: ElementRef@ViewChild('shim', { read: ElementRef, static: true }) shimElementRef: ElementRef- @Output() isScrollBottom = new EventEmitter<boolean>()- @Output() isScrollTop = new EventEmitter<boolean>()@Input() resizeOffset = 134@Input() galleryMode = false- @Input() selectedChat: any = null@Input() items: T[] = []@Input() childHeight = 35@Input() childWidth: number@@ -72,24 +66,20 @@ export class VirtualScrollComponent<T> implements OnInit, OnChanges, OnDestroy {private readonly layout = inject(LayoutService)private subscriptions: Subscription[] = []private scrollbarWidth = 0- private _scrollChat = new Subject<void>()- private scrollChat = this._scrollChat.asObservable().pipe(debounceTime(50))+ private lastHeaderWidth = -1private previousStart: numberprivate previousEnd: numberprivate startupLoop = trueprivate dimensionsView: any- private scrollTimer: any = null+ private scrollTimer: ReturnType<typeof setTimeout> | null = nullprivate eventScrollHandler: () => void | undefined+ private resizeObserver: ResizeObserver | null = null+ private resizeTableHeaderRafId: number | null = null+ private calculateItemsRafId: number | null = null/** Cache of the last scroll height to prevent setting CSS when not needed. */private lastScrollHeight = -1/** Cache of the last top padding to prevent setting CSS when not needed. */private lastTopPadding = -1- // Watch sidebars actions to adapt layout- private toggleLeftSidebar = this.layout.toggleLeftSideBar.pipe(- skip(1),- switchMap((state) => of(state).pipe(repeat({ count: 30, delay: 10 })))- )- private toggleRightSidebar = this.layout.toggleRightSideBar.pipe(switchMap((state) => of(state).pipe(repeat({ count: 30, delay: 10 }))))@HostBinding('class.virtual-scroll-border-top')get withBorderTop(): boolean {@@ -99,12 +89,8 @@ export class VirtualScrollComponent<T> implements OnInit, OnChanges, OnDestroy {ngOnInit() {this.resizeOffsetHeight(true)this.addParentEventHandlers()- if (this.selectedChat) {- this.childHeight = 1- this.subscriptions.push(this.scrollChat.subscribe(() => this.checkScrollChat()))- } else if (!this.galleryMode) {- this.subscriptions.push(this.toggleLeftSidebar.subscribe(() => this.resizeTableHeader()))- this.subscriptions.push(this.toggleRightSidebar.subscribe(() => this.resizeTableHeader()))+ if (!this.galleryMode) {+ this.observeTableHeaderWidth()}}@@ -113,6 +99,22 @@ export class VirtualScrollComponent<T> implements OnInit, OnChanges, OnDestroy {this.eventScrollHandler()this.eventScrollHandler = undefined}+ if (this.scrollTimer) {+ clearTimeout(this.scrollTimer)+ this.scrollTimer = null+ }+ if (this.resizeTableHeaderRafId !== null) {+ cancelAnimationFrame(this.resizeTableHeaderRafId)+ this.resizeTableHeaderRafId = null+ }+ if (this.calculateItemsRafId !== null) {+ cancelAnimationFrame(this.calculateItemsRafId)+ this.calculateItemsRafId = null+ }+ if (this.resizeObserver) {+ this.resizeObserver.disconnect()+ this.resizeObserver = null+ }this.subscriptions.forEach((s) => s.unsubscribe())}@@ -131,7 +133,6 @@ export class VirtualScrollComponent<T> implements OnInit, OnChanges, OnDestroy {}}this.refresh(true)- this.checkChangesOnChat(changes)}refresh(updateDimensions = false) {@@ -139,9 +140,16 @@ export class VirtualScrollComponent<T> implements OnInit, OnChanges, OnDestroy {if (updateDimensions || !this.dimensionsView) {this.calculateDimensions()}- requestAnimationFrame(() => this.calculateItems())+ if (this.calculateItemsRafId === null) {+ this.calculateItemsRafId = requestAnimationFrame(() => {+ this.calculateItemsRafId = null+ this.calculateItems()+ })+ }})- this.resizeTableHeader()+ if (!this.galleryMode && updateDimensions) {+ this.resizeTableHeader()+ }}scrollInto(item: any) {@@ -168,69 +176,6 @@ export class VirtualScrollComponent<T> implements OnInit, OnChanges, OnDestroy {this.refresh()}- private checkChangesOnChat(changes) {- if (this.selectedChat) {- if ((changes as any).selectedChat) {- this.renderer.setStyle(this.element.nativeElement, 'visibility', 'hidden')- setTimeout(() => {- if (this.selectedChat.lastScrollPosition === null) {- this.saveChatScrollPosition(this.element.nativeElement.scrollHeight)- }- this.element.nativeElement.scrollTo({ left: 0, top: this.selectedChat.lastScrollPosition, behavior: 'auto' })- this.checkScrollChat()- this.renderer.setStyle(this.element.nativeElement, 'visibility', 'visible')- }, 50)- } else if (this.chatIsScrolledToBottom()) {- this.restoreBottomScrollChat()- } else if (this.chatIsScrolledToTop()) {- this.restoreTopScrollChat()- }- }- }-- private checkScrollChat() {- const isOnBottom = this.chatIsScrolledToBottom()- const isOnTop = this.chatIsScrolledToTop()- if (isOnTop) {- this.saveChatScrollPosition(this.element.nativeElement.scrollHeight - this.element.nativeElement.scrollTop)- } else if (isOnBottom) {- this.saveChatScrollPosition(this.element.nativeElement.scrollHeight)- } else {- this.saveChatScrollPosition()- }- this.ngZone.run(() => {- this.isScrollBottom.next(isOnBottom)- this.isScrollTop.next(isOnTop)- })- }-- private saveChatScrollPosition(value = null) {- this.selectedChat.lastScrollPosition = value ? value : this.element.nativeElement.scrollTop- }-- private chatIsScrolledToBottom() {- return (- Math.ceil(this.element.nativeElement.clientHeight / 10) * 10 ===- Math.ceil((this.element.nativeElement.scrollHeight - this.element.nativeElement.scrollTop) / 10) * 10- )- }-- private chatIsScrolledToTop() {- return this.element.nativeElement.scrollTop <= 300- }-- private restoreBottomScrollChat() {- setTimeout(() => {- this.element.nativeElement.scrollTo({ left: 0, top: this.element.nativeElement.scrollHeight, behavior: 'smooth' })- }, 50)- }-- private restoreTopScrollChat() {- setTimeout(() => {- this.element.nativeElement.scrollTop = this.element.nativeElement.scrollHeight - this.selectedChat.lastScrollPosition- }, 50)- }-private tableScrollHovering = () => {clearTimeout(this.scrollTimer)if (!this.contentElementRef.nativeElement.classList.contains('table-disable-hover')) {@@ -251,60 +196,53 @@ export class VirtualScrollComponent<T> implements OnInit, OnChanges, OnDestroy {this.refresh()}- private refreshChatWithoutDimensions = () => {- if (this.chatIsScrolledToTop() && !this.selectedChat.allHistoryLoaded) {- this.element.nativeElement.scrollTo({ left: 0, top: this.element.nativeElement.scrollTop, behavior: 'auto' })- } else {- this.refreshWithoutDimensions()- this._scrollChat.next()- }- }-- private refreshChatWithDimensions = () => {- this.resizeOffsetHeight()- this.refresh(true)- if (this.selectedChat.isScrolledToBottom) {- this.scrollInto(-2)- } else {- this._scrollChat.next()- }- }-private resizeOffsetHeight(force = false) {- const offset = window.innerHeight - this.resizeOffset- if (force || this.element.nativeElement.offsetHeight !== offset) {- this.renderer.setStyle(this.element.nativeElement, 'height', `${offset - 1}px`)+ const targetHeight = window.innerHeight - this.resizeOffset - 1+ if (force || this.element.nativeElement.offsetHeight !== targetHeight) {+ this.renderer.setStyle(this.element.nativeElement, 'height', `${targetHeight}px`)}}- private resizeTableHeader() {+ private resizeTableHeader(force = false) {if (- !this.selectedChat &&!this.galleryMode &&this.element.nativeElement.previousElementSibling &&this.element.nativeElement.previousElementSibling.classList.contains('app-table')) {- setTimeout(- () => this.renderer.setStyle(this.element.nativeElement.previousElementSibling, 'width', `${this.element.nativeElement.clientWidth}px`),- 50- )+ const tableHeader = this.element.nativeElement.previousElementSibling+ const width = this.element.nativeElement.clientWidth+ if (!force && width === this.lastHeaderWidth) {+ return+ }+ this.lastHeaderWidth = width+ if (this.resizeTableHeaderRafId !== null) {+ cancelAnimationFrame(this.resizeTableHeaderRafId)+ }+ this.resizeTableHeaderRafId = requestAnimationFrame(() => {+ this.renderer.setStyle(tableHeader, 'width', `${width}px`)+ this.resizeTableHeaderRafId = null+ })+ }+ }++ private observeTableHeaderWidth() {+ if (typeof ResizeObserver === 'undefined') {+ return}+ this.ngZone.runOutsideAngular(() => {+ this.resizeObserver = new ResizeObserver(() => this.resizeTableHeader())+ this.resizeObserver.observe(this.element.nativeElement)+ })}private addParentEventHandlers() {this.ngZone.runOutsideAngular(() => {if (this.galleryMode) {this.eventScrollHandler = this.renderer.listen(this.element.nativeElement, 'scroll', this.refreshWithoutDimensions)- } else if (this.selectedChat) {- this.eventScrollHandler = this.renderer.listen(this.element.nativeElement, 'scroll', this.refreshChatWithoutDimensions)} else {this.eventScrollHandler = this.renderer.listen(this.element.nativeElement, 'scroll', this.tableScrollHovering)}- if (this.selectedChat) {- this.subscriptions.push(this.layout.resizeEvent.subscribe(() => this.refreshChatWithDimensions()))- } else {- this.subscriptions.push(this.layout.resizeEvent.subscribe(() => this.refreshWithDimensions()))- }+ this.subscriptions.push(this.layout.resizeEvent.subscribe(() => this.refreshWithDimensions()))})}diff --git a/frontend/src/app/layout/layout.component.ts b/frontend/src/app/layout/layout.component.tsindex 192d007d..157c41d3 100644--- a/frontend/src/app/layout/layout.component.ts+++ b/frontend/src/app/layout/layout.component.ts@@ -99,7 +99,8 @@ export class LayoutComponent implements OnDestroy, OnInit {if (this.isSmallerThanMediumScreen) {this.toggleLeftSideBar(2)} else {- this.toggleLeftSideBar(this.layout.saveLeftSideBarIsOpen.getValue() ? 1 : 2)+ this.layout.saveLeftSideBarIsOpen.next(true)+ this.toggleLeftSideBar(1)}}diff --git a/frontend/src/app/layout/navbar/navbar.component.html b/frontend/src/app/layout/navbar/navbar.component.htmlindex 78a76354..21846e06 100644--- a/frontend/src/app/layout/navbar/navbar.component.html+++ b/frontend/src/app/layout/navbar/navbar.component.html@@ -26,7 +26,7 @@</div><div class="navbar-right-side"><div (click)="openSidebarUser()" class="menu">- <div class="d-flex">+ <div class="d-flex align-items-center avatar">@if (userAvatar) {<img class="avatar-img bg-gray-light-important" [src]="userAvatar" alt="">}diff --git a/frontend/src/app/layout/sidebar/components/windows.component.html b/frontend/src/app/layout/sidebar/components/windows.component.htmlindex dc3a66fa..dc7711f9 100755--- a/frontend/src/app/layout/sidebar/components/windows.component.html+++ b/frontend/src/app/layout/sidebar/components/windows.component.html@@ -12,7 +12,7 @@<div class="sidebar-item-content"><img [ngSrc]="modal.element.mimeUrl" alt="" width="28" height="28"><div class="text-truncate fs-sm mx-1">{{ modal.element.name }}</div>- <button (click)="onClose($event, modal)" class="btn btn-sm btn-danger ms-auto">+ <button (click)="onClose($event, modal)" class="btn btn-xs btn-danger ms-auto"><fa-icon [icon]="icons.faTimes"></fa-icon></button></div>diff --git a/frontend/src/styles/components/_app.scss b/frontend/src/styles/components/_app.scssindex 4512b947..db5a89ef 100755--- a/frontend/src/styles/components/_app.scss+++ b/frontend/src/styles/components/_app.scss@@ -226,7 +226,7 @@.app-table {@extend .table;- @extend .no-select;+ @include no-select-utility;table-layout: fixed;width: 100%;background-color: transparent;@@ -270,7 +270,7 @@}tbody tr td {- @extend .text-truncate;+ @include text-truncate-utility;border: none !important;vertical-align: middle;max-width: 0;@@ -278,7 +278,7 @@padding-top: 1px;span {- @extend .text-truncate;+ @include text-truncate-utility;}.badge {@@ -438,7 +438,7 @@ app-input-filter {}.app-foot-menu {- @extend .no-select;+ @include no-select-utility;display: flex;flex-direction: row;align-items: center;@@ -455,10 +455,6 @@ app-input-filter {@include media-breakpoint-down(sm) {font-size: $font-size-2xs;}-- &.pagination-container {- height: 40px;- }}.app-div-striped {@@ -486,7 +482,7 @@ app-input-filter {display: flex;padding: .4rem;@extend .app-div-hovered;- @extend .no-select-pointer;+ @include no-select-pointer-utility;height: $sidebar-apps-height;}diff --git a/frontend/src/styles/components/_boxes.scss b/frontend/src/styles/components/_boxes.scssindex ce48362c..db67a613 100644--- a/frontend/src/styles/components/_boxes.scss+++ b/frontend/src/styles/components/_boxes.scss@@ -41,7 +41,7 @@padding: $box-padding;.box-title {- @extend .no-select;+ @include no-select-utility;display: inline-block;font-size: $font-size-xs;margin: 0;diff --git a/frontend/src/styles/components/_circles.scss b/frontend/src/styles/components/_circles.scssindex b793f676..4bff9f00 100755--- a/frontend/src/styles/components/_circles.scss+++ b/frontend/src/styles/components/_circles.scss@@ -1,76 +1,67 @@.circle-icon {- display: flex;- align-items: center;- justify-content: center;- min-width: 30px;- min-height: 30px;- font-size: $font-size-lg;- border-radius: 50%;+ @include circle-icon-utility;}.circle-icon-sm {- @extend .circle-icon;- min-width: 23px;- min-height: 23px;- font-size: $font-size-sm;+ @include circle-icon-sm-utility;}.circle-gray-icon {- @extend .circle-icon;+ @include circle-icon-utility;background-color: darken($gray-light, 2%);color: black;}.circle-gray-icon-sm {- @extend .circle-icon-sm;+ @include circle-icon-sm-utility;background-color: darken($gray-light, 2%);color: black;}.circle-primary-icon, .circle-enabled-icon {- @extend .circle-icon;+ @include circle-icon-utility;background: linear-gradient(#0086d7, #00456f);color: whitesmoke;}.circle-primary-icon-sm {- @extend .circle-icon-sm;+ @include circle-icon-sm-utility;background: linear-gradient(#0086d7, #00456f);color: whitesmoke;}.circle-purple-icon {- @extend .circle-icon;+ @include circle-icon-utility;background: linear-gradient(#965ab4, #5a3778);color: whitesmoke;}.circle-purple-icon-sm {- @extend .circle-icon-sm;+ @include circle-icon-sm-utility;background: linear-gradient(#965ab4, #5a3778);color: whitesmoke;}.circle-sync-icon {- @extend .circle-icon;+ @include circle-icon-utility;background: linear-gradient(#f06400, #962800);color: whitesmoke;}.circle-error-icon {- @extend .circle-icon;+ @include circle-icon-utility;background: linear-gradient(#e63228, #c80f0a);color: whitesmoke;}.circle-error-icon-sm {- @extend .circle-icon-sm;+ @include circle-icon-sm-utility;background: linear-gradient(#e63228, #c80f0a);color: whitesmoke;}.circle-disabled-icon {- @extend .circle-icon;+ @include circle-icon-utility;background: linear-gradient(#818181, #434343);color: whitesmoke;}diff --git a/frontend/src/styles/components/_dropdowns.scss b/frontend/src/styles/components/_dropdowns.scssindex df77e256..0d5a55fc 100644--- a/frontend/src/styles/components/_dropdowns.scss+++ b/frontend/src/styles/components/_dropdowns.scss@@ -4,10 +4,6 @@> li > a {@include app-menu-item-structure($btn-border-radius, 1px);-- > .fas, .far {- margin-right: 10px;- }}.dropdown-header {diff --git a/frontend/src/styles/components/_forms.scss b/frontend/src/styles/components/_forms.scssindex 42288673..14cd7718 100644--- a/frontend/src/styles/components/_forms.scss+++ b/frontend/src/styles/components/_forms.scss@@ -34,7 +34,7 @@.form-check-label {font-weight: inherit;cursor: pointer !important;- @extend .no-select;+ @include no-select-utility;input {margin-right: 0.25rem;diff --git a/frontend/src/styles/components/_header.scss b/frontend/src/styles/components/_header.scssindex ecde9ae7..fe82b380 100644--- a/frontend/src/styles/components/_header.scss+++ b/frontend/src/styles/components/_header.scss@@ -35,12 +35,7 @@.navbar-logo-button {padding: 0 .4rem 0 .4rem;-- &.navbar-logo-button--delayed {- opacity: 0;- visibility: hidden;- animation: navbar-logo-show .01s linear $transition-speed forwards;- }+ flex-shrink: 0;&:hover,&:focus,@@ -48,15 +43,30 @@background: transparent;}+ &.navbar-logo-button--delayed {+ opacity: 0;+ visibility: hidden;+ animation: navbar-logo-show .12s $transition-fn calc(#{$transition-speed} - .09s) forwards;++ @include media-breakpoint-down(md) {+ opacity: 1;+ visibility: visible;+ animation: none;+ }+ }+.logo-container {display: flex;align-items: center;justify-content: center;+ flex: 0 0 $layout-logo-container-size;+ min-width: $layout-logo-container-size;+ min-height: $layout-logo-container-size;width: $layout-logo-container-size;height: $layout-logo-container-size;margin: auto;border-radius: 50%;- background: $sidebar-light-apps-menu-hover-color;+ background: $black;transition: background-color $transition-speed $transition-fn;> img {@@ -64,7 +74,7 @@height: $layout-logo-image-size;&.logo-spin-in {- animation: logo-spin-in .45s $transition-fn $transition-speed both;+ animation: logo-spin-in .45s $transition-fn calc(#{$transition-speed} - .09s) both;transform-origin: 50% 50%;}}@@ -85,7 +95,9 @@.navbar-history-button-left {margin-left: -.5px;- border-left: .5px solid mix($sidebar-light-icons-menu-hover-bg, $primary, 45%);+ @include media-breakpoint-up(sm) {+ border-left: .5px solid mix($sidebar-light-icons-menu-hover-bg, $primary, 50%);+ }}.navbar-history-button-right {@@ -93,8 +105,11 @@}.navbar-breadcrumb {- border-left: .5px solid mix($sidebar-light-icons-menu-hover-bg, $primary, 45%);- max-width: 93%;+ border-left: .5px solid mix($sidebar-light-icons-menu-hover-bg, $primary, 50%);+ flex: 1 1 auto;+ min-width: 0;+ max-width: none;+ overflow: hidden;@include media-breakpoint-down(sm) {display: none;}@@ -103,6 +118,8 @@.navbar-right-side {display: flex;margin-left: auto;+ flex: 0 0 auto;+ min-width: $sidebar-apps-icons-width;.menu {display: flex;@@ -165,11 +182,9 @@@keyframes logo-spin-in {from {transform: rotate(220deg);- opacity: .25;}to {transform: rotate(0);- opacity: 1;}}@@ -178,6 +193,7 @@align-items: center;align-content: center;justify-content: flex-start;+ min-width: 0;height: $navbar-height;background: transparent;font-size: $font-size-sm;@@ -188,13 +204,15 @@.breadcrumb-content {display: flex;align-items: center;- justify-content: center;- @extend .text-truncate;- @extend .no-select-pointer;+ justify-content: flex-start;+ width: 100%;+ min-width: 0;+ @include text-truncate-utility;+ @include no-select-pointer-utility;> li {&:not(:first-child) {- @extend .text-truncate;+ @include text-truncate-utility;}display: inline;diff --git a/frontend/src/styles/components/_links.scss b/frontend/src/styles/components/_links.scssindex 4851f5e8..37d39d21 100755--- a/frontend/src/styles/components/_links.scss+++ b/frontend/src/styles/components/_links.scss@@ -35,7 +35,7 @@}.error-code {- @extend .no-select-pointer;+ @include no-select-pointer-utility;color: #fff;font-size: $font-size-xl;font-weight: 600;diff --git a/frontend/src/styles/components/_miscellaneous.scss b/frontend/src/styles/components/_miscellaneous.scssindex affa0fd1..66d7649c 100644--- a/frontend/src/styles/components/_miscellaneous.scss+++ b/frontend/src/styles/components/_miscellaneous.scss@@ -26,13 +26,11 @@ mark, .mark {}.no-select {- cursor: default;- user-select: none;+ @include no-select-utility;}.no-select-pointer {- @extend .no-select;- cursor: pointer;+ @include no-select-pointer-utility;}.overflow-wrap-and-whitespace {@@ -60,6 +58,6 @@ mark, .mark {}label {- @extend .no-select;+ @include no-select-utility;font-weight: 500;}diff --git a/frontend/src/styles/components/_mixins.scss b/frontend/src/styles/components/_mixins.scssindex abd27df5..f99a06a6 100644--- a/frontend/src/styles/components/_mixins.scss+++ b/frontend/src/styles/components/_mixins.scss@@ -51,3 +51,36 @@margin: $margin;}}++@mixin text-truncate-utility {+ white-space: nowrap;+ overflow: hidden;+ text-overflow: ellipsis;+}++@mixin no-select-utility {+ cursor: default;+ user-select: none;+}++@mixin no-select-pointer-utility {+ @include no-select-utility;+ cursor: pointer;+}++@mixin circle-icon-utility {+ display: flex;+ align-items: center;+ justify-content: center;+ min-width: 30px;+ min-height: 30px;+ font-size: $font-size-lg;+ border-radius: 50%;+}++@mixin circle-icon-sm-utility {+ @include circle-icon-utility;+ min-width: 23px;+ min-height: 23px;+ font-size: $font-size-sm;+}diff --git a/frontend/src/styles/components/_modal.scss b/frontend/src/styles/components/_modal.scssindex eea8900c..f641445a 100644--- a/frontend/src/styles/components/_modal.scss+++ b/frontend/src/styles/components/_modal.scss@@ -10,11 +10,11 @@max-height: 41.5px;height: 41.5px;line-height: 1;- @extend .no-select;+ @include no-select-utility;.modal-title {font-size: $font-size-base;- @extend .text-truncate;+ @include text-truncate-utility;> fa-icon {margin-right: 0.3rem;@@ -67,7 +67,7 @@}.app-tab-label {- @extend .text-truncate;+ @include text-truncate-utility;max-width: 100%;}diff --git a/frontend/src/styles/components/_products.scss b/frontend/src/styles/components/_products.scssdeleted file mode 100644index c667d5c3..00000000--- a/frontend/src/styles/components/_products.scss+++ /dev/null@@ -1,77 +0,0 @@-.products-list {- list-style: none;- margin: 0;- padding: 0;- height: auto;-- &.product-list-in-box {- border-bottom: .5px solid;- > .item {- box-shadow: none;- }- }-- > .item {- display: flex;- align-items: center;- padding: 3px 80px 3px 8px;- @extend .text-truncate;- }-- > li {- cursor: pointer;- }-- .product-img {- float: none;- min-width: 30px;- width: 30px;- min-height: 30px;- height: 30px;- border-radius: $btn-border-radius;- display: grid;- place-items: center;- margin-right: 0.5rem;-- img {- width: 20px;- height: 20px;- object-fit: contain;- }- }-- .product-info {- margin-left: 0;- min-width: 0;- }-- .product-title {- display: flex;- font-weight: 400;- white-space: nowrap;-- span:first-of-type {- @extend .text-truncate;- font-size: $font-size-xs;- }- }-- .product-badge {- display: flex;- align-self: center;- position: absolute;- right: 10px;- font-size: $font-size-xs;-- > span {- display: flex;- }- }-- .product-description {- @extend .text-truncate;- display: block;- font-size: $font-size-xs;- color: #999;- }-}diff --git a/frontend/src/styles/components/_profile.scss b/frontend/src/styles/components/_profile.scssindex 0f04d68a..7ffb76e1 100644--- a/frontend/src/styles/components/_profile.scss+++ b/frontend/src/styles/components/_profile.scss@@ -48,8 +48,3 @@padding: 3px;border: 3px solid $gray;}--.profile-username {- font-size: $font-size-lg;- margin-top: 5px;-}diff --git a/frontend/src/styles/components/_sidebar_left.scss b/frontend/src/styles/components/_sidebar_left.scssindex 7d403901..93b8b52f 100755--- a/frontend/src/styles/components/_sidebar_left.scss+++ b/frontend/src/styles/components/_sidebar_left.scss@@ -12,7 +12,7 @@width: $sidebar-apps-menus-width;.menu-title {- @extend .no-select;+ @include no-select-utility;display: flex;align-items: center;min-height: $sidebar-apps-height;@@ -24,7 +24,7 @@border-bottom: .5px solid $sidebar-light-apps-menu-title-bg;.menu-title-content {- @extend .text-truncate;+ @include text-truncate-utility;display: flex;align-items: center;padding-left: 6px;@@ -63,13 +63,13 @@}.sidebar-title {- @extend .text-truncate;+ @include text-truncate-utility;text-transform: uppercase;margin-right: auto;font-size: $font-size-xs;> span {- @extend .text-truncate;+ @include text-truncate-utility;}> fa-icon {@@ -117,8 +117,10 @@.badge {@extend .badge-color-full;position: absolute;- top: 2px;- right: 2px;+ top: 0;+ right: 0;+ transform: translate(15%, -15%);+ z-index: 1;min-width: 16px;height: 16px;padding: 0 5px;@@ -173,8 +175,8 @@padding: 0 10px;border-radius: $btn-border-radius;max-height: none;- @extend .text-truncate;- @extend .no-select-pointer;+ @include text-truncate-utility;+ @include no-select-pointer-utility;> fa-icon {font-size: $font-size-lg;@@ -205,7 +207,7 @@margin-top: auto;span {- @extend .no-select;+ @include no-select-utility;font-size: $font-size-2xs;}}diff --git a/frontend/src/styles/components/_sidebar_right.scss b/frontend/src/styles/components/_sidebar_right.scssindex f36ff55c..a375dd01 100755--- a/frontend/src/styles/components/_sidebar_right.scss+++ b/frontend/src/styles/components/_sidebar_right.scss@@ -20,7 +20,7 @@}.sidebar-title, .sidebar-component-title {- @extend .no-select;+ @include no-select-utility;display: flex;align-items: center;justify-content: center;@@ -46,7 +46,7 @@display: flex;align-items: center;width: 100%;- height: 45px;+ height: 35px;padding: .2rem .4rem .2rem .4rem;border-bottom: .5px solid transparent;}@@ -116,7 +116,7 @@}.control-sidebar-open {- @include media-breakpoint-up(md) {+ @include media-breakpoint-up(lg) {.content-wrapper {margin-right: $control-sidebar-width + $control-sidebar-menu-width;}diff --git a/frontend/src/styles/components/_tasks.scss b/frontend/src/styles/components/_tasks.scssindex 76e2bd68..32046b2c 100755--- a/frontend/src/styles/components/_tasks.scss+++ b/frontend/src/styles/components/_tasks.scss@@ -1,5 +1,5 @@.task-list {- @extend .no-select-pointer;+ @include no-select-pointer-utility;border-bottom: .5px solid transparent;font-size: $font-size-sm;diff --git a/frontend/src/styles/components/_texts.scss b/frontend/src/styles/components/_texts.scssindex 14aa660e..e3e4c6e0 100644--- a/frontend/src/styles/components/_texts.scss+++ b/frontend/src/styles/components/_texts.scss@@ -31,9 +31,7 @@}.text-truncate {- white-space: nowrap;- overflow: hidden;- text-overflow: ellipsis;+ @include text-truncate-utility;}.text-file-name-preserve {@@ -69,7 +67,7 @@}.text-bold {- font-weight: 550;+ font-weight: 500;}.fs-lg {diff --git a/frontend/src/styles/components/_theme_dark.scss b/frontend/src/styles/components/_theme_dark.scssindex 36728acb..88257515 100755--- a/frontend/src/styles/components/_theme_dark.scss+++ b/frontend/src/styles/components/_theme_dark.scss@@ -1,15 +1,5 @@//Dark Sidebar Mixin@mixin skin-dark-left-sidebar() {- .main-header {- .navbar-content {- .navbar-logo-button {- .logo-container {- background: $sidebar-dark-icons-menu-bg;- }- }- }- }-// Sidebar background color (Both .wrapper is responsible for sidebar bg color).wrapper, .left-sidebar {background-color: $sidebar-dark-apps-menu-bg;@@ -654,10 +644,6 @@border-bottom-color: $sidebar-dark-icons-menu-border-color;}- .product-img {- background-color: darken($sidebar-dark-icons-menu-border-color, 8%);- border: 1px solid $sidebar-dark-icons-menu-border-color;- }}app-files-recents-widget,app-comments-recents-widget {@@ -727,12 +713,6 @@border: 1px dashed rgba($dark-surface-border, 0.62);}}- .products-list > li:hover {- background-color: darken($sidebar-dark-apps-menu-title-bg, 2%);- }- .product-list-in-box {- border-bottom-color: $sidebar-dark-icons-menu-border-color;- }.ui-disabled {background-color: $sidebar-dark-icons-menu-bg !important;color: $body-color;diff --git a/frontend/src/styles/components/_theme_light.scss b/frontend/src/styles/components/_theme_light.scssindex 7ebcb8c6..b742e7ed 100755--- a/frontend/src/styles/components/_theme_light.scss+++ b/frontend/src/styles/components/_theme_light.scss@@ -1,15 +1,5 @@//Light Sidebar Mixins@mixin skin-light-left-sidebar() {- .main-header {- .navbar-content {- .navbar-logo-button {- .logo-container {- background: $sidebar-light-apps-menu-hover-color;- }- }- }- }-// Sidebar background color (Both .wrapper is responsible for sidebar bg color).wrapper, .left-sidebar {background-color: $sidebar-light-apps-menu-bg;@@ -470,10 +460,6 @@}.profile-page {background-color: $gray-lightest;-- .box {- background-color: $gray-lighter;- }}.user-groups-page {.app-table > tbody {@@ -632,10 +618,6 @@background-color: $white;}- .product-img {- background-color: $gray-lightest;- border: 0.5px solid darken($gray-lighter, 4%);- }}.bg-theme {background-color: darken($gray-lighter, 3%);@@ -714,12 +696,6 @@border: 1px dashed rgba($light-surface-border, 0.52);}}- .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%);}diff --git a/frontend/src/styles/components/_tree.scss b/frontend/src/styles/components/_tree.scssindex fe7b55f5..ba5b3161 100644--- a/frontend/src/styles/components/_tree.scss+++ b/frontend/src/styles/components/_tree.scss@@ -73,7 +73,7 @@position: relative;span {- @extend .no-select;+ @include no-select-utility;}}}diff --git a/frontend/src/styles/components/_variables.scss b/frontend/src/styles/components/_variables.scssindex e8f4fb7f..34660604 100644--- a/frontend/src/styles/components/_variables.scss+++ b/frontend/src/styles/components/_variables.scss@@ -108,7 +108,7 @@ $dark-text-muted-color: #b6bcc2;//Light theme$light-text-muted-color: #5f6f7f;$light-sidebar-mini-bg: #ebeef5;-$light-sidebar-mini-hover-bg: lighten(#d4e1f1, 2%);+$light-sidebar-mini-hover-bg: lighten(#d4e1f1, 1%);$light-sidebar-mini-active-bg: darken(#d4e1f1, 4%);$light-sidebar-mini-active-border: mix($primary, $gray-light, 30%);$light-sidebar-mini-active-icon: darken($primary, 5%);diff --git a/frontend/src/styles/components/_wizard.scss b/frontend/src/styles/components/_wizard.scssindex 3e9af4a8..ba49ae6f 100644--- a/frontend/src/styles/components/_wizard.scss+++ b/frontend/src/styles/components/_wizard.scss@@ -53,7 +53,7 @@height: 100%;&.active {- border: 2px dashed $dark-blue;;+ border: 2px dashed $dark-blue;color: $dark-blue;}}diff --git a/frontend/src/styles/components/index.scss b/frontend/src/styles/components/index.scssindex 46779694..7812d5d9 100644--- a/frontend/src/styles/components/index.scss+++ b/frontend/src/styles/components/index.scss@@ -16,7 +16,6 @@@import 'buttons';@import 'boxes';@import 'profile';-@import 'products';@import 'recents';@import 'search';@import 'tasks';diff --git a/frontend/src/styles/variables.scss b/frontend/src/styles/variables.scssindex 90896343..04fdf607 100644--- a/frontend/src/styles/variables.scss+++ b/frontend/src/styles/variables.scss@@ -233,7 +233,7 @@ $badge-padding-y: .35rem !default;// Pagination// ---------------------------------------------------------$pagination-font-size: $font-size-2xs !important;+$pagination-font-size: $font-size-sm !important;$pagination-color: $body-color;$pagination-hover-color: darken($body-color, 4%);$pagination-focus-color: $pagination-hover-color;