Skip to content

Commit e4cdce7

Browse files
committed
feature - expand panels and bookmark text in search results for single results
1 parent 7585a48 commit e4cdce7

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

frontend/src/app/shared/async-bookmark-list/async-bookmark-list.component.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
<input autofocus type="search" [(ngModel)]="filterText" class="form-control" placeholder="Filter...">
55
</div>
66
<div class="clear"></div>
7-
<div class="mt-3" *ngFor="let bookmark of bookmarks | bookmarkFilter: filterText">
7+
<div class="mt-3" *ngFor="let bookmark of bookmarks | bookmarkFilter: filterText as filteredBookmarks">
88
<app-bookmark-list-element
9+
[showMoreText] = "filteredBookmarks.length === 1 || bookmarks.length === 1"
910
[bookmark]="bookmark"
1011
[userData$]="userData$"
1112
[queryText]="queryText"

frontend/src/app/shared/dialog/history-dialog/hot-keys-dialog.component.html

+5-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@ <h2 mat-dialog-title [innerHTML]="title"></h2>
88
</div>
99
<mat-dialog-content *ngIf="(bookmarks$ | async) as bookmarks" class="mt-2 pt-1 pb-1">
1010
<mat-accordion>
11-
<mat-expansion-panel *ngFor="let bookmark of bookmarks | bookmarkFilter: filterText; index as i">
11+
<mat-expansion-panel
12+
*ngFor="let bookmark of bookmarks | bookmarkFilter: filterText as filteredBookmarks; index as i"
13+
[expanded]="filteredBookmarks.length === 1">
14+
1215
<mat-expansion-panel-header *ngIf="i<15">
1316
<div class="p-3">
1417
<h5 class="card-title">
@@ -31,7 +34,7 @@ <h5 class="card-title">
3134
</mat-expansion-panel-header>
3235

3336
<ng-template matExpansionPanelContent>
34-
<app-bookmark-text [bookmark]="bookmark"
37+
<app-bookmark-text [bookmark]="bookmark" [showMoreText]="true"
3538
(click)="addToHistoryService.onClickInDescription(true, $event, bookmark)"
3639
(auxclick)="addToHistoryService.onMiddleClickInDescription(true, $event, bookmark)">
3740
</app-bookmark-text>

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "Codever",
3-
"version": "6.0.0",
3+
"version": "6.1.0",
44
"description": "Codever - bookmarks and snippets manager for developers & co",
55
"scripts": {
66
"test": "echo \"Error: no test specified\" && exit 1",

0 commit comments

Comments
 (0)