Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 14 additions & 17 deletions src/app/features/files/pages/files/files.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,20 @@
}

<div class="flex flex-grow-0 w-full sm:w-30rem">
<p-floatlabel class="w-full md:w-56" variant="in">
<p-select
inputId="in_label"
[options]="rootFoldersOptions()"
[(ngModel)]="currentRootFolder"
styleClass="w-full"
variant="filled"
>
<ng-template #selectedItem let-selectedOption>
<p class="provider-name">{{ selectedOption.label }}</p>
</ng-template>
<ng-template #item let-option>
<p class="provider-name">{{ option.label }}</p>
</ng-template>
</p-select>
<label for="in_label">{{ currentRootFolder()?.label }}</label>
</p-floatlabel>
<p-select
inputId="in_label"
[options]="rootFoldersOptions()"
[(ngModel)]="currentRootFolder"
styleClass="w-full"
variant="filled"
>
<ng-template #selectedItem let-selectedOption>
<p class="provider-name">{{ selectedOption.label }}</p>
</ng-template>
<ng-template #item let-option>
<p class="provider-name">{{ option.label }}</p>
</ng-template>
</p-select>
</div>

<div class="flex flex-column gap-4 md:justify-content-between md:flex-row md:flex-wrap">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,27 @@
</div>
} @else {
<div class="overflow-auto">
@for (item of reviews(); track $index) {
<div class="recent-activity-item flex align-items-center justify-content-between py-2 white-space-nowrap">
<div class="flex align-items-center gap-1">
<osf-icon
[class]="reviewStatusIcon[item.toState].value"
[iconClass]="reviewStatusIcon[item.toState].icon"
></osf-icon>
<span class="ml-2">{{ item.creator.name }}</span>
<span>{{ preprintReviewStatus[item.toState].label | translate: { name: item.preprint.name } }}</span>
<span>{{ item.provider.name }}</span>
</div>
<div class="w-max">
@for (item of reviews(); track $index) {
<div
class="recent-activity-item flex w-full align-items-center justify-content-between py-2 white-space-nowrap"
>
<div class="flex align-items-center gap-1">
<osf-icon
[class]="reviewStatusIcon[item.toState].value"
[iconClass]="reviewStatusIcon[item.toState].icon"
></osf-icon>
<span class="ml-2">{{ item.creator.name }}</span>
<span>{{ preprintReviewStatus[item.toState].label | translate: { name: item.preprint.name } }}</span>
<span>{{ item.provider.name }}</span>
</div>

<p class="flex flex-wrap gap-1 ml-3">
{{ item.dateModified | date: 'MMM d, y h:mm a' }}
</p>
</div>
}
<p class="flex flex-wrap gap-1 ml-3">
{{ item.dateModified | date: 'MMM d, y h:mm a' }}
</p>
</div>
}
</div>
</div>

@if (totalCount() > 10) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { TranslatePipe } from '@ngx-translate/core';

import { Button } from 'primeng/button';

import { timer } from 'rxjs';

import { CommonModule } from '@angular/common';
import { AfterViewInit, Component, effect, ElementRef, inject, input, signal, viewChild } from '@angular/core';
import { Router } from '@angular/router';
Expand Down Expand Up @@ -37,8 +39,10 @@ export class TruncatedTextComponent implements AfterViewInit {

constructor() {
effect(() => {
if (this.text()) {
const currentText = this.text();
if (currentText) {
this.isTextExpanded.set(false);
timer(0).subscribe(() => this.checkTextOverflow());
}
});
}
Expand Down
4 changes: 4 additions & 0 deletions src/styles/overrides/table.scss
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ p-table {
tr:not(.loading-row) {
cursor: pointer;
}

td {
max-width: 20vw;
}
}

.addon-table {
Expand Down
Loading