Merge branch 'feedback-button' into 'develop'

Feedback button

See merge request framasoft/framadate/funky-framadate-front!38
This commit is contained in:
ty kayn 2020-06-07 13:47:39 +02:00
commit f00afc94db
8 changed files with 106 additions and 2 deletions

View File

@ -3,6 +3,7 @@
<main>
<router-outlet></router-outlet>
<app-feedback></app-feedback>
</main>
<app-footer></app-footer>

View File

@ -22,6 +22,7 @@ import { AppComponent } from './app.component';
import { CoreModule } from './core/core.module';
import { OldStuffModule } from './features/old-stuff/old-stuff.module';
import { SharedModule } from './shared/shared.module';
import { ParticipationModule } from './features/participation/participation.module';
export class MyMissingTranslationHandler implements MissingTranslationHandler {
public handle(params: MissingTranslationHandlerParams): string {
@ -59,7 +60,7 @@ export function HttpLoaderFactory(http: HttpClient): TranslateHttpLoader {
},
useDefaultLang: false,
}),
OldStuffModule,
ParticipationModule,
],
providers: [Title, TranslateService],
bootstrap: [AppComponent],

View File

@ -10,5 +10,6 @@ import { PollComponent } from './poll/poll.component';
@NgModule({
declarations: [ParticipationComponent, PollComponent],
imports: [CommonModule, ParticipationRoutingModule, SharedModule, TranslateModule.forChild({ extend: true })],
exports: [],
})
export class ParticipationModule {}

View File

@ -0,0 +1,23 @@
<div class="feedback-container">
<div class="feedback-choices" *ngIf="isOpen" [ngClass]="{ active: isOpen }">
<a class="link" href="mailto:contact@cipherbliss.com">
<i class="fa fa-mail-forward"></i>
Par email
</a>
<a class="link" href="https://riot.im/app/#/room/#framadate:matrix.org">
<i class="fa fa-matrix-org"></i>
Par Matrix
</a>
<a class="link" href="https://framateam.org/ux-framatrucs/channels/framadate">
<i class="fa fa-comments"></i>
Discuter sur Framateam
</a>
<a class="link" href="https://framagit.org/framasoft/framadate/funky-framadate-front">
<i class="fa fa-gitlab"></i>
Créer une Issue sur Framagit
</a>
</div>
<div class="button" (click)="isOpen = !isOpen" [ngClass]="{ active: isOpen }">
<i class="fa fa-comment"></i> feedback
</div>
</div>

View File

@ -0,0 +1,39 @@
:host {
position: fixed;
bottom: 1em;
right: 1em;
color: white;
.feedback-choices {
&.active {
background: #0c5593;
border-radius: 0.5em;
padding: 1em;
margin-bottom: 0.5em;
}
}
.link {
margin: 1ch;
display: block;
max-width: 10em;
color: white;
padding: 0.5rem 1rem;
&:hover {
background: white;
color: black;
}
}
i {
color: white;
margin: 1ch;
}
.button {
float: right;
color: white;
background: #0c5593;
padding: 1em;
border-radius: 2em;
&.active {
background: #2e6da4;
}
}
}

View File

@ -0,0 +1,24 @@
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { FeedbackComponent } from './feedback.component';
describe('FeedbackComponent', () => {
let component: FeedbackComponent;
let fixture: ComponentFixture<FeedbackComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [FeedbackComponent],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(FeedbackComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

View File

@ -0,0 +1,13 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-feedback',
templateUrl: './feedback.component.html',
styleUrls: ['./feedback.component.scss'],
})
export class FeedbackComponent implements OnInit {
private isOpen = false;
constructor() {}
ngOnInit(): void {}
}

View File

@ -17,9 +17,10 @@ import { ConfirmationService, MessageService } from 'primeng/api';
import { PageNotFoundComponent } from './components/page-not-found/page-not-found.component';
import { PollPageComponent } from './components/poll-page/poll-page.component';
import { FeedbackComponent } from './components/feedback/feedback.component';
@NgModule({
declarations: [PageNotFoundComponent, PollPageComponent],
declarations: [PageNotFoundComponent, PollPageComponent, FeedbackComponent],
imports: [
CommonModule,
ChartsModule,
@ -38,6 +39,7 @@ import { PollPageComponent } from './components/poll-page/poll-page.component';
ChartsModule,
ConfirmDialogModule,
DialogModule,
FeedbackComponent,
InputSwitchModule,
InputTextareaModule,
MessageModule,