Skip to content

Commit

Permalink
Merge pull request #1066 from snypy/modal-language
Browse files Browse the repository at this point in the history
Fixes language and label filter options
  • Loading branch information
nezhar authored Mar 31, 2022
2 parents 78dc4ca + a1a46a4 commit 71802a3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/app/components/snippet/snippet.component.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div *ngIf="activeSnippet">
<div class="label-list" *ngIf="labels.length">
<span *ngFor="let label of activeSnippet.labels">
<span class="badge bg-info" *ngIf="(labels | filterBy: ['pk']:label)[0]">
{{ (labels | filterBy: ['pk']:label)[0].name }}
<span class="badge bg-info" *ngIf="(labels | filterBy: ['pk']:label:[true])[0]">
{{ (labels | filterBy: ['pk']:label:[true])[0].name }}
</span>
</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/app/modals/snippet-modal/snippet-modal.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,12 @@ <h4 class="modal-title" *ngIf="snippet">Edit snippet</h4>
</div>
</div>
</div>
<div *ngIf="(languages | filterBy: ['pk']:file.get('language').value).length">
<div *ngIf="(languages | filterBy: ['pk']:file.get('language').value:[true]).length">
<ngx-monaco-editor
style="height: 400px"
[options]="{
theme: 'vs-dark',
language: (languages | filterBy: ['pk']:file.get('language').value)[0].name,
language: (languages | filterBy: ['pk']:file.get('language').value:[true])[0].name,
scrollBeyondLastLine: false,
scrollbar: { alwaysConsumeMouseWheel: false }
}"
Expand Down

0 comments on commit 71802a3

Please sign in to comment.