Skip to content

Commit

Permalink
Adapt modal, add close button on psw change, fix some issues
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoibaev committed Dec 15, 2024
1 parent 130934a commit 1df67ea
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 20 deletions.
33 changes: 21 additions & 12 deletions public/components/CreateRoomModal/CreateRoomModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
}

&__content {
max-width: 600px;
width: 700px;
height: 400px;
max-width: 800px;
width: 800px;
height: 500px;
transform: scale(0.5);
transition: 0.4s all;
background-color: $modal-content-background;
Expand All @@ -49,7 +49,7 @@
}

&_title {
font-size: 32px;
font-size: $font-size-extra-large;
margin-bottom: 16px;
text-align: center;
}
Expand Down Expand Up @@ -78,10 +78,11 @@
}
}

@include smallTablet {
@include extraLargeTablet {
.create-room-modal {
&__content {
width: 550px;
width: 600px;
height: 400px;
}
&__close-icon {
width: 24px;
Expand All @@ -90,6 +91,14 @@
}
}

@include smallTablet {
.create-room-modal {
&__content {
width: 550px;
}
}
}

@include mobile {
.create-room-modal {
&__content {
Expand All @@ -113,15 +122,15 @@
padding: 24px;

&_title {
font-size: 24px;
font-size: $font-size-large;
margin-bottom: 12px;
}
&_search {
&_desc {
font-size: 14px;
font-size: $font-size-small;
}
&_input {
font-size: 14px;
font-size: $font-size-small;
}
}
}
Expand All @@ -139,15 +148,15 @@
padding: 24px;

&_title {
font-size: 20px;
font-size: $font-size-menu;
margin-bottom: 10px;
}
&_search {
&_desc {
font-size: 12px;
font-size: $font-size-extra-small;
}
&_input {
font-size: 12px;
font-size: $font-size-extra-small;
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion public/components/GridMoviesList/GridMoviesList.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
flex-direction: column;
align-items: center;

height: 200px;
height: 300px;
overflow-y: scroll;

&::-webkit-scrollbar {
Expand Down Expand Up @@ -55,6 +55,12 @@
}
}

@include extraLargeTablet {
.grid-list {
height: 200px;
}
}

@include mobile {
.grid-list {
&__container {
Expand Down
6 changes: 6 additions & 0 deletions public/components/PasswordChangeModal/PasswordChangeModal.hbs
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<div id='password-modal' class='password-modal'>
<div id='password-modal-content' class='password-modal__content'>
<img
id='password-modal-close-button'
class='password-modal__close-icon'
src='/assets/icons/closeNoShadowIcon.svg'
alt=''
/>
<h4 class='password-modal__content_text'>Смена пароля</h4>
<div class='password-modal__input'>
<label for='password-prev-value'>
Expand Down
41 changes: 39 additions & 2 deletions public/components/PasswordChangeModal/PasswordChangeModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@
z-index: 10000;
backdrop-filter: blur(3px);

&__close-icon {
position: absolute;
width: 26px;
height: 26px;
top: 15px;
right: 15px;

&:hover {
cursor: pointer;
}
}

&__active {
opacity: 1;
pointer-events: all;
Expand Down Expand Up @@ -110,15 +122,28 @@
}
}

@include extraLargeTablet {
.password-modal {
&__close-icon {
width: 24px;
height: 24px;
}
}
}

@include mobile {
.modal {
.password-modal {
&__content {
width: 350px;
}
&__close-icon {
width: 22px;
height: 22px;
}
}
}
@include extraSmallMobile {
.modal {
.password-modal {
&__content {
padding: 24px;
width: 90vw;
Expand All @@ -128,5 +153,17 @@
margin-bottom: 25px;
}
}
&__close-icon {
width: 18px;
height: 18px;
}
}
}
@include tinyMobile {
.password-modal {
&__close-icon {
width: 16px;
height: 16px;
}
}
}
10 changes: 10 additions & 0 deletions public/components/PasswordChangeModal/PasswordChangeModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,15 @@ export class PasswordChangeModal {
);
}

handleCloseButtonClick() {
const closeButton = document.getElementById(
'password-modal-close-button',
) as HTMLElement;
closeButton.addEventListener('click', () => {
this.hideModal();
});
}

validatePasswordConrirmField(
passwordValue: string,
passwordConfirmValue: string,
Expand Down Expand Up @@ -159,6 +168,7 @@ export class PasswordChangeModal {
}

this.onSubmitClick();
this.handleCloseButtonClick();
}

hideModal() {
Expand Down
6 changes: 3 additions & 3 deletions public/components/SeriesList/SeriesList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ export class SeriesList {
}

renderSeasonsBlock() {
const seasonsBlock = document.getElementById(
'series-list-seasons',
) as HTMLDivElement;
if (this.#seasons) {
const seasonsBlock = document.getElementById(
'series-list-seasons',
) as HTMLDivElement;
const seasonsMenu = new SeasonsMenu(
seasonsBlock,
this.#seasons.length,
Expand Down
2 changes: 1 addition & 1 deletion public/pages/ProfilePage/ProfilePage.scss
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
gap: 8px;
font-size: $font-size-medium;
border: 1.5px solid $brand;
padding: 0.5em 1em 1em 1em;
padding: 0.5em 1em;

border-radius: 0.5em;
transition: transform 0.2s ease;
Expand Down
1 change: 0 additions & 1 deletion public/types/movie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ export type MovieDetailed = {
seasons?: Season[];
isFromFavorites?: boolean;
withSubscription?: boolean;
//For rating test
userRating?: number;
};

Expand Down

0 comments on commit 1df67ea

Please sign in to comment.