From 5f7667af30a7c08eb7b2153121822a6ebcf1202d Mon Sep 17 00:00:00 2001 From: Chneemann Date: Sun, 26 May 2024 19:23:53 +0200 Subject: [PATCH] clean code --- .../channel-informations.component.scss | 8 --- .../chat-msg-box/chat-msg-box.component.html | 4 +- .../chat-msg-box/chat-msg-box.component.scss | 15 ++--- .../choose-avatar.component.html | 18 +++--- .../choose-avatar.component.scss | 4 +- .../choose-avatar/choose-avatar.component.ts | 4 +- .../register/register.component.html | 35 ++++++----- .../register/register.component.scss | 4 +- .../edit-user-details.component.scss | 63 ++++++++++--------- .../header/edit-user/edit-user.component.html | 2 +- .../header/edit-user/edit-user.component.ts | 5 -- .../shared/components/login/mixins/mixin.scss | 2 +- 12 files changed, 82 insertions(+), 82 deletions(-) diff --git a/src/app/components/main-chat/channel-informations/channel-informations.component.scss b/src/app/components/main-chat/channel-informations/channel-informations.component.scss index 2896e26..960a915 100644 --- a/src/app/components/main-chat/channel-informations/channel-informations.component.scss +++ b/src/app/components/main-chat/channel-informations/channel-informations.component.scss @@ -52,14 +52,6 @@ } } -.dieableEdit { - color: rgba(0, 0, 0, 0.5) !important; - cursor: context-menu !important; - &:hover { - font-weight: 400 !important; - } -} - .closeBtn { display: flex; justify-content: center; diff --git a/src/app/components/main-chat/chat-msg-box/chat-msg-box.component.html b/src/app/components/main-chat/chat-msg-box/chat-msg-box.component.html index e87d820..40d4697 100644 --- a/src/app/components/main-chat/chat-msg-box/chat-msg-box.component.html +++ b/src/app/components/main-chat/chat-msg-box/chat-msg-box.component.html @@ -1,5 +1,5 @@
-
+
@if(hasFile){
= 1){

diff --git a/src/app/components/main-chat/chat-msg-box/chat-msg-box.component.scss b/src/app/components/main-chat/chat-msg-box/chat-msg-box.component.scss index 3a4c8fa..122377d 100644 --- a/src/app/components/main-chat/chat-msg-box/chat-msg-box.component.scss +++ b/src/app/components/main-chat/chat-msg-box/chat-msg-box.component.scss @@ -47,10 +47,11 @@ section { } } -.sendIconDisabled{ +.sendIconDisabled { padding: 6px; transform: 0.3 ease-in-out; - filter: brightness(0) saturate(100%) invert(78%) sepia(4%) saturate(4098%) hue-rotate(207deg) brightness(99%) contrast(98%); + filter: brightness(0) saturate(100%) invert(78%) sepia(4%) saturate(4098%) + hue-rotate(207deg) brightness(99%) contrast(98%); } .verticalLine { @@ -86,7 +87,7 @@ app-emoji-picker { z-index: 3; } -.posiotionDataFromPc { +.positionDataFromPc { margin-top: -40px; display: flex; width: 60px; @@ -114,7 +115,7 @@ app-emoji-picker { height: 100vh; } -.showWanrningNotice { +.showWarningNotice { animation: shwoWN 0.3s ease-in-out; } @@ -176,7 +177,7 @@ app-emoji-picker { display: flex; } -.warningMessage{ +.warningMessage { color: red; } @@ -234,8 +235,8 @@ app-emoji-picker { padding-bottom: 54px; margin: 12px; } - - .warningMessage{ + + .warningMessage { font-size: 12px; } } diff --git a/src/app/components/main-login/choose-avatar/choose-avatar.component.html b/src/app/components/main-login/choose-avatar/choose-avatar.component.html index d096f2c..2784a31 100644 --- a/src/app/components/main-login/choose-avatar/choose-avatar.component.html +++ b/src/app/components/main-login/choose-avatar/choose-avatar.component.html @@ -1,4 +1,4 @@ -

+
@@ -11,7 +11,7 @@ >
- {{ 'chooseAvatar.header' | translate }} + {{ "chooseAvatar.header" | translate }}
@@ -29,7 +29,9 @@ />
-
{{ 'chooseAvatar.avatarInfo' | translate }}
+
+ {{ "chooseAvatar.avatarInfo" | translate }} +
-
{{ 'chooseAvatar.ownAvatar' | translate }}
+
{{ "chooseAvatar.ownAvatar" | translate }}
- +
-
+
diff --git a/src/app/components/main-login/choose-avatar/choose-avatar.component.scss b/src/app/components/main-login/choose-avatar/choose-avatar.component.scss index ac8a4ac..5057af6 100644 --- a/src/app/components/main-login/choose-avatar/choose-avatar.component.scss +++ b/src/app/components/main-login/choose-avatar/choose-avatar.component.scss @@ -3,8 +3,8 @@ font-family: Nunito; } -.avatarSektion { - @include SektionBody; +section { + @include SectionBody; } .avatarContainer { @include Card; diff --git a/src/app/components/main-login/choose-avatar/choose-avatar.component.ts b/src/app/components/main-login/choose-avatar/choose-avatar.component.ts index d73b0a9..00e8bcd 100644 --- a/src/app/components/main-login/choose-avatar/choose-avatar.component.ts +++ b/src/app/components/main-login/choose-avatar/choose-avatar.component.ts @@ -77,11 +77,11 @@ export class ChooseAvatarComponent { this.loginService.getAvatarUrl(url); }) .catch((error) => - console.error('Fehler beim Abrufen der Download-URL:', error) + console.error('Error retrieving the download URL:', error) ); }) .catch((error) => { - console.error('Fehler beim Hochladen:', error); + console.error('Upload error:', error); }); } diff --git a/src/app/components/main-login/register/register.component.html b/src/app/components/main-login/register/register.component.html index 36b8406..d1f9ddd 100644 --- a/src/app/components/main-login/register/register.component.html +++ b/src/app/components/main-login/register/register.component.html @@ -1,4 +1,4 @@ -
+
@@ -12,12 +12,10 @@ >
- {{ 'createAccount.header' | translate }} + {{ "createAccount.header" | translate }}
- {{ 'createAccount.infoText' | translate }} + {{ "createAccount.infoText" | translate }}
@if (!nameField.valid && nameField.touched) { -

{{ 'createAccount.errorText' | translate }}

+

{{ "createAccount.errorText" | translate }}

}
@@ -56,16 +54,16 @@ pattern="[^@]+@[^.]+\..+" /> @if (!emailField.valid && emailField.touched) { -

{{ 'createAccount.errorText2' | translate }}

+

{{ "createAccount.errorText2" | translate }}

}
- - Toggle visibility + Toggle visibility @if (!passwordField.valid && passwordField.touched) {

- {{ 'createAccount.errorText3' | translate }} + {{ "createAccount.errorText3" | translate }}

}
@@ -97,10 +100,10 @@ />
{{ 'createAccount.midText' | translate }} + >{{ "createAccount.midText" | translate }} {{ 'createAccount.midText2' | translate }} {{ 'createAccount.midText3' | translate }}{{ "createAccount.midText2" | translate }} {{ "createAccount.midText3" | translate }}
@@ -108,10 +111,10 @@ [ngClass]="{ aktivButton: isChecked && contactForm.valid }" [disabled]="!isChecked || !contactForm.valid" > - {{ 'createAccount.Btn' | translate }} + {{ "createAccount.Btn" | translate }}
-
+
diff --git a/src/app/components/main-login/register/register.component.scss b/src/app/components/main-login/register/register.component.scss index e46289c..cb0ec00 100644 --- a/src/app/components/main-login/register/register.component.scss +++ b/src/app/components/main-login/register/register.component.scss @@ -1,6 +1,6 @@ @import "../../../shared/components/login/mixins/mixin.scss"; -.registerSektion { - @include SektionBody; +section { + @include SectionBody; } .registerContainer { @include Card; diff --git a/src/app/shared/components/header/edit-user/edit-user-details/edit-user-details.component.scss b/src/app/shared/components/header/edit-user/edit-user-details/edit-user-details.component.scss index b6329d4..d4c4c68 100644 --- a/src/app/shared/components/header/edit-user/edit-user-details/edit-user-details.component.scss +++ b/src/app/shared/components/header/edit-user/edit-user-details/edit-user-details.component.scss @@ -9,23 +9,25 @@ z-index: 5; top: 110px; right: 20px; - @include displayFlex(); - flex-direction: column; padding: 24px; - .boxHeader { - width: 360px; - @include displayFlex($j: space-between); - } - .profileImg { - width: 200px; - height: 200px; - object-fit: cover; - border-radius: 50%; - margin: 56px; - } - p { - color: red; - margin-bottom: 16px; + form { + @include displayFlex(); + flex-direction: column; + .boxHeader { + width: 360px; + @include displayFlex($j: space-between); + } + .profileImg { + width: 200px; + height: 200px; + object-fit: cover; + border-radius: 50%; + margin: 56px; + } + p { + color: red; + margin-bottom: 16px; + } } } @@ -140,23 +142,26 @@ right: 15vw; left: 15vw; padding: 24px; - .boxHeader { - width: 100%; - padding: 0 12px; + form { + .boxHeader { + width: 100%; + padding: 0 12px; + p { + font-size: 21px; + font-weight: 700; + } + } + .profileImg { + width: 120px; + height: 120px; + margin: 18px; + } p { - font-size: 21px; - font-weight: 700; + font-size: 13px; } } - .profileImg { - width: 120px; - height: 120px; - margin: 18px; - } - p { - font-size: 13px; - } } + .detailsBox { width: 100%; padding: 0 12px; diff --git a/src/app/shared/components/header/edit-user/edit-user.component.html b/src/app/shared/components/header/edit-user/edit-user.component.html index bbdb46d..5aeda43 100644 --- a/src/app/shared/components/header/edit-user/edit-user.component.html +++ b/src/app/shared/components/header/edit-user/edit-user.component.html @@ -11,7 +11,7 @@ (click)="closeCurrentProfile()" > - +

{{ i.firstName }} {{ i.lastName }}

diff --git a/src/app/shared/components/header/edit-user/edit-user.component.ts b/src/app/shared/components/header/edit-user/edit-user.component.ts index 4158c1b..b81c51a 100644 --- a/src/app/shared/components/header/edit-user/edit-user.component.ts +++ b/src/app/shared/components/header/edit-user/edit-user.component.ts @@ -27,11 +27,6 @@ export class EditUserComponent { constructor(public userService: UserService) {} - /** Toggles the side menu. */ - showSideMenu() { - this.openEditUserValue = !this.openEditUserValue; - } - /** Opens the edit user section. */ openEditUser() { this.openEditUserValue = true; diff --git a/src/app/shared/components/login/mixins/mixin.scss b/src/app/shared/components/login/mixins/mixin.scss index a98ec59..4b4f544 100644 --- a/src/app/shared/components/login/mixins/mixin.scss +++ b/src/app/shared/components/login/mixins/mixin.scss @@ -1,4 +1,4 @@ -@mixin SektionBody { +@mixin SectionBody { display: flex; justify-content: space-between; align-items: center;