Skip to content

Commit

Permalink
Merge pull request #75 from swoocn/additions-revisions-1
Browse files Browse the repository at this point in the history
Self approved.
  • Loading branch information
swoocn authored Mar 10, 2024
2 parents 2bd56e6 + 6da781a commit b95523e
Show file tree
Hide file tree
Showing 21 changed files with 327 additions and 43 deletions.
10 changes: 10 additions & 0 deletions frontend/src/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ export const routes: Routes = [
path: 'shop',
loadChildren: () => import('./shop/shop.routes').then((m) => m.SHOP_ROUTES),
},
{
path: 'privacy-policy',
title: 'Privacy Policy',
loadComponent: () => import('./shared/privacy-policy/privacy-policy.component').then((m) => m.PrivacyPolicyComponent),
},
{
path: 'terms-of-service',
title: 'Terms of Service',
loadComponent: () => import('./shared/terms-of-service/terms-of-service.component').then((m) => m.TermsOfServiceComponent),
},
{
path: '',
redirectTo: '/home',
Expand Down
18 changes: 11 additions & 7 deletions frontend/src/app/dialogs/information/information.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ <h1>Map of Pi</h1>
<h3>{{ version }}</h3>
</div>
<div class="update-notes">
<h3>Latest Updates</h3>
<h3>{{ 'INFORMATION_DIALOG.LATEST_UPDATES' | translate }}</h3>
<div class="items">
<h4>{{ date }}</h4>
<ul>
<li *ngFor="let item of updateItems">{{ item }}</li>
</ul>
<div *ngFor="let item of updateItems">
<div class="update-item">
<h4>{{ item.date }}</h4>
<ul>
<li *ngFor="let update of item.updates">{{ update }}</li>
</ul>
</div>
</div>
</div>
</div>
<div class="defects-contact"><span>Please report defects to <a href="mailto:[email protected]" target="_blank">{{ email }}</a></span></div>
</div>
<div class="defects-contact"><span>{{ 'INFORMATION_DIALOG.REPORTING_MESSAGE' | translate }} <a href="mailto:[email protected]" target="_blank">{{ email }}</a></span></div>
</div>
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';

import { TranslateModule } from '@ngx-translate/core';
import { InformationComponent } from './information.component';

describe('InformationComponent', () => {
Expand All @@ -8,7 +8,7 @@ describe('InformationComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [InformationComponent]
imports: [InformationComponent, TranslateModule.forRoot()]
})
.compileComponents();

Expand Down
29 changes: 23 additions & 6 deletions frontend/src/app/dialogs/information/information.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterLink } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';

@Component({
selector: 'app-information',
standalone: true,
imports: [CommonModule, RouterLink],
imports: [CommonModule, TranslateModule],
templateUrl: './information.component.html',
styleUrl: './information.component.scss'
})
Expand All @@ -16,10 +16,27 @@ export class InformationComponent {
version: string = 'Alpha V1.0';
logo: string = "../../assets/images/logo.svg";

date: string = '3/8/2024';
updateItems: string[] = [
'Added footer.',
'Added information popup for latest updates.',
updateItems: { date: string, updates: string[] }[] = [
{
date: '3/10/2024',
updates: [
'Added Terms of Service section.'
]
},
{
date: '3/9/2024',
updates: [
'Added GPS navigation feature.',
'Added Privacy Policy section.'
]
},
{
date: '3/8/2024',
updates: [
'Added Footer.',
'Added Information Popup to share latest updates.'
]
}
];
email: string = '[email protected]';

Expand Down
16 changes: 8 additions & 8 deletions frontend/src/app/home/action-row/action-row.component.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.action-row-container {
position: fixed;
bottom: 15%; /* Adjust this value as needed */
width: 100%;
min-width: 80px;
margin-bottom: 2px;
display: flex;
justify-content: center;
z-index: 5;
position: absolute;
bottom: 15%; /* Adjust this value as needed */
width: 100%;
min-width: 80px;
margin-bottom: 2px;
display: flex;
justify-content: center;
z-index: 5;
}
4 changes: 2 additions & 2 deletions frontend/src/app/shared/footer/footer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
</a>
</div>
<div class="footer__legal">
<a (click)="displayPopup()" class="footer__legal-link">Privacy Policy</a>
<a (click)="displayPopup()"class="footer__legal-link">Terms & Conditions</a>
<a [routerLink]="['/privacy-policy']" class="footer__legal-link">{{ 'FOOTER.PRIVACY_POLICY' | translate }}</a>
<a [routerLink]="['/terms-of-service']"class="footer__legal-link">{{ 'FOOTER.TERMS_OF_SERVICE' | translate }}</a>
</div>
<!-- <a href=""><img src="../../../assets/images/logo.svg" alt="Logo of Map of Pi" class="footer__logo">
</a> -->
Expand Down
7 changes: 4 additions & 3 deletions frontend/src/app/shared/footer/footer.component.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { RouterTestingModule } from '@angular/router/testing';
import { TranslateModule } from '@ngx-translate/core';
import { FooterComponent } from './footer.component';

describe('FooterComponent', () => {
Expand All @@ -7,9 +9,8 @@ describe('FooterComponent', () => {

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [FooterComponent]
})
.compileComponents();
imports: [FooterComponent, RouterTestingModule, TranslateModule.forRoot()]
}).compileComponents();

fixture = TestBed.createComponent(FooterComponent);
component = fixture.componentInstance;
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/app/shared/footer/footer.component.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { Component } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { TranslateModule } from '@ngx-translate/core';

@Component({
selector: 'app-footer',
standalone: true,
imports: [TranslateModule, CommonModule],
imports: [CommonModule, RouterModule, TranslateModule],
templateUrl: './footer.component.html',
styleUrl: './footer.component.scss'
})
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/app/shared/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@
<button mat-icon-button (click)="navigateBack()">
<mat-icon>arrow_back</mat-icon>
</button>
<span [routerLink]="['/home']">
<button mat-icon-button>
<span>
<button mat-icon-button [routerLink]="['/home']">
<mat-icon>home</mat-icon>
</button>
</span>
</div>
} @else {
<button mat-icon-button>
<button mat-icon-button [routerLink]="['/home']">
<mat-icon>home</mat-icon>
</button>
}

<div class="image-container" (mouseenter)="onMouseEnter()" (mouseleave)="onMouseLeave()">
<img id="logo-img" [src]="imageUrl" alt="Map of Pi" width="50" height="50" [class.hovered-img]="isHovered" />
<div class="text-container">
<p>{{ 'CORE.APP_NAME' | translate }}</p>
<!-- <p>{{ 'CORE.APP_NAME' | translate }}</p> -->
<p>Map of Pi</p>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ <h2>7. {{ 'PRIVACY_POLICY.SECTIONS.HEADER_7' | translate }}</h2>

<h2>8. {{ 'PRIVACY_POLICY.SECTIONS.HEADER_8' | translate }}</h2>
<ul>
<li>{{ 'PRIVACY_POLICY.SECTIONS.CONTENT_8_1' | translate }} &#64; <strong><a href="mailto:[email protected]">Map of
<li>{{ 'PRIVACY_POLICY.SECTIONS.CONTENT_8_1' | translate }} &#64; <strong><a href="mailto:{{ emailAddress }}">Map of
Pi.</a></strong>.</li>
</ul>
</div>
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
.privacy-policy-content {
max-width: calc(100% - 40px);
margin: 0 auto;
text-align: left;
max-height: 400px;
overflow-y: auto;
word-wrap: break-word;
background-color: #fff;
z-index: 700;
padding: 50px;
padding-bottom: 150px;

h1, h2 {
color: #1d724b;
Expand All @@ -22,6 +17,7 @@
}

ul {
list-style-type: none;
margin-bottom: 20px;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<div class="terms-of-service-content">
<h2><strong>Map of Pi {{ 'TERMS_OF_SERVICE.TITLE' | translate }}</strong></h2>
<h4>{{ 'TERMS_OF_SERVICE.LAST_UPDATED' | translate }}: {{ lastUpdated }}</h4>
<h4>{{ 'TERMS_OF_SERVICE.EMAIL_ADDRESS' | translate }}: {{ emailAddress }}</h4>
<br />
<h2>1. {{ 'TERMS_OF_SERVICE.SECTIONS.HEADER_1' | translate }}</h2>
<ul>
<li>{{ 'TERMS_OF_SERVICE.SECTIONS.CONTENT_1_1' | translate }}</li>
</ul>

<h2>2. {{ 'TERMS_OF_SERVICE.SECTIONS.HEADER_2' | translate }}</h2>
<ul>
<li>{{ 'TERMS_OF_SERVICE.SECTIONS.CONTENT_2_1' | translate }}</li>
<li>{{ 'TERMS_OF_SERVICE.SECTIONS.CONTENT_2_2' | translate }}</li>
</ul>

<h2>3. {{ 'TERMS_OF_SERVICE.SECTIONS.HEADER_3' | translate }}</h2>
<ul>
<li>{{ 'TERMS_OF_SERVICE.SECTIONS.CONTENT_3_1' | translate }}</li>
</ul>

<h2>4. {{ 'TERMS_OF_SERVICE.SECTIONS.HEADER_4' | translate }}</h2>
<ul>
<li>{{ 'TERMS_OF_SERVICE.SECTIONS.CONTENT_4_1' | translate }}</li>
</ul>

<h2>5. {{ 'TERMS_OF_SERVICE.SECTIONS.HEADER_5' | translate }}</h2>
<ul>
<li>{{ 'TERMS_OF_SERVICE.SECTIONS.CONTENT_5_1' | translate }}</li>
</ul>

<h2>6. {{ 'TERMS_OF_SERVICE.SECTIONS.HEADER_6' | translate }}</h2>
<ul>
<li>{{ 'TERMS_OF_SERVICE.SECTIONS.CONTENT_6_1' | translate }}</li>
</ul>

<h2>7. {{ 'TERMS_OF_SERVICE.SECTIONS.HEADER_7' | translate }}</h2>
<ul>
<li>{{ 'TERMS_OF_SERVICE.SECTIONS.CONTENT_7_1' | translate }}</li>
</ul>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.terms-of-service-content {
text-align: left;
padding: 50px;
padding-bottom: 150px;

h1, h2 {
color: #1d724b;
}

h2 {
border-bottom: 1px solid #ccc;
padding-bottom: 5px;
}

p {
margin-bottom: 20px;
}

ul {
list-style-type: none;
margin-bottom: 20px;
}

a {
font-weight: bold;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TranslateModule } from '@ngx-translate/core';
import { TermsOfServiceComponent } from './terms-of-service.component';

describe('TermsOfServiceComponent', () => {
let component: TermsOfServiceComponent;
let fixture: ComponentFixture<TermsOfServiceComponent>;

beforeEach(async () => {
await TestBed.configureTestingModule({
imports: [TermsOfServiceComponent, TranslateModule.forRoot()]
})
.compileComponents();

fixture = TestBed.createComponent(TermsOfServiceComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});

it('should create', () => {
expect(component).toBeTruthy();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { Component } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';

@Component({
selector: 'app-terms-of-service',
standalone: true,
imports: [TranslateModule],
templateUrl: './terms-of-service.component.html',
styleUrl: './terms-of-service.component.scss'
})
export class TermsOfServiceComponent {
lastUpdated!: string;
emailAddress!: string;

constructor() {
this.lastUpdated = "3/10/2024";
this.emailAddress = "[email protected]";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,5 +90,33 @@
"HEADER_8": "Kontaktieren Sie uns",
"CONTENT_8_1": "Wenn Sie Fragen oder Bedenken zu dieser Datenschutzrichtlinie haben, kontaktieren Sie uns bitte "
}
},
"TERMS_OF_SERVICE": {
"TITLE": "Nutzungsbedingungen",
"LAST_UPDATED": "Zuletzt Aktualisiert",
"EMAIL_ADDRESS": "E-Mail-Adresse",
"SECTIONS": {
"HEADER_1": "Akzeptanz der Bedingungen",
"CONTENT_1_1": "Willkommen bei der Map of Pi-App, entwickelt vom Map of Pi-Team in Zusammenarbeit mit der Pi-Community. Durch die Nutzung dieser App erklären Sie sich damit einverstanden, sich an diese Nutzungsbedingungen sowie unsere Datenschutzrichtlinie zu halten.",

"HEADER_2": "Nutzung der App",
"CONTENT_2_1": "Sie erklären sich damit einverstanden, die Map of Pi-App in Übereinstimmung mit allen anwendbaren Gesetzen und Vorschriften zu verwenden.",
"CONTENT_2_2": "Sie dürfen die App nicht für rechtswidrige oder verbotene Zwecke verwenden oder auf eine Weise, die die App beschädigen, deaktivieren, überlasten oder beeinträchtigen könnte.",

"HEADER_3": "Geistiges Eigentum",
"CONTENT_3_1": "Die Map of Pi-App sowie alle Inhalte, Funktionen und Funktionalitäten sind im Besitz von Map of Pi und durch Urheberrecht, Markenrecht und andere Gesetze zum geistigen Eigentum geschützt.",

"HEADER_4": "Haftungsbeschränkung",
"CONTENT_4_1": "Map of Pi haftet nicht für direkte, indirekte, zufällige, besondere oder Folgeschäden, die sich aus oder in Verbindung mit der Nutzung der Map of Pi-App ergeben.",

"HEADER_5": "Freistellung",
"CONTENT_5_1": "Sie erklären sich damit einverstanden, Map of Pi und seine verbundenen Unternehmen, leitenden Angestellten, Direktoren, Mitarbeiter und Beauftragte von allen Ansprüchen, Haftungen, Schäden, Verlusten oder Ausgaben (einschließlich Anwaltskosten) freizustellen und schadlos zu halten, die sich aus oder in irgendeiner Weise auf Ihre Nutzung der Map of Pi-App beziehen.",

"HEADER_6": "Anwendbares Recht",
"CONTENT_6_1": "Diese Nutzungsbedingungen unterliegen dem Recht unserer definierten Gerichtsbarkeit und sind ohne Rücksicht auf deren Kollisionsnormen auszulegen.",

"HEADER_7": "Änderungen dieser Bedingungen",
"CONTENT_7_1": "Wir behalten uns das Recht vor, diese Nutzungsbedingungen jederzeit ohne vorherige Ankündigung zu aktualisieren oder zu ändern. Die aktuellste Version wird auf unserer Website oder innerhalb der App veröffentlicht."
}
}
}
File renamed without changes.
Loading

0 comments on commit b95523e

Please sign in to comment.