Skip to content

Commit

Permalink
Conver history panel to primeNG sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
McNaBry committed Nov 13, 2024
1 parent c734a80 commit 17bf23f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
20 changes: 10 additions & 10 deletions frontend/src/app/history/history.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,21 @@ <h3 class="">Matching History</h3>
</ng-template>
</p-table>
</div>
<div class="sliding-panel" [class.open]="isPanelVisible">
<div class="panel-header">
<p-sidebar
[(visible)]="isPanelVisible"
position="right"
[blockScroll]="true"
styleClass="w-10 md:w-4"
transitionOptions="200ms cubic-bezier(0, 0, 0.2, 1)"
(onHide)="closePanel()">
<ng-template pTemplate="header">
<h3>{{ panelHistory?.question?.title }}</h3>
<p-button
icon="pi pi-times"
severity="secondary"
label="Close"
(onClick)="closePanel()"
class="p-button-text" />
</div>
</ng-template>
<div class="panel-content">
<p style="white-space: pre-wrap">{{ panelHistory?.question?.description }}</p>
<h4>Submitted Solution</h4>
<div #editor class="editor-content text-lg"></div>
</div>
</div>
</p-sidebar>
<p-toast position="bottom-right" [breakpoints]="{ '920px': { width: '90%' } }" />
</div>
3 changes: 2 additions & 1 deletion frontend/src/app/history/history.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@ import { EditorState, Extension } from '@codemirror/state';
import { EditorView, basicSetup } from 'codemirror';
import { languageMap } from '../collaboration/editor/languages';
import { ToastModule } from 'primeng/toast';
import { SidebarModule } from 'primeng/sidebar';
import { Router } from '@angular/router';

@Component({
standalone: true,
imports: [TableModule, CommonModule, InputTextModule, ButtonModule, IconFieldModule, InputIconModule, ToastModule],
imports: [SidebarModule, TableModule, CommonModule, InputTextModule, ButtonModule, IconFieldModule, InputIconModule, ToastModule],

Check failure on line 21 in frontend/src/app/history/history.component.ts

View workflow job for this annotation

GitHub Actions / build-service (frontend)

Replace `SidebarModule,·TableModule,·CommonModule,·InputTextModule,·ButtonModule,·IconFieldModule,·InputIconModule,·ToastModule` with `⏎········SidebarModule,⏎········TableModule,⏎········CommonModule,⏎········InputTextModule,⏎········ButtonModule,⏎········IconFieldModule,⏎········InputIconModule,⏎········ToastModule,⏎····`
providers: [MessageService, DatePipe],
templateUrl: './history.component.html',
styleUrl: './history.component.css',
Expand Down

0 comments on commit 17bf23f

Please sign in to comment.