Skip to content

Commit

Permalink
Updated setting
Browse files Browse the repository at this point in the history
  • Loading branch information
brozanski committed Jun 6, 2024
1 parent f6213a1 commit f4dd155
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 23 deletions.
46 changes: 25 additions & 21 deletions Front/kantor-angular/src/app/settings/settings.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h1>Ustawienia</h1>
<div class="settings-picker-outer">
<div class="settings-picker-inner">
<div class="profile-active" *ngIf="isProfileSelected">
<button class="buttons-active" (click)="selectCategory('profile')">Profile</button>
<button class="buttons-active" (click)="selectCategory('profile')">Profil</button>
</div>
<div class="profile-inactive" *ngIf="!isProfileSelected">
<button class="buttons-inactive" (click)="selectCategory('profile')">Profile</button>
Expand All @@ -17,7 +17,7 @@ <h1>Ustawienia</h1>
<button class="buttons-active" (click)="selectCategory('help')">Help</button>
</div>
<div class="help-inactive" *ngIf="!isHelpSelected">
<button class="buttons-inactive" (click)="selectCategory('help')">Help</button>
<button class="buttons-inactive" (click)="selectCategory('help')">Pomoc</button>
</div>
</div>
</div>
Expand All @@ -40,52 +40,56 @@ <h1>Ustawienia</h1>
<div class="username" *ngIf="isEditingUsername">
<form class="settings-forms" (ngSubmit)="changeUserLogin()">
<input id="active-username" class="input-box" [(ngModel)]="user_name" name="username">
<button class="button-box" (click)="toggleEditUsername()" type="submit">Zapisz</button>
<button class="button-box" type="submit">Zapisz</button>
</form>
</div>
<div class="email" *ngIf="!isEditingEmail">
<form class="settings-forms">
<input class="input-box" [readonly]="true" [(ngModel)]="email" name="email">
<button class="button-box" (click)="toggleEditEmail()">Zmień</button>
</form>
</div>
<div class="email" *ngIf="isEditingEmail">
<form class="settings-forms" (ngSubmit)="changeUserEmail()">
<input id="active-email" class="input-box" [(ngModel)]="email" name="email">
<button class="button-box" type="submit">Zapisz</button>
</form>
</div>
<div class="firstname" *ngIf="!isEditingFirstName">
<form class="settings-forms">
<input class="input-box" [readonly]="true" [(ngModel)]="firstname" name="firstname">
<button class="button-box" (click)="toggleEditFirstName()">Zmień</button>
<!-- <button class="button-box" (click)="toggleEditFirstName()">Zmień</button>-->
</form>
</div>
<div class="firstname" *ngIf="isEditingFirstName">
<form class="settings-forms" (ngSubmit)="changeUserFirstName()">
<input id="active-firstname" class="input-box" [(ngModel)]="firstname" name="firstname">
<button class="button-box" type="submit">Zapisz</button>
<!-- <button class="button-box" type="submit">Zapisz</button>-->
</form>
</div>
<div class="lastname" *ngIf="!isEditingLastName">
<form class="settings-forms">
<input class="input-box" [readonly]="true" [(ngModel)]="lastname" name="lastname">
<button class="button-box" (click)="toggleEditLastName()">Zmień</button>
<!-- <button class="button-box" (click)="toggleEditLastName()">Zmień</button>-->
</form>
</div>
<div class="lastname" *ngIf="isEditingLastName">
<form class="settings-forms" (ngSubmit)="changeUserLastName()">
<input id="active-lastname" class="input-box" [(ngModel)]="lastname" name="lastname">
<button class="button-box" type="submit">Zapisz</button>
</form>
</div>
<div class="email" *ngIf="!isEditingEmail">
<form class="settings-forms">
<input class="input-box" [readonly]="true" [(ngModel)]="email" name="email">
<button class="button-box" (click)="toggleEditEmail()">Zmień</button>
</form>
</div>
<div class="email" *ngIf="isEditingEmail">
<form class="settings-forms" (ngSubmit)="changeUserEmail()">
<input id="active-email" class="input-box" [(ngModel)]="email" name="email">
<button class="button-box" type="submit">Zapisz</button>
<!-- <button class="button-box" type="submit">Zapisz</button>-->
</form>
</div>
</div>
</div>


<div class="selected-help" *ngIf="isHelpSelected">
<!-- Help settings go here -->
<p> Pomocy </p>
<div class="help-header"><h2> Pomoc i kontakt </h2><br></div>
<div classs="help-content">
<p> Jeśli masz jakiekolwiek pytania, skontaktuj się z nami pod adresem: </p>
<p> <b>pomoc&#64;kantorsell.pl</b> </p>
</div>

</div>

Expand Down
35 changes: 34 additions & 1 deletion Front/kantor-angular/src/app/settings/settings.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ h1 {
justify-content: center;
}

.selected-profile, .selected-help, .selected-security {
.selected-profile {
display: flex;
flex-direction: row;
height: 100%;
Expand Down Expand Up @@ -259,3 +259,36 @@ h1 {
gap: 1%;
}


.selected-help{
display: flex;
flex-direction: column;
align-items: center;
height: 100%;
width: 100%;
animation: fade-in 1s ease 0s 1 normal forwards;
@keyframes fade-in {
0% {
opacity: 0;
}

100% {
opacity: 1;
}
}

}

.help-header {
display: flex;
justify-content: center;
width: 100%;
}

.help-content p{
display: flex;
flex-direction: column;
gap: 1%;
margin: 10%;
width: 100%;
}
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ export class SettingsComponent implements OnInit, OnDestroy {
}).then((response) => {
console.log(response);
});
this.toggleEditEmail();
}

toggleEditUsername() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ <h5 class="custom-card-title">
</ng-template>

<div class="popular-pairs">
<h2>Najpopularniejsze pary walutowe</h2>
<h3>Najpopularniejsze pary walutowe</h3>
<div class="pairs">
<div class="column">
<ng-container *ngFor="let exchangeRate of exchangeRates.slice(0, 15)">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
width: 25%;
margin-left: 1%;
}

.right-container {
display: flex;
height: 99%;
Expand All @@ -47,6 +48,11 @@
backdrop-filter: blur(25px);
padding: 1%;
margin-left: 1%;

h3{
padding: 4%;
flex-wrap: wrap;
}
}

.upper-container {
Expand Down

0 comments on commit f4dd155

Please sign in to comment.