diff --git a/src/app/components/shared/_dialogs/motd-temp-dialog/motd-temp-dialog.component.html b/src/app/components/shared/_dialogs/motd-temp-dialog/motd-temp-dialog.component.html new file mode 100644 index 0000000000000000000000000000000000000000..7ba590f34f46d4571a9ba926e0b400c9bf178381 --- /dev/null +++ b/src/app/components/shared/_dialogs/motd-temp-dialog/motd-temp-dialog.component.html @@ -0,0 +1,22 @@ + +<ars-row> + <h2 tabindex="0" style="padding:0;margin:0 0 20px 0;"> + Message of the day + </h2> + <mat-divider></mat-divider> +</ars-row> +<mat-dialog-content class="container" ars-flex-box> + <ars-row ars-flex-box> + <markdown class="images" [data]="content"></markdown> + </ars-row> + <ars-row [height]="32"></ars-row> + <ars-fill></ars-fill> +</mat-dialog-content> +<ars-row> + <app-dialog-action-buttons + buttonsLabelSection="imprint" + [cancelButtonClickAction]="buildDeclineActionCallback()" + [spacing]="false"> + </app-dialog-action-buttons> +</ars-row> + diff --git a/src/app/components/shared/_dialogs/motd-temp-dialog/motd-temp-dialog.component.scss b/src/app/components/shared/_dialogs/motd-temp-dialog/motd-temp-dialog.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..d494f46ae4619192643a3bb7ffd99cd155617c77 --- /dev/null +++ b/src/app/components/shared/_dialogs/motd-temp-dialog/motd-temp-dialog.component.scss @@ -0,0 +1,38 @@ + +:host{ + .align-center-y{ + display:flex; + justify-content:center; + flex-direction:column; + } + .container{ + width:100%; + height:calc( 100% - 115px ) !important; + .message{ + :last-child{ + margin-bottom:0px; + } + } + &-title{ + font-weight:lighter; + margin-left:1px; + } + } + mat-dialog-content{ + height:100% !important; + max-height:100% !important; + } + mat-dialog-container{ + padding:0 !important; + } + ::ng-deep{ + .images img { + max-width: 100% !important; + } + .mat-checkbox-frame { + border-color:var(--on-surface); + } + } + +} + diff --git a/src/app/components/shared/_dialogs/motd-temp-dialog/motd-temp-dialog.component.spec.ts b/src/app/components/shared/_dialogs/motd-temp-dialog/motd-temp-dialog.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..29515f0440c2c8df2f2f17b47b9d442e45a4eaa3 --- /dev/null +++ b/src/app/components/shared/_dialogs/motd-temp-dialog/motd-temp-dialog.component.spec.ts @@ -0,0 +1,25 @@ +// import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +// +// import { MotdTempDialogComponent } from './motd-temp-dialog.component'; +// +// describe('MotdTempDialogComponent', () => { +// let component: MotdTempDialogComponent; +// let fixture: ComponentFixture<MotdTempDialogComponent>; +// +// beforeEach(async(() => { +// TestBed.configureTestingModule({ +// declarations: [ MotdTempDialogComponent ] +// }) +// .compileComponents(); +// })); +// +// beforeEach(() => { +// fixture = TestBed.createComponent(MotdTempDialogComponent); +// component = fixture.componentInstance; +// fixture.detectChanges(); +// }); +// +// it('should create', () => { +// expect(component).toBeTruthy(); +// }); +// }); diff --git a/src/app/components/shared/_dialogs/motd-temp-dialog/motd-temp-dialog.component.ts b/src/app/components/shared/_dialogs/motd-temp-dialog/motd-temp-dialog.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..777e0c84b3396cd93a5a3ba8d150ce3092cee47d --- /dev/null +++ b/src/app/components/shared/_dialogs/motd-temp-dialog/motd-temp-dialog.component.ts @@ -0,0 +1,93 @@ +import { Component, OnInit } from '@angular/core'; +import { MatDialog, MatDialogRef } from '@angular/material/dialog'; + +@Component({ + selector: 'app-motd-temp-dialog', + templateUrl: './motd-temp-dialog.component.html', + styleUrls: ['./motd-temp-dialog.component.scss'] +}) +export class MotdTempDialogComponent implements OnInit { + + public content: string; + + public de = '# Serverwechsel\n' + + '\n' + + 'Liebe User von »frag.jetzt«,\n' + + '\n' + + 'wir freuen uns sehr, dass unser neues Audience-Response-System ' + + 'bei Ihnen so gut ankommt!\n' + + '\n' + + 'Es gibt Tage, an denen 2.000 Benutzer unsere App nutzen. ' + + 'Mehr als 700 Lehrerinnen und Lehrer aus Deutschland, ' + + 'Österreich und der Schweiz nutzen "frag.jetzt" im ' + + 'Online-Unterricht. Das macht uns sehr stolz und hat ' + + 'uns veranlasst, einen leistungsfähigeren Server einzurichten, ' + + 'um dem weiteren Andrang gerecht zu werden.\n' + + '\n' + + '**Kurz gesagt: Wir werden am 15. ' + + 'November umziehen. Sie werden davon nichts merken, denn die ' + + 'Adresse https://frag.jetzt bleibt gleich.**\n' + + '\n' + + 'Wenn Sie die Fragen aus Ihren alten Sitzungen ' + + 'speichern wollen, müssen Sie sie bis zum Serverwechsel exportieren. ' + + 'Gehen Sie dazu auf die Eingangsseite Ihrer Sitzung, klicken ' + + 'Sie auf das Zahnradsymbol oben rechts und dann auf die Option ' + + '»Fragen«. Die exportierte Datei kann mit Excel, ' + + 'Numbers oder LibreOffice weiterverarbeitet werden. ' + + 'Alle Markierungen, Bewertungen und Bonusmarken werden mit exportiert.\n' + + '\n' + + 'Wenn Sie Fragen zum Serverwechsel haben oder uns ein Feedback zur App geben möchten, besuchen Sie bitte die Sitzung 11 22 33 44.\n' + + '\n' + + 'Ihr »frag.jetzt«-Team\n'; + + public en = '# Server change\n' + + '\n' + + 'Dear users of »frag.jetzt«,\n' + + '\n' + + 'We are very pleased that our new audience response ' + + 'app is so well received by you!\n' + + '\n' + + 'There are days when 2,000 users use our app. ' + + 'More than 700 teachers from Germany, Austria ' + + 'and Switzerland use "frag.jetzt" in online lessons.' + + ' This makes us very proud and has prompted us to set ' + + 'up a more powerful server to cope with the continued rush.\n' + + '\n' + + '**In short: We will move on November 15th. ' + + 'You won\'t notice anything of this, because ' + + 'the address https://frag.jetzt will remain the same.**\n' + + '\n' + + 'If you want to save the questions from your ' + + 'old sessions, you have to export them ' + + 'until the server change. To do this, go to the home page' + + ' of your session, click on the gear icon in the top' + + ' right corner and then on the »Questions« option.' + + ' The exported file can be further processed with Excel, ' + + 'Numbers or Libre Office. All markers, ratings and bonus tokens' + + ' are exported with it.\n' + + '\n' + + 'If you have any questions about the ' + + 'server change or want to give us feedback on ' + + 'the app, please visit session 11 22 33 44.\n' + + '\n' + + 'Your »frag.jetzt« team\n'; + + constructor( + public dialogRef: MatDialogRef<MotdTempDialogComponent>, + public dialog: MatDialog + ) { } + + + buildDeclineActionCallback(): () => void { + return () => this.dialogRef.close(); + } + + ngOnInit(): void { + if (localStorage.getItem('currentLang') === 'de') { + this.content = this.de; + } else { + this.content = this.en; + } + } + +} diff --git a/src/app/components/shared/footer/footer.component.ts b/src/app/components/shared/footer/footer.component.ts index be2796a654ee5425a270708933d7b0c3f5142c93..b00b314171ba6d7ed9ee48f0651861c5cfe39ccc 100644 --- a/src/app/components/shared/footer/footer.component.ts +++ b/src/app/components/shared/footer/footer.component.ts @@ -16,6 +16,7 @@ import { Theme } from '../../../../theme/Theme'; import { OverlayComponent } from '../../home/_dialogs/overlay/overlay.component'; import { AppComponent } from '../../../app.component'; import { StyleService } from '../../../../../projects/ars/src/lib/style/style.service'; +import { MotdTempDialogComponent } from '../_dialogs/motd-temp-dialog/motd-temp-dialog.component'; @Component({ selector: 'app-footer', @@ -50,6 +51,12 @@ export class FooterComponent implements OnInit { } ngOnInit() { + const motd = this.dialog.open(MotdTempDialogComponent, { + width: '80%', + maxWidth: '600px', + minHeight: '95%', + height: '95%', + }); this.deviceType = localStorage.getItem('deviceType'); if (!this.themeService.getThemeByKey(this.themeClass) || !this.themeService.getTheme()['source']['_value']) { if (this.deviceType === 'mobile') { diff --git a/src/app/components/shared/shared.module.ts b/src/app/components/shared/shared.module.ts index c5e4d0cbc1235fd18194382ae9c4a032e63a350b..af7e8bbbea39d300504540010de09e63a67d90d0 100644 --- a/src/app/components/shared/shared.module.ts +++ b/src/app/components/shared/shared.module.ts @@ -26,6 +26,7 @@ import { CommentAnswerComponent } from './comment-answer/comment-answer.componen import { MarkdownModule } from 'ngx-markdown'; import { MatRippleModule } from '@angular/material/core'; import { QRCodeModule } from 'angularx-qrcode'; +import { MotdTempDialogComponent } from './_dialogs/motd-temp-dialog/motd-temp-dialog.component'; @NgModule({ imports: [ @@ -57,7 +58,8 @@ import { QRCodeModule } from 'angularx-qrcode'; DialogActionButtonsComponent, QrCodeDialogComponent, RemoveFromHistoryComponent, - CommentAnswerComponent + CommentAnswerComponent, + MotdTempDialogComponent ], exports: [ RoomJoinComponent,