-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat - add "clone" bookmark functionality
- Loading branch information
Showing
10 changed files
with
94 additions
and
4 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
apps/codever-ui/src/app/my-bookmarks/clone-bookmark/clone-bookmark.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<app-save-bookmark-form | ||
[bookmark$]="bookmark$" | ||
[isUpdate]="false" | ||
[cloneBookmark]="true" | ||
></app-save-bookmark-form> |
35 changes: 35 additions & 0 deletions
35
apps/codever-ui/src/app/my-bookmarks/clone-bookmark/clone-bookmark.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
label { | ||
display: inline-block; | ||
margin: 0.5em 0; | ||
color: #607d8b; | ||
font-weight: bold; | ||
} | ||
input { | ||
height: 2em; | ||
font-size: 1em; | ||
padding-left: 0.4em; | ||
} | ||
|
||
input[type='checkbox'], | ||
input[type='radio'] { | ||
vertical-align: middle; | ||
position: relative; | ||
bottom: 1px; | ||
} | ||
|
||
#shared_label { | ||
width: 100%; | ||
} | ||
|
||
mat-chip { | ||
max-width: 200px; | ||
} | ||
|
||
.demo-chip-list { | ||
width: 100%; | ||
} | ||
|
||
.markdown-link { | ||
font-weight: normal; | ||
margin-left: 0.15rem; | ||
} |
18 changes: 18 additions & 0 deletions
18
apps/codever-ui/src/app/my-bookmarks/clone-bookmark/clone-bookmark.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import { Bookmark } from '../../core/model/bookmark'; | ||
import { Observable, of } from 'rxjs'; | ||
|
||
@Component({ | ||
selector: 'app-clone-bookmark', | ||
templateUrl: './clone-bookmark.component.html', | ||
styleUrls: ['./clone-bookmark.component.scss'], | ||
}) | ||
export class CloneBookmarkComponent implements OnInit { | ||
bookmark$: Observable<Bookmark>; | ||
|
||
constructor() {} | ||
|
||
ngOnInit(): void { | ||
this.bookmark$ = of(window.history.state.bookmark); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters