clean code

This commit is contained in:
Chneemann 2024-06-01 13:35:29 +02:00
parent 35b62c88fe
commit 951906335a
28 changed files with 45 additions and 37 deletions

View file

@ -1,4 +1,4 @@
@import "./../../../../styles.scss"; @import "./../../../../assets/mixins/responsive.scss";
.menu { .menu {
position: absolute; position: absolute;

View file

@ -1,4 +1,4 @@
@import "../../../../styles.scss"; @import "../../../../assets/mixins/responsive.scss";
section { section {
display: flex; display: flex;

View file

@ -1,4 +1,4 @@
@import "../../../../styles.scss"; @import "../../../../assets/mixins/responsive.scss";
section { section {
width: auto; width: auto;

View file

@ -1,4 +1,4 @@
@import "../../../../styles.scss"; @import "../../../../assets/mixins/responsive.scss";
section { section {
padding: 32px 48px; padding: 32px 48px;

View file

@ -1,4 +1,4 @@
@import "./../../../styles.scss"; @import "./../../../assets/mixins/responsive.scss";
section { section {
height: 100%; height: 100%;

View file

@ -1,4 +1,4 @@
@import "../../../../../styles.scss"; @import "../../../../../assets/mixins/responsive.scss";
.darkBackground { .darkBackground {
position: absolute; position: absolute;

View file

@ -1,4 +1,4 @@
@import "../../../../styles.scss"; @import "../../../../assets/mixins/responsive.scss";
.darkBackground { .darkBackground {
position: absolute; position: absolute;

View file

@ -5,7 +5,6 @@
<img <img
src="{{ imageUrl }}" src="{{ imageUrl }}"
alt="image" alt="image"
loading="lazy"
[ngStyle]="{ [ngStyle]="{
height: height:
openOnSecondaryChat && viewWidth >= RESPONSIVE_THRESHOLD openOnSecondaryChat && viewWidth >= RESPONSIVE_THRESHOLD
@ -20,7 +19,6 @@
class="otherFiles" class="otherFiles"
src="./assets/img/attachments/{{ getFileType(imageUrl) }}.png" src="./assets/img/attachments/{{ getFileType(imageUrl) }}.png"
alt="image" alt="image"
loading="lazy"
[ngStyle]="{ [ngStyle]="{
height: height:
openOnSecondaryChat && viewWidth >= RESPONSIVE_THRESHOLD openOnSecondaryChat && viewWidth >= RESPONSIVE_THRESHOLD
@ -33,7 +31,6 @@
controls controls
preload="auto" preload="auto"
src="{{ imageUrl }}" src="{{ imageUrl }}"
loading="lazy"
[ngStyle]="{ [ngStyle]="{
width: width:
openOnSecondaryChat && viewWidth >= RESPONSIVE_THRESHOLD openOnSecondaryChat && viewWidth >= RESPONSIVE_THRESHOLD
@ -46,7 +43,6 @@
<video <video
src="{{ imageUrl }}" src="{{ imageUrl }}"
alt="video" alt="video"
loading="lazy"
[ngStyle]="{ [ngStyle]="{
height: height:
openOnSecondaryChat && viewWidth >= RESPONSIVE_THRESHOLD openOnSecondaryChat && viewWidth >= RESPONSIVE_THRESHOLD

View file

@ -1,4 +1,4 @@
@import "./../../../../../styles.scss"; @import "./../../../../../assets/mixins/responsive.scss";
.files { .files {
display: flex; display: flex;

View file

@ -28,7 +28,13 @@ export class AttachmentsComponent {
RESPONSIVE_THRESHOLD = this.sharedService.RESPONSIVE_THRESHOLD; RESPONSIVE_THRESHOLD = this.sharedService.RESPONSIVE_THRESHOLD;
async ngOnInit() {} async ngOnInit() {
if (this.filePath) {
this.imageUrl = await this.downloadFilesService.downloadFiles(
this.filePath
);
}
}
// Type of files: // Type of files:
// Img: PNG, GIF, JPG, JPEG // Img: PNG, GIF, JPG, JPEG

View file

@ -1,4 +1,4 @@
@import "../../../../../styles.scss"; @import "../../../../../assets/mixins/responsive.scss";
form { form {
position: relative; position: relative;

View file

@ -1,4 +1,4 @@
@import "./../../../../../styles.scss"; @import "./../../../../../assets/mixins/responsive.scss";
.content { .content {
display: flex; display: flex;

View file

@ -1,4 +1,4 @@
@import "../../../../../styles.scss"; @import "../../../../../assets/mixins/responsive.scss";
section { section {
display: flex; display: flex;

View file

@ -1,4 +1,4 @@
@import "../../../../styles.scss"; @import "../../../../assets/mixins/responsive.scss";
section { section {
display: flex; display: flex;

View file

@ -1,4 +1,4 @@
@import "../../../styles.scss"; @import "../../../assets/mixins/responsive.scss";
app-header { app-header {
display: block; display: block;

View file

@ -1,4 +1,4 @@
@import "./../../../styles.scss"; @import "./../../../assets/mixins/responsive.scss";
section { section {
height: 100%; height: 100%;

View file

@ -1,4 +1,4 @@
@import "../../../../styles.scss"; @import "../../../../assets/mixins/responsive.scss";
section { section {
position: absolute; position: absolute;

View file

@ -1,4 +1,4 @@
@import "../../../../../styles.scss"; @import "../../../../../assets/mixins/responsive.scss";
.darkBackground { .darkBackground {
position: absolute; position: absolute;

View file

@ -1,4 +1,4 @@
@import "../../../../styles.scss"; @import "../../../../assets/mixins/responsive.scss";
section { section {
display: flex; display: flex;

View file

@ -1,4 +1,4 @@
@import "../../../../styles.scss"; @import "../../../../assets/mixins/responsive.scss";
section { section {
display: flex; display: flex;
@ -51,7 +51,6 @@ section {
border-radius: 36px; border-radius: 36px;
} }
@media screen and (max-width: $RESPONSIVE_THRESHOLD_MOBILE380px) { @media screen and (max-width: $RESPONSIVE_THRESHOLD_MOBILE380px) {
section { section {
max-height: 22vh; max-height: 22vh;

View file

@ -1,4 +1,4 @@
@import "./../../../styles.scss"; @import "./../../../assets/mixins/responsive.scss";
section { section {
height: 100%; height: 100%;

View file

@ -1,6 +1,7 @@
export const publicChannels: string[] = [ export const publicChannels: string[] = [
'ktoVhTjif9OndCsLfEF7', 'ktoVhTjif9OndCsLfEF7',
't0zOHsjKzq0uYSqsMx8j', 't0zOHsjKzq0uYSqsMx8j',
'UVeEk7NxpRZjdaNdNWom',
]; ];
export interface Channel { export interface Channel {
id?: string; id?: string;

View file

@ -1,4 +1,4 @@
@import "../../../../../../styles.scss"; @import "../../../../../../assets/mixins/responsive.scss";
.whiteBox { .whiteBox {
width: 400px; width: 400px;

View file

@ -1,4 +1,4 @@
@import "../../../../../styles.scss"; @import "../../../../../assets/mixins/responsive.scss";
.grayBackground { .grayBackground {
position: absolute; position: absolute;

View file

@ -1,4 +1,4 @@
@import "../../../../styles.scss"; @import "../../../../assets/mixins/responsive.scss";
header { header {
height: 100%; height: 100%;

View file

@ -1,4 +1,4 @@
@import "./../../../../../styles.scss"; @import "./../../../../../assets/mixins/responsive.scss";
.inputPosition { .inputPosition {
@include displayFlex(); @include displayFlex();

View file

@ -0,0 +1,12 @@
$RESPONSIVE_THRESHOLD_MOBILE380px: 380px;
$RESPONSIVE_THRESHOLD_MOBILE: 600px;
$RESPONSIVE_THRESHOLD: 1300px;
$RESPONSIVE_THRESHOLD_MAX: 1900px;
$RESPONSIVE_THRESHOLD_SEARCHBAR: 1100px;
@mixin displayFlex($d: flex, $j: center, $a: center, $g: 0) {
display: $d;
justify-content: $j;
align-items: $a;
gap: $g;
}

View file

@ -1,9 +1,3 @@
$RESPONSIVE_THRESHOLD_MOBILE380px: 380px;
$RESPONSIVE_THRESHOLD_MOBILE: 600px;
$RESPONSIVE_THRESHOLD: 1300px;
$RESPONSIVE_THRESHOLD_MAX: 1900px;
$RESPONSIVE_THRESHOLD_SEARCHBAR: 1100px;
* { * {
margin: 0; margin: 0;
scroll-behavior: smooth; scroll-behavior: smooth;