Skip to content

Commit

Permalink
Merge pull request #53 from Potits-chats/LMST2-54-Formulaire-signaler…
Browse files Browse the repository at this point in the history
…-un-bug

Add bug report
  • Loading branch information
Eva1512 authored Jun 5, 2024
2 parents 8ce5460 + 1d05b97 commit 291d42e
Show file tree
Hide file tree
Showing 6 changed files with 71 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { CguComponent } from './components/cgu/cgu.component';
import { ErreurComponent } from './components/erreur/erreur.component';
import { AuthGuard } from '@auth0/auth0-angular';
import { TchatComponent } from './components/tchat/tchat.component';
import { BugComponent } from './components/bug/bug.component';

const routes: Routes = [
{
Expand Down Expand Up @@ -74,6 +75,10 @@ const routes: Routes = [
path : 'callback',
component : HomeComponent
},
{
path: 'bug',
component: BugComponent
},
{
path: '**',
redirectTo: 'erreur',
Expand Down
3 changes: 3 additions & 0 deletions src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ import { FileUploadModule } from 'primeng/fileupload';
import { AccordionModule } from 'primeng/accordion';

import { ToastModule } from 'primeng/toast';
import { BugComponent } from './components/bug/bug.component';


@NgModule({
declarations: [
Expand All @@ -67,6 +69,7 @@ import { ToastModule } from 'primeng/toast';
TchatComponent,
TchatIconComponent,
TchatMessageComponent,
BugComponent,
],
imports: [
BrowserModule,
Expand Down
5 changes: 5 additions & 0 deletions src/app/components/bug/bug.component.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- bug-report.component.html -->
<div class="iframe-container">
<iframe scrolling="no" data-tally-src="https://tally.so/embed/woBOee" width="100%" height="100%" frameborder="0" marginheight="0" marginwidth="0" title="Signaler un bug" style="width: 100%; height: 100%; border: none; scrollbar-width: none!important;"></iframe>
</div>

19 changes: 19 additions & 0 deletions src/app/components/bug/bug.component.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/* bug-report.component.css */
.iframe-container {
position: relative;
width: 100%;
height: 100vh; /* Utilisez 100vh pour occuper toute la hauteur de la fenêtre */
overflow: hidden;
}

.iframe-container iframe {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
border: none;
}

21 changes: 21 additions & 0 deletions src/app/components/bug/bug.component.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { BugComponent } from './bug.component';

describe('BugComponent', () => {
let component: BugComponent;
let fixture: ComponentFixture<BugComponent>;

beforeEach(() => {
TestBed.configureTestingModule({
declarations: [BugComponent]
});
fixture = TestBed.createComponent(BugComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
18 changes: 18 additions & 0 deletions src/app/components/bug/bug.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { AfterViewInit, Component } from '@angular/core';

@Component({
selector: 'app-bug',
templateUrl: './bug.component.html',
styleUrls: ['./bug.component.scss']
})
export class BugComponent implements AfterViewInit {

constructor() { }

ngAfterViewInit(): void {
const script = document.createElement('script');
script.src = 'https://tally.so/widgets/embed.js';
script.async = true;
document.body.appendChild(script);
}
}

1 comment on commit 291d42e

@vercel
Copy link

@vercel vercel bot commented on 291d42e Jun 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.