clean code
This commit is contained in:
parent
35b62c88fe
commit
951906335a
28 changed files with 45 additions and 37 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
@import "./../../../../styles.scss";
|
@import "./../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
.menu {
|
.menu {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../styles.scss";
|
@import "../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
section {
|
section {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -52,7 +52,7 @@ section {
|
||||||
section {
|
section {
|
||||||
height: calc(100vh - 144px);
|
height: calc(100vh - 144px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.privatChatHeight {
|
.privatChatHeight {
|
||||||
height: calc(100vh - 158px);
|
height: calc(100vh - 158px);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../styles.scss";
|
@import "../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
section {
|
section {
|
||||||
width: auto;
|
width: auto;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../styles.scss";
|
@import "../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
section {
|
section {
|
||||||
padding: 32px 48px;
|
padding: 32px 48px;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "./../../../styles.scss";
|
@import "./../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
section {
|
section {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../../styles.scss";
|
@import "../../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
.darkBackground {
|
.darkBackground {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../styles.scss";
|
@import "../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
.darkBackground {
|
.darkBackground {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "./../../../../../styles.scss";
|
@import "./../../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
.files {
|
.files {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../../styles.scss";
|
@import "../../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
form {
|
form {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "./../../../../../styles.scss";
|
@import "./../../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../../styles.scss";
|
@import "../../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
section {
|
section {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../styles.scss";
|
@import "../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
section {
|
section {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../styles.scss";
|
@import "../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
app-header {
|
app-header {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "./../../../styles.scss";
|
@import "./../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
section {
|
section {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../styles.scss";
|
@import "../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
section {
|
section {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../../styles.scss";
|
@import "../../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
.darkBackground {
|
.darkBackground {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../styles.scss";
|
@import "../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
section {
|
section {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../styles.scss";
|
@import "../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
section {
|
section {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -51,9 +51,8 @@ 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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "./../../../styles.scss";
|
@import "./../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
section {
|
section {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../../../styles.scss";
|
@import "../../../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
.whiteBox {
|
.whiteBox {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../../styles.scss";
|
@import "../../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
.grayBackground {
|
.grayBackground {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "../../../../styles.scss";
|
@import "../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
header {
|
header {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
@import "./../../../../../styles.scss";
|
@import "./../../../../../assets/mixins/responsive.scss";
|
||||||
|
|
||||||
.inputPosition {
|
.inputPosition {
|
||||||
@include displayFlex();
|
@include displayFlex();
|
||||||
|
|
|
||||||
12
src/assets/mixins/responsive.scss
Normal file
12
src/assets/mixins/responsive.scss
Normal 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;
|
||||||
|
}
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue