Skip to content

Commit

Permalink
Hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
iwokonl committed Apr 18, 2024
1 parent 793bc13 commit 3b7bf04
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 16 deletions.
58 changes: 43 additions & 15 deletions Front/kantor-angular/src/app/contents/contents.component.ts
Original file line number Diff line number Diff line change
@@ -1,32 +1,60 @@
import { Component } from '@angular/core';
import {Component, OnInit} from '@angular/core';
import {AxiosService} from "../axios.service";

@Component({
selector: 'app-contents',
templateUrl: './contents.component.html',
styleUrl: './contents.component.scss'
})
// implements OnInit
export class ContentsComponent {
componentToShow: string = "welcome";

constructor(private axiosService: AxiosService) {
}
onLogin(input: any) {
this.axiosService.request(
"POST",
"/login",
{
username: input.login,
password: input.password
}

).then((response) => {
this.axiosService.setAuthTocken(response.data.token);
this.componentToShow = "messages";
});

}

// Nie wiem co to robi ale buja
// ngOnInit() {
// if (!this.getCookie('firstVisit')) {
// this.clearAllCookies();
// this.setCookie('firstVisit', 'true', 7); // Ustawia ciasteczko na 7 dni
// }
// }
//
// clearAllCookies() {
// const cookies = document.cookie.split(";");
//
// for (let i = 0; i < cookies.length; i++) {
// const cookie = cookies[i];
// const eqPos = cookie.indexOf("=");
// const name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
// document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
// }
// }
//
// getCookie(cname: string) {
// let name = cname + "=";
// let decodedCookie = decodeURIComponent(document.cookie);
// let ca = decodedCookie.split(';');
// for(let i = 0; i <ca.length; i++) {
// let c = ca[i];
// while (c.charAt(0) == ' ') {
// c = c.substring(1);
// }
// if (c.indexOf(name) == 0) {
// return c.substring(name.length, c.length);
// }
// }
// return "";
// }
//
// setCookie(cname: string, cvalue: string, exdays: number) {
// let d = new Date();
// d.setTime(d.getTime() + (exdays*24*60*60*1000));
// let expires = "expires="+ d.toUTCString();
// document.cookie = cname + "=" + cvalue + ";" + expires + ";path=/";
// }
onRegister(input: any) {
this.axiosService.request(
"POST",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,15 @@
}
&:focus {
// Usuwa domyślną niebieską poświatę

background-color: #C82333;
box-shadow: 0 0 0 3px rgba(200, 35, 51, 0.5);
// Usuwa dodatkowy cień, który może się pojawiać
}

&:active:focus{
box-shadow: 0 0 0 3px rgba(200, 35, 51, 0.5);
border-color: #C82333;
background-color: #C82333;
}
//position: fixed;
}
Expand Down

0 comments on commit 3b7bf04

Please sign in to comment.