Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amanda #1759

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Amanda #1759

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@
}
},
"cli": {
"defaultCollection": "@angular-eslint/schematics"
"defaultCollection": "@ionic/angular-toolkit"
},
"schematics": {
"@ionic/angular-toolkit:component": {
Expand Down
1,468 changes: 801 additions & 667 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"@angular-eslint/eslint-plugin-template": "13.0.0-alpha.0",
"@angular-eslint/schematics": "13.0.0-alpha.0",
"@angular-eslint/template-parser": "13.0.0-alpha.0",
"@angular/cli": "^13.0.1",
"@angular/cli": "13.2.5",
"@angular/compiler": "^13.0.0",
"@angular/compiler-cli": "^13.0.0",
"@angular/language-service": "^13.0.0",
Expand Down
76 changes: 55 additions & 21 deletions src/app/app.component.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
<ion-app [class.dark-theme]="dark">
<ion-split-pane contentId="main-content">

<ion-menu contentId="main-content">

<ion-menu contentId="main-content" >

<ion-menu-toggle autoHide="false">
<ion-button>
Close
</ion-button>
</ion-menu-toggle>


<ion-content>
<ion-list lines="none">


<!-- <ion-list lines="none">

<ion-list-header>
Conference
Home
</ion-list-header>
<ion-menu-toggle autoHide="false" *ngFor="let p of appPages; let i = index">
<ion-item [routerLink]="p.url" routerLinkActive="selected" routerDirection="root" detail="false">
Expand All @@ -14,14 +26,27 @@
{{p.title}}
</ion-label>
</ion-item>
</ion-menu-toggle>
</ion-list> -->

<!-- <ion-list lines="none">
<ion-list-header>
Conference
</ion-list-header>
<ion-menu-toggle autoHide="false">
<ion-item routerLink="/app/tabs/schedule" routerLinkActive="active" routerDirection="root" detail="false">
<ion-icon slot="start" name="calendar"></ion-icon>
<ion-label>
{{Schedule}}
</ion-label>
</ion-item>
</ion-menu-toggle>
</ion-list>
</ion-list> -->

<ion-list *ngIf="loggedIn" lines="none">
<ion-list-header>
<!-- <ion-list-header>
Account
</ion-list-header>
</ion-list-header> -->

<ion-menu-toggle autoHide="false">
<ion-item routerLink="/account" routerLinkActive="active" routerDirection="root" detail="false">
Expand All @@ -32,14 +57,14 @@
</ion-item>
</ion-menu-toggle>

<ion-menu-toggle autoHide="false">
<!-- <ion-menu-toggle autoHide="false">
<ion-item routerLink="/support" routerLinkActive="active" routerDirection="root" detail="false">
<ion-icon slot="start" name="help"></ion-icon>
<ion-label>
Support
</ion-label>
</ion-item>
</ion-menu-toggle>
</ion-menu-toggle> -->

<ion-menu-toggle autoHide="false">
<ion-item button (click)="logout()" detail="false">
Expand All @@ -53,9 +78,9 @@
</ion-list>

<ion-list *ngIf="!loggedIn" lines="none">
<ion-list-header>
<!-- <ion-list-header>
Account
</ion-list-header>
</ion-list-header> -->

<ion-menu-toggle autoHide="false">
<ion-item routerLink="/login" routerLinkActive="active" routerDirection="root" detail="false">
Expand All @@ -66,14 +91,14 @@
</ion-item>
</ion-menu-toggle>

<ion-menu-toggle autoHide="false">
<!-- <ion-menu-toggle autoHide="false">
<ion-item routerLink="/support" routerLinkActive="active" routerDirection="root" detail="false">
<ion-icon slot="start" name="help"></ion-icon>
<ion-label>
Support
</ion-label>
</ion-item>
</ion-menu-toggle>
</ion-menu-toggle> -->

<ion-menu-toggle autoHide="false">
<ion-item routerLink="/signup" routerLinkActive="active" routerDirection="root" detail="false">
Expand All @@ -84,16 +109,11 @@
</ion-item>
</ion-menu-toggle>

<ion-item>
<ion-icon slot="start" name="moon-outline"></ion-icon>
<ion-label>
Dark Mode
</ion-label>
<ion-toggle [(ngModel)]="dark"></ion-toggle>
</ion-item>

</ion-list>

<ion-list lines="none">

<!-- <ion-list lines="none">
<ion-list-header>
Tutorial
</ion-list-header>
Expand All @@ -103,12 +123,26 @@
<ion-label>Show Tutorial</ion-label>
</ion-item>
</ion-menu-toggle>
</ion-list>
</ion-list> -->
</ion-content>


<ion-item lines="none">
<ion-icon slot="start" name="moon-outline"></ion-icon>
<ion-label>
Dark Mode
</ion-label>
<ion-toggle [(ngModel)]="dark"></ion-toggle>
</ion-item>


</ion-menu>



<ion-router-outlet id="main-content"></ion-router-outlet>

</ion-split-pane>


</ion-app>
32 changes: 19 additions & 13 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,32 @@ import { UserData } from './providers/user-data';
})
export class AppComponent implements OnInit {
appPages = [
{
title: 'Schedule',
url: '/app/tabs/schedule',
icon: 'calendar'
},
{
title: 'Speakers',
url: '/app/tabs/speakers',
icon: 'people'
},

{
title: 'Map',
url: '/app/tabs/map',
icon: 'map'
},


{
title: 'Spot',
url: '/app/tabs/schedule',
icon: 'location'
},

{
title: 'About',
url: '/app/tabs/about',
icon: 'information-circle'
title: 'Jio',
url: '/app/tabs/speakers',
icon: 'people'
}

// ,
// {
// title: 'About',
// url: '/app/tabs/about',
// icon: 'information-circle'
// }
];
loggedIn = false;
dark = false;
Expand Down
18 changes: 12 additions & 6 deletions src/app/pages/account/account.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
<ion-header>
<ion-toolbar>
<ion-buttons slot="start">
<ion-menu-button></ion-menu-button>
<!-- <ion-menu-button></ion-menu-button> -->
<ion-back-button defaultHref="/app/tabs/map" text=""></ion-back-button>
<!-- can work on return back to where it came from instead of always back to map page -->
</ion-buttons>
<ion-title>Account</ion-title>
<!-- <ion-title>Account</ion-title> -->
</ion-toolbar>
</ion-header>

<ion-content>
<div *ngIf="username" class="ion-padding-top ion-text-center">
<img src="https://www.gravatar.com/avatar?d=mm&s=140" alt="avatar">
<!-- <img src={{image}} (click)="getImage()" > -->
<h2>{{username}}</h2>

<ion-list inset>
<p style="font-size:60%;"> {{worklevel}} </p>
<p style="font-size:40%;"> {{bio}} </p>
<ion-list lines="none">
<ion-item (click)="updatePicture()">Update Picture</ion-item>
<ion-item (click)="changeUsername()">Change Username</ion-item>
<ion-item (click)="changePassword()">Change Password</ion-item>
<ion-item (click)="support()">Support</ion-item>
<ion-item (click)="logout()">Logout</ion-item>
<ion-item (click)="changeWorklevel()">Change Worklevel</ion-item>
<ion-item (click)="changeBio()">Change Bio</ion-item>
<!-- <ion-item (click)="support()">Support</ion-item> -->
<!-- <ion-item (click)="logout()">Logout</ion-item> -->
</ion-list>
</div>
</ion-content>
89 changes: 88 additions & 1 deletion src/app/pages/account/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import { UserData } from '../../providers/user-data';
})
export class AccountPage implements AfterViewInit {
username: string;
bio: string;
worklevel: string;
// myphoto: any="assets/imgs/registration_default_image.png"

constructor(
public alertCtrl: AlertController,
Expand All @@ -22,6 +25,8 @@ export class AccountPage implements AfterViewInit {

ngAfterViewInit() {
this.getUsername();
this.getWorklevel();
this.getBio();
}

updatePicture() {
Expand All @@ -37,7 +42,7 @@ export class AccountPage implements AfterViewInit {
buttons: [
'Cancel',
{
text: 'Ok',
text: 'OK',
handler: (data: any) => {
this.userData.setUsername(data.username);
this.getUsername();
Expand All @@ -56,12 +61,77 @@ export class AccountPage implements AfterViewInit {
await alert.present();
}


getUsername() {
this.userData.getUsername().then((username) => {
this.username = username;
});
}

async changeBio(){
const alert = await this.alertCtrl.create({
header: 'Change Bio',
buttons: [
'Cancel',
{
text: 'OK',
handler: (data: any) => {
this.userData.setBio(data.bio);
this.getBio();
}
}
],
inputs: [
{
type: 'text',
name: 'bio',
value: this.bio,
placeholder: 'bio'
}
]
});
await alert.present();
}

getBio() {
this.userData.getBio().then((bio) => {
this.bio = bio;
});
}


async changeWorklevel(){
const alert = await this.alertCtrl.create({
header: 'Change Worklevel',
buttons: [
'Cancel',
{
text: 'OK',
handler: (data: any) => {
this.userData.setWorklevel(data.worklevel);
this.getWorklevel();
}
}
],
inputs: [
{
type: 'text',
name: 'worklevel',
value: this.worklevel,
placeholder: 'worklevel'
}
]
});
await alert.present();
}


getWorklevel() {
this.userData.getWorklevel().then((worklevel) => {
this.worklevel = worklevel;
});
}

changePassword() {
console.log('Clicked to change password');
}
Expand All @@ -74,4 +144,21 @@ export class AccountPage implements AfterViewInit {
support() {
this.router.navigateByUrl('/support');
}

// getImage(){
// const options: CameraOptions = {
// quality: 70,
// destinationType: this.camera.DestinationType.DATA_URL,
// sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
// saveToPhotoAlbum:false
// }
// this.camera.getPicture(options).then((imageData) => {
// // imageData is either a base64 encoded string or a file URI
// // If it's base64:
// this.myphoto = 'data:image/jpeg;base64,' + imageData;
// }, (err) => {
// // Handle error
// });
// }

}
1 change: 1 addition & 0 deletions src/app/pages/login/login-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ const routes: Routes = [
exports: [RouterModule]
})
export class LoginPageRoutingModule { }

2 changes: 1 addition & 1 deletion src/app/pages/map/map.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ion-buttons slot="start">
<ion-menu-button></ion-menu-button>
</ion-buttons>
<ion-title>Map</ion-title>
<ion-title></ion-title>
</ion-toolbar>
</ion-header>

Expand Down
Loading