Merge branch 'max_dev' of Software_Engineering_I/greenvironment-frontend into master

master
Max_ES 4 years ago committed by Gitea
commit 360c754fd5

@ -1,6 +1,147 @@
<mat-toolbar>Imprint</mat-toolbar>
<div id="imprint">
<p>The greenvironment network is being developed by the greenvironment team</p>
<h2>Contact</h2>
<p>Email: nick.derkoenig@greenvironment.net</p>
<mat-toolbar>Imprint</mat-toolbar>
<div id="text-box">
<h1 id="privacy-policy">Privacy Policy</h1>
<p>Last updated: January 22, 2020</p>
<p>This Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your information
when You use the Service and tells You about Your privacy rights and how the law protects You.</p>
<h1 id="interpretation-and-definitions">Interpretation and Definitions</h1>
<h2 id="interpretation">Interpretation</h2>
<p>The words of which the initial letter is capitalized have meanings defined under the following conditions.</p>
<p>The following definitions shall have the same meaning regardless of whether they appear in singular or in plural.
</p>
<h2 id="definitions">Definitions</h2>
<p>For the purposes of this Privacy Policy:</p>
<ul>
<li>
<p><strong>You</strong> means the individual accessing or using the Service, or We, or other legal entity on
behalf of which such individual is accessing or using the Service, as applicable.</p>
</li>
<li>
<p><strong>Team Greenvironment</strong> (referred to as either &quot;Team Greenvironment&quot;, &quot;We&quot;,
&quot;Us&quot; or &quot;Our&quot; in this Agreement) refers to the Greenvironment team.</p>
</li>
<li>
<p><strong>Account</strong> means a unique account created for You to access our Service or parts of our Service.
</p>
</li>
<li>
<p><strong>Website</strong> refers to Greenvironment, accessible from <a
href="https://greenvironment.net/">https://greenvironment.net/</a></p>
</li>
<li>
<p><strong>Service</strong> refers to the Website.</p>
</li>
<li>
<p><strong>Third-party Social Media Service</strong> refers to any website or any social network website through
which a User can log in or create an account to use the Service.</p>
</li>
<li>
<p><strong>Personal Data</strong> is any information that relates to an identified or identifiable individual.</p>
</li>
<li>
<p><strong>Cookies</strong> are small files that are placed on Your computer, mobile device or any other device by
a website, containing the details of Your browsing history on that website among its many uses.</p>
</li>
<li>
<p><strong>Usage Data</strong> refers to data collected automatically, either generated by the use of the Service
or from the Service infrastructure itself (for example, the duration of a page visit).</p>
</li>
</ul>
<h1 id="collecting-and-using-your-personal-data">Collecting and Using Your Personal Data</h1>
<h2 id="types-of-data-collected">Types of Data Collected</h2>
<h3 id="account-data">Account Data</h3>
<p>While using Our Service, We may ask You to provide Us with certain personally identifiable information that will be
saved to your account:</p>
<h4 id="email-address">Email Address</h4>
<p>To identify a unique user as a human and to provide a way to log in.</p>
<h4 id="password">Password</h4>
<p>To provide a secured access to your account. It will only be saved as a hashed value.</p>
<h4 id="username">Username</h4>
<p>The display name of the user as a human friendly way of representation.</p>
<h4 id="handle">Handle</h4>
<p>A unique username that can be used for identification.</p>
<h4 id="posts">Posts</h4>
<p>Collected to display them to other users.</p>
<h4 id="votes">Votes</h4>
<p>The Upvote or Downvote performed on a post to display the sum of votes all users performed.</p>
<h4 id="profile-pictures">Profile Pictures</h4>
<p>A way to enhance the users profile. Stored public accessible on the server.</p>
<h4 id="invites">Invites</h4>
<p>Only visible to the user who was addressed.</p>
<h4 id="friends">Friends</h4>
<p>Only the User and his friend can see that they are friends.The data will be deleted after the friendship is
canceled.</p>
<h4 id="rang-points-and-rang">Rang points and rang</h4>
<p>Collected to show other user how good the user helped to protect the environment. Rang and rang points are visible
to all users.</p>
<h4 id="groupsevents">Groups/Events</h4>
<p>The date is used to assign the user to groups and events. Collected to show them to other group- /Event- members.
</p>
<h4 id="chatroom">Chatroom</h4>
<p>The member are showed to each others.</p>
<h4 id="chat-messages">Chat Messages</h4>
<p>Stored in plain text in the database. The message is visible to all other group members even if the user left the
group</p>
<h3 id="cookies">Cookies</h3>
<p>We use Cookies to save the session of the user. So if the user visits Greenvironment the next time he is already
logged in. You can instruct your browser to refuse all Cookies or to indicate when a Cookie is being saved. However,
if ou do not accept Cookies, You may not be able to use some parts of our Service.</p>
<h2 id="use-of-your-personal-data">Use of Your Personal Data</h2>
<p>Your Personal Data will be used for the following purposes:</p>
<ul>
<li><strong>To manage Your Account:</strong> to manage Your registration as a user of the Service. The Personal Data
You provide can give You access to different functionalities of the Service that are available to You as a
registered user.</li>
<li><strong>To contact You:</strong> To contact You by email.</li>
</ul>
<h2 id="retention-of-your-personal-data">Retention of Your Personal Data</h2>
<p>We will retain Your Personal Data only for as long as is necessary for the purposes set out in this Privacy Policy.
We will retain and use Your Personal Data to the extent necessary to comply with our legal obligations (for example,
if we are required to retain your data to comply with applicable laws), resolve disputes, and enforce our legal
agreements and policies.</p>
<h2 id="transfer-of-your-personal-data">Transfer of Your Personal Data</h2>
<p>Your information, including Personal Data, is processed at Our operating offices and in any other places where the
parties involved in the processing are located. It means that this information may be transferred to — and
maintained on — computers located outside of Your state, province, country or other governmental jurisdiction where
the data protection laws may differ than those from Your jurisdiction.</p>
<p>Your consent to this Privacy Policy followed by Your submission of such information represents Your agreement to
that transfer.</p>
<p>We will take all steps reasonably necessary to ensure that Your data is treated securely and in accordance with
this Privacy Policy and no transfer of Your Personal Data will take place to an organization or a country unless
there are adequate controls in place including the security of Your data and other personal information.</p>
<h2 id="disclosure-of-your-personal-data">Disclosure of Your Personal Data</h2>
<h3 id="other-legal-requirements">Other legal requirements</h3>
<p>We may disclose Your Personal Data in the good faith belief that such action is necessary to:</p>
<ul>
<li>Comply with a legal obligation</li>
<li>Protect and defend the rights or property of the Greenvironment Team</li>
<li>Prevent or investigate possible wrongdoing in connection with the Service</li>
<li>Protect the personal safety of Users of the Service or the public</li>
<li>Protect against legal liability</li>
</ul>
<h2 id="security-of-your-personal-data">Security of Your Personal Data</h2>
<p>The security of Your Personal Data is important to Us, but remember that no method of transmission over the
Internet, or method of electronic storage is 100% secure. While We strive to use technical acceptable means to
protect Your Personal Data, We cannot guarantee its absolute security.</p>
<h1 id="links-to-other-websites">Links to Other Websites</h1>
<p>Our Service may contain links to other websites that are not operated by Us. If You click on a third party link,
You will be directed to that third party's site. We strongly advise You to review the Privacy Policy of every site
You visit.</p>
<p>We have no control over and assume no responsibility for the content, privacy policies or practices of any third
party sites or services.</p>
<h1 id="changes-to-this-privacy-policy">Changes to this Privacy Policy</h1>
<p>We may update our Privacy Policy from time to time. We will notify You of any changes by posting the new Privacy
Policy on this page.</p>
<p>We will let You know via email and/or a prominent notice on Our Service, prior to the change becoming effective and
update the &quot;Last updated&quot; date at the top of this Privacy Policy.</p>
<p>You are advised to review this Privacy Policy periodically for any changes. Changes to this Privacy Policy are
effective when they are posted on this page.</p>
<h1 id="contact-us">Contact Us</h1>
<p>If you have any questions about this Privacy Policy, You can contact us:</p>
<ul>
<li>By email: <a href="mailto:greenvironment@hotmail.com">greenvironment@hotmail.com</a></li>
</ul>
</div>
</div>

@ -3,12 +3,18 @@
#imprint
padding: 2em
max-width: 35em
position: fixed
width: 100%
height: calc(100% - 56px)
overflow: scroll
#text-box
margin: 0 auto
max-width: 800px
padding: 2em
::ng-deep a
color: $primary-color
h1.mat-display-1
margin: 0

@ -28,6 +28,14 @@
</button>
</mat-form-field>
</div>
<p class="check-box">
<mat-checkbox color="primary" [(ngModel)]="ageCheck" >I am older than 16 years.
</mat-checkbox>
</p>
<p class="check-box">
<mat-checkbox color="primary" [(ngModel)]="imprintCheck">I've read the <a routerLink="/imprint">privacy policy</a>.
</mat-checkbox>
</p>
<button mat-raised-button color="primary"
(click)="onClickSubmit(username.value,email.value,password.value, repeatpassword.value)">Register
</button>

@ -5,6 +5,8 @@
padding: 2em
max-width: 35em
margin: 0 auto
::ng-deep a
color: $primary-color
.example-container
display: flex
@ -26,6 +28,10 @@ input.example-right-align
.mat-error
margin-bottom: 0.25em
.check-box
float: left
margin-right: 1em
.mat-raised-button
margin: 0.25em
width: 100%

@ -14,6 +14,8 @@ export class RegisterComponent implements OnInit {
errorMessage: string;
hide1 = true;
hide2 = true;
ageCheck = false;
imprintCheck = false;
constructor(private registerService: RegisterService) {
this.registration = {username: null, passwordHash: null, email: null};
@ -28,7 +30,7 @@ export class RegisterComponent implements OnInit {
onClickSubmit(pUsername: string, pEmail: string, pPasswordHash: string, pPasswordHashRepeat: string) {
this.errorOccurred = false;
this.errorMessage = ' ';
if (this.passwordSame(pPasswordHash, pPasswordHashRepeat)) {
if (this.passwordSame(pPasswordHash, pPasswordHashRepeat) && this.boxesChecked()) {
this.registration.username = pUsername.trim();
this.registration.email = pEmail.trim().toLowerCase();
this.registration.passwordHash = sha512.sha512(pPasswordHash);
@ -38,7 +40,6 @@ export class RegisterComponent implements OnInit {
passwordSame(pwd: string, pwd2: string) {
if (pwd === pwd2) {
console.log('password same');
return true;
} else {
this.errorOccurred = true;
@ -47,6 +48,21 @@ export class RegisterComponent implements OnInit {
}
}
boxesChecked(): boolean {
if (this.imprintCheck && this.ageCheck) {
console.log('all boxes checked');
return true;
} else {
this.errorOccurred = true;
if (!this.ageCheck) {
this.errorMessage = 'You have to confirm your age.';
} else if (!this.imprintCheck) {
this.errorMessage = 'You have to confirm that you read the privacy policy.';
}
return false;
}
}
ngOnInit() {
}

Loading…
Cancel
Save