Skip to content

Commit

Permalink
fix: improve add bookmark dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
QuCMGisaia committed Feb 12, 2025
1 parent ca649f9 commit cc54d51
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export class BookmarkMenuComponent implements OnInit, OnDestroy {

public openDialogAdd() {
if (!this.addBookmarkDisabled) {
this.dialog.open(BookmarkAddDialogComponent, { data: { name: null } });
this.dialog.open(BookmarkAddDialogComponent, { data: { name: null }, id: 'add-bookmark-dialog' });
}
}

Expand All @@ -104,7 +104,4 @@ export class BookmarkMenuComponent implements OnInit, OnDestroy {
this._onDestroy$.next(true);
this._onDestroy$.complete();
}



}
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,21 @@
* under the License.
*/

// TODO: To override globally
::ng-deep.mdc-dialog__surface {
padding: 24px;
::ng-deep #add-bookmark-dialog .mat-mdc-dialog-surface {
padding: 12px;
}

.bookmark__add {
padding: 0;

&--title {
margin: 0 0 20px;
padding: 0;

.mdc-dialog__title::before {
--mdc-dialog-subhead-weight: 700;
--mdc-dialog-subhead-tracking: 0;
--mdc-dialog-subhead-size: 20px;

.mat-mdc-dialog-title::before {
height: 0;
display: block;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
.bookmark-table-items {
max-height: 60vh;
overflow-y: auto;
padding-top: 24px;
padding: 24px;
min-width: unset;

.mat-column-checked {
flex: 0 0 50px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class BookmarkComponent {
}

public combine() {
const dialogRef = this.dialog.open(BookmarkAddDialogComponent, { data: { name: null } });
const dialogRef = this.dialog.open(BookmarkAddDialogComponent, { data: { name: null }, id: 'add-bookmark-dialog' });
dialogRef.afterClosed().subscribe(bookmarkName => {
if (bookmarkName) {
this.bookmarkService.createCombineBookmark(bookmarkName, new Set(this.itemsCheck));
Expand All @@ -156,7 +156,7 @@ export class BookmarkComponent {
}

public updateBookMarkName(id, name){
const dialogRef = this.dialog.open(BookmarkAddDialogComponent, { data: { name: name } });
const dialogRef = this.dialog.open(BookmarkAddDialogComponent, { data: { name: name }, id: 'add-bookmark-dialog' });
dialogRef.afterClosed().subscribe(bookmarkName => {
if (bookmarkName) {
this.bookmarkService.updateBookmarkName(bookmarkName, id);
Expand Down

0 comments on commit cc54d51

Please sign in to comment.