Skip to content

Commit

Permalink
resources: smoother navigation (fixes #7927) (#7929)
Browse files Browse the repository at this point in the history
Co-authored-by: dogi <[email protected]>
  • Loading branch information
jessewashburn and dogi authored Dec 16, 2024
1 parent 6d7e593 commit dad08fd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "planet",
"license": "AGPL-3.0",
"version": "0.16.3",
"version": "0.16.4",
"myplanet": {
"latest": "v0.21.40",
"min": "v0.20.40"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@

<ng-template #actionButtons>
<ng-container *ngIf="!parent">
<a mat-raised-button *ngIf="resource.doc?._attachments" [href]="resourceSrc" target="_blank" color="accent" i18n>Open in new tab</a>
<button mat-raised-button color="accent" (click)="libraryToggle(resource._id, 'add')" i18n class="margin-lr-3" *ngIf="!isUserEnrolled">
<a mat-raised-button *ngIf="resource.doc?._attachments" [href]="resourceSrc" target="_blank" color="accent" i18n class = "toolbar-button margin-lr-3">Open in new tab</a>
<button mat-raised-button color="accent" (click)="libraryToggle(resource._id, 'add')" i18n class="toolbar-button margin-lr-3" *ngIf="!isUserEnrolled">
Add to myLibrary
</button>
<button mat-raised-button color="accent" (click)="libraryToggle(resource._id, 'remove')" i18n class="margin-lr-3" *ngIf="isUserEnrolled">
<button mat-raised-button color="accent" (click)="libraryToggle(resource._id, 'remove')" i18n class="toolbar-button margin-lr-3" *ngIf="isUserEnrolled">
Remove from myLibrary
</button>
</ng-container>
Expand Down
4 changes: 4 additions & 0 deletions src/app/resources/view-resources/resources-view.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
max-height: 60vh;
}
}

.toolbar-button {
flex-shrink: 0;
}

@media (max-width: $screen-sm) {
.view-container {
Expand Down

0 comments on commit dad08fd

Please sign in to comment.