Skip to content
Snippets Groups Projects
Commit d70109f4 authored by Klaus-Dieter Quibeldey-Cirkel's avatar Klaus-Dieter Quibeldey-Cirkel
Browse files

Merge branch '508-create-temporary-motd-dialog' into 'master'

implement motd temp

Closes #508

See merge request arsnova/frag.jetzt!466
parents fa88621f e284af1a
No related merge requests found
<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>
: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);
}
}
}
// 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();
// });
// });
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;
}
}
}
...@@ -16,6 +16,7 @@ import { Theme } from '../../../../theme/Theme'; ...@@ -16,6 +16,7 @@ import { Theme } from '../../../../theme/Theme';
import { OverlayComponent } from '../../home/_dialogs/overlay/overlay.component'; import { OverlayComponent } from '../../home/_dialogs/overlay/overlay.component';
import { AppComponent } from '../../../app.component'; import { AppComponent } from '../../../app.component';
import { StyleService } from '../../../../../projects/ars/src/lib/style/style.service'; import { StyleService } from '../../../../../projects/ars/src/lib/style/style.service';
import { MotdTempDialogComponent } from '../_dialogs/motd-temp-dialog/motd-temp-dialog.component';
@Component({ @Component({
selector: 'app-footer', selector: 'app-footer',
...@@ -50,6 +51,12 @@ export class FooterComponent implements OnInit { ...@@ -50,6 +51,12 @@ export class FooterComponent implements OnInit {
} }
ngOnInit() { ngOnInit() {
const motd = this.dialog.open(MotdTempDialogComponent, {
width: '80%',
maxWidth: '600px',
minHeight: '95%',
height: '95%',
});
this.deviceType = localStorage.getItem('deviceType'); this.deviceType = localStorage.getItem('deviceType');
if (!this.themeService.getThemeByKey(this.themeClass) || !this.themeService.getTheme()['source']['_value']) { if (!this.themeService.getThemeByKey(this.themeClass) || !this.themeService.getTheme()['source']['_value']) {
if (this.deviceType === 'mobile') { if (this.deviceType === 'mobile') {
......
...@@ -26,6 +26,7 @@ import { CommentAnswerComponent } from './comment-answer/comment-answer.componen ...@@ -26,6 +26,7 @@ import { CommentAnswerComponent } from './comment-answer/comment-answer.componen
import { MarkdownModule } from 'ngx-markdown'; import { MarkdownModule } from 'ngx-markdown';
import { MatRippleModule } from '@angular/material/core'; import { MatRippleModule } from '@angular/material/core';
import { QRCodeModule } from 'angularx-qrcode'; import { QRCodeModule } from 'angularx-qrcode';
import { MotdTempDialogComponent } from './_dialogs/motd-temp-dialog/motd-temp-dialog.component';
@NgModule({ @NgModule({
imports: [ imports: [
...@@ -57,7 +58,8 @@ import { QRCodeModule } from 'angularx-qrcode'; ...@@ -57,7 +58,8 @@ import { QRCodeModule } from 'angularx-qrcode';
DialogActionButtonsComponent, DialogActionButtonsComponent,
QrCodeDialogComponent, QrCodeDialogComponent,
RemoveFromHistoryComponent, RemoveFromHistoryComponent,
CommentAnswerComponent CommentAnswerComponent,
MotdTempDialogComponent
], ],
exports: [ exports: [
RoomJoinComponent, RoomJoinComponent,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment