Add legal notice and privacy police

enhanced visuals and site container
This commit is contained in:
Sean Engelhardt 2018-08-02 16:39:08 +02:00 committed by FinnStutzenstein
parent ec646a80dc
commit a6ba1b92dc
14 changed files with 226 additions and 16 deletions

View File

@ -0,0 +1,9 @@
<h2 mat-dialog-title>Impressum</h2>
<mat-dialog-content>
OpenSlides ist ein freies, webbasiertes Präsentations- und Versammlungssystem zur Darstellung und Steuerung von Tagesordnung,
Anträgen und Wahlen einer Versammlung.
</mat-dialog-content>
<br>
<mat-dialog-content>
OpenSlides 3.0 PRE ALPHA (Lizenz: MIT)
</mat-dialog-content>

View File

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

View File

@ -0,0 +1,15 @@
import { Component } from '@angular/core';
import { MatDialogRef } from '@angular/material';
@Component({
selector: 'app-impressum',
templateUrl: './legal-notice.dialog.component.html',
styleUrls: ['./legal-notice.dialog.component.css']
})
export class LegalnoticeDialogComponent {
constructor(public dialogRef: MatDialogRef<LegalnoticeDialogComponent>) {}
onNoClick(): void {
this.dialogRef.close();
}
}

View File

@ -0,0 +1,40 @@
<h2 mat-dialog-title>Datenschutzerklärung</h2>
<mat-dialog-content>
OpenSlides speichert nur so viele personenbezogene Daten wie unbedingt nötig sind, um Besuchern Informationen und Dienste
zuverlässig und sicher anbieten zu können.
</mat-dialog-content>
<br>
<mat-dialog-content>
Eine Auswertung der Dienste-Protokolle erfolgt nur von uns selbst und auch nur, um mögliche Fehler, Einbruchsversuche oder
technisches Verhalten der Server auf unseren Server zu analysieren.
</mat-dialog-content>
<br>
<mat-dialog-content>
Nachfolgend wird genau aufgeschlüsselt, bei welcher Gelegenheit welche Daten wie lange gespeichert sind. Zudem wird beschrieben,
welche Schritte erforderlich sind um Daten zu löschen.
</mat-dialog-content>
<br>
<h3>Cookies</h3>
<mat-dialog-content>
Beim Besuch der Website wird ein sogenanntes Cookie angelegt. Dieses Cookie wird ausschließlich dazu verwendet, um auf der
Website eingeloggt zu bleiben. Ein sogenanntes "Tracking Cookie" wird nicht verwendet.
</mat-dialog-content>
<br>
<h3>Logfiles</h3>
<mat-dialog-content>
Zu OpenSlides gehören verschiedene Unter-Services. Diese loggen folgende Informationen: Quell-IP-Adresse, Zeitstempel, genutztes
Betriebssystem, verwendeter Web-Browser, Referer-URL, E-Mail-Adresse und besuchte Seite.
</mat-dialog-content>
<br>
<h3>Datenbank</h3>
<mat-dialog-content>
Als Mitglied werden folgende Daten von Ihnen gespeichert: Titel, Vorname, Nachname, EMail, Gliederungsebene, Teilnehmernummer,
Gruppenzugehörigkeit, Initiales Passwort im Klartext, Vergebenes Passwort als kryptografischer Hashwert und ein Kommentar
für interne Notizen. Diese Informationen werden mit den Aktionen innerhalb von OpenSlides in Verbindung gebracht. Diese
Informationen werden nicht an Dritte weiter gegeben und sind auch nicht für diese zugänglich.
</mat-dialog-content>
<br>
<h3>Löschung von Daten</h3>
<mat-dialog-content>
Die Daten dieser OpenSlides-Demo-Instanz werden nächtlich automatisch gelöscht.
</mat-dialog-content>

View File

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

View File

@ -0,0 +1,15 @@
import { Component } from '@angular/core';
import { MatDialogRef } from '@angular/material';
@Component({
selector: 'app-privacy-policy.dialog',
templateUrl: './privacy-policy.dialog.component.html',
styleUrls: ['./privacy-policy.dialog.component.css']
})
export class PrivacyPolicyDialogComponent {
constructor(public dialogRef: MatDialogRef<PrivacyPolicyDialogComponent>) {}
onNoClick(): void {
this.dialogRef.close();
}
}

View File

@ -13,6 +13,7 @@ import {
MatSidenavModule, MatSidenavModule,
MatSnackBarModule MatSnackBarModule
} from '@angular/material'; } from '@angular/material';
import { MatDialogModule } from '@angular/material/dialog';
import { MatListModule } from '@angular/material/list'; import { MatListModule } from '@angular/material/list';
import { MatExpansionModule } from '@angular/material/expansion'; import { MatExpansionModule } from '@angular/material/expansion';
import { MatMenuModule } from '@angular/material/menu'; import { MatMenuModule } from '@angular/material/menu';
@ -28,6 +29,8 @@ import { TranslateModule } from '@ngx-translate/core';
// directives // directives
import { OsPermsDirective } from './directives/os-perms.directive'; import { OsPermsDirective } from './directives/os-perms.directive';
import { DomChangeDirective } from './directives/dom-change.directive'; import { DomChangeDirective } from './directives/dom-change.directive';
import { LegalnoticeDialogComponent } from './components/legal-notice/legal-notice.dialog.component';
import { PrivacyPolicyDialogComponent } from './components/privacy-policy/privacy-policy.dialog.component';
library.add(fas); library.add(fas);
@ -56,6 +59,7 @@ library.add(fas);
MatExpansionModule, MatExpansionModule,
MatMenuModule, MatMenuModule,
MatSnackBarModule, MatSnackBarModule,
MatDialogModule,
FontAwesomeModule FontAwesomeModule
], ],
exports: [ exports: [
@ -71,11 +75,13 @@ library.add(fas);
MatListModule, MatListModule,
MatExpansionModule, MatExpansionModule,
MatMenuModule, MatMenuModule,
MatDialogModule,
MatSnackBarModule, MatSnackBarModule,
FontAwesomeModule, FontAwesomeModule,
TranslateModule, TranslateModule,
OsPermsDirective OsPermsDirective
], ],
declarations: [OsPermsDirective, DomChangeDirective] declarations: [OsPermsDirective, DomChangeDirective, LegalnoticeDialogComponent, PrivacyPolicyDialogComponent],
entryComponents: [LegalnoticeDialogComponent, PrivacyPolicyDialogComponent]
}) })
export class SharedModule {} export class SharedModule {}

View File

@ -3,8 +3,8 @@
<mat-toolbar class='nav-toolbar'> <mat-toolbar class='nav-toolbar'>
<!-- logo --> <!-- logo -->
<mat-toolbar-row> <mat-toolbar-row class='os-logo-container'>
<img src='/assets/img/openslides-logo-dark.png' alt='OpenSlides-logo'> <!-- <img src='/assets/img/openslides-logo-h-dark-transparent.svg' alt='OpenSlides-logo'> -->
</mat-toolbar-row> </mat-toolbar-row>
</mat-toolbar> </mat-toolbar>
@ -21,7 +21,8 @@
<!-- navigation --> <!-- navigation -->
<mat-nav-list class='main-nav'> <mat-nav-list class='main-nav'>
<a [@navItemAnim] *appOsPerms="['core.can_see_frontpage']" mat-list-item routerLink='/' routerLinkActive='active' (click)='isMobile ? sideNav.toggle() : null'> <a [@navItemAnim] *appOsPerms="['core.can_see_frontpage']" mat-list-item routerLink='/' routerLinkActive='active' [routerLinkActiveOptions]="{exact: true}"
(click)='isMobile ? sideNav.toggle() : null'>
<fa-icon icon='home'></fa-icon> <fa-icon icon='home'></fa-icon>
<span translate>Home</span> <span translate>Home</span>
</a> </a>
@ -53,6 +54,16 @@
</a> </a>
</mat-nav-list> </mat-nav-list>
<footer>
<!-- TODO Translate -->
<button mat-button (click)='openLegalNotice()'>Legal Notice</button>
<button mat-button (click)='openPrivacyPolicy()'>Privacy Policy</button>
<br>
<span align="center">© Copyright by
<a href='https://openslides.org/'>OpenSlides</a>
</span>
</footer>
</mat-sidenav> </mat-sidenav>
<!-- the first toolbar row is (still) a global element <!-- the first toolbar row is (still) a global element

View File

@ -8,6 +8,26 @@ mat-sidenav-container {
right: 10px; right: 10px;
} }
.os-logo-container {
min-width: 240px;
background-image: url(/assets/img/openslides-logo-h-dark-transparent.svg);
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
.side-panel { .side-panel {
box-shadow: 3px 0px 10px 0px rgba(0, 0, 0, 0.2); box-shadow: 3px 0px 10px 0px rgba(0, 0, 0, 0.2);
} }
footer {
position: fixed;
bottom: 0;
span {
// width: 100%;
display: block;
text-align: center;
margin-bottom: 5px;
}
}

View File

@ -38,8 +38,19 @@
margin-right: 10px; // the distance from the icon to the text margin-right: 10px; // the distance from the icon to the text
} }
span { span {
font-weight: bold;
color: mat-color($foreground, text); color: mat-color($foreground, text);
} }
} }
/** style the active link */
.active {
.ng-fa-icon {
color: mat-color($primary);
}
span {
color: mat-color($primary);
}
}
} }
} }

View File

@ -9,6 +9,9 @@ import { OperatorService } from 'app/core/services/operator.service';
import { TranslateService } from '@ngx-translate/core'; //showcase import { TranslateService } from '@ngx-translate/core'; //showcase
import { BaseComponent } from 'app/base.component'; import { BaseComponent } from 'app/base.component';
import { pageTransition, navItemAnim } from 'app/shared/animations'; import { pageTransition, navItemAnim } from 'app/shared/animations';
import { MatDialog } from '@angular/material';
import { LegalnoticeDialogComponent } from '../shared/components/legal-notice/legal-notice.dialog.component';
import { PrivacyPolicyDialogComponent } from '../shared/components/privacy-policy/privacy-policy.dialog.component';
@Component({ @Component({
selector: 'app-site', selector: 'app-site',
@ -17,23 +20,42 @@ import { pageTransition, navItemAnim } from 'app/shared/animations';
styleUrls: ['./site.component.scss'] styleUrls: ['./site.component.scss']
}) })
export class SiteComponent extends BaseComponent implements OnInit { export class SiteComponent extends BaseComponent implements OnInit {
/**
* Get the username from the operator (should be known already)
*/
username = this.operator.username; username = this.operator.username;
/**
* True if Viewport equals mobile or small resolution. Set by breakpointObserver.
*/
isMobile = false; isMobile = false;
//test /**
state = 'hidden'; * Constructor
*
* @param authService
* @param autoupdateService
* @param operator
* @param router
* @param breakpointObserver
* @param translate
* @param dialog
*/
constructor( constructor(
private authService: AuthService, private authService: AuthService,
private autoupdateService: AutoupdateService, private autoupdateService: AutoupdateService,
private operator: OperatorService, private operator: OperatorService,
private router: Router, private router: Router,
private breakpointObserver: BreakpointObserver, private breakpointObserver: BreakpointObserver,
private translate: TranslateService private translate: TranslateService,
public dialog: MatDialog
) { ) {
super(); super();
} }
/**
* Initialize the site component
*/
ngOnInit() { ngOnInit() {
this.breakpointObserver this.breakpointObserver
.observe([Breakpoints.Small, Breakpoints.HandsetPortrait]) .observe([Breakpoints.Small, Breakpoints.HandsetPortrait])
@ -62,6 +84,10 @@ export class SiteComponent extends BaseComponent implements OnInit {
}); });
} }
/**
* Let the user change the language
* @param lang the desired language (en, de, fr, ...)
*/
selectLang(lang: string): void { selectLang(lang: string): void {
console.log('selected langauge: ', lang); console.log('selected langauge: ', lang);
console.log('get Langs : ', this.translate.getLangs()); console.log('get Langs : ', this.translate.getLangs());
@ -71,13 +97,25 @@ export class SiteComponent extends BaseComponent implements OnInit {
}); });
} }
/**
* Function to log out the current user
*/
logOutButton() { logOutButton() {
console.log('logout');
this.authService.logout().subscribe(); this.authService.logout().subscribe();
this.router.navigate(['/login']); this.router.navigate(['/login']);
} }
changeState() { /**
this.state = this.state === 'hidden' ? 'show' : 'hidden'; * Opens the legal notice as dialog
*/
openLegalNotice() {
const dialogRef = this.dialog.open(LegalnoticeDialogComponent);
}
/**
* Opens the privacy Policy as dialog
*/
openPrivacyPolicy() {
const dialogRef = this.dialog.open(PrivacyPolicyDialogComponent);
} }
} }

View File

@ -27,6 +27,7 @@ body {
right: 0; right: 0;
margin: 0; margin: 0;
padding: 0; padding: 0;
overflow: hidden !important;
height: 100% !important; height: 100% !important;
} }
@ -40,6 +41,7 @@ router-outlet ~ * {
position: absolute; position: absolute;
height: 100%; height: 100%;
width: 100%; width: 100%;
overflow: hidden !important;
} }
/**the plus button in Motion, Agenda, etc*/ /**the plus button in Motion, Agenda, etc*/
@ -48,11 +50,6 @@ router-outlet ~ * {
z-index: 100; z-index: 100;
} }
.test-thing {
bottom: -30px;
z-index: 100;
}
.os-card { .os-card {
max-width: 90%; max-width: 90%;
margin-top: 10px; margin-top: 10px;