Skip to content

Commit

Permalink
clean folder structure
Browse files Browse the repository at this point in the history
  • Loading branch information
Kakar21 committed Sep 17, 2024
1 parent fef9e2f commit 01825a3
Show file tree
Hide file tree
Showing 130 changed files with 505 additions and 503 deletions.
14 changes: 7 additions & 7 deletions src/app/app.routes.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Routes } from "@angular/router";
import { MainComponent } from "./main/main.component";
import { LoginComponent } from "./start/login/login.component";
import { SignupComponent } from "./start/signup/signup.component";
import { RecoveryComponent } from "./start/recovery/recovery.component";
import { ResetPasswordComponent } from "./start/reset-password/reset-password.component";
import { PrivacyPolicyComponent } from "./start/privacy-policy/privacy-policy.component";
import { LegalNoticeComponent } from "./start/legal-notice/legal-notice.component";
import { MainComponent } from "./components/main/main.component";
import { LoginComponent } from "./components/start/login/login.component";
import { SignupComponent } from "./components/start/signup/signup.component";
import { RecoveryComponent } from "./components/start/recovery/recovery.component";
import { ResetPasswordComponent } from "./components/start/reset-password/reset-password.component";
import { PrivacyPolicyComponent } from "./components/start/privacy-policy/privacy-policy.component";
import { LegalNoticeComponent } from "./components/start/legal-notice/legal-notice.component";

export const routes: Routes = [
{ path: "", component: MainComponent },
Expand Down
2 changes: 1 addition & 1 deletion src/app/auth.guard.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Injectable, inject } from "@angular/core";
import { CanActivateFn } from "@angular/router";
import { CurrentuserService } from "./currentuser.service";
import { CurrentuserService } from "./shared/currentuser.service";

@Injectable({
providedIn: "root",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ main {
background-color: #eceefe;

> img {
content: url(../../assets/img/icons/account_circle-purple.svg);
content: url(../../../../assets/img/icons/account_circle-purple.svg);
}

> h2 {
Expand All @@ -63,7 +63,7 @@ main {
background-color: #eceefe;

> img {
content: url(../../assets/img/icons/logout-purple.svg);
content: url(../../../../assets/img/icons/logout-purple.svg);
}

> h2 {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component } from "@angular/core";
import { MatBottomSheetModule, MatBottomSheetRef } from "@angular/material/bottom-sheet";
import { MatDialog } from "@angular/material/dialog";
import { FirestoreService } from "../firestore.service";
import { FirestoreService } from "../../../shared/firestore.service";
import { DialogEditProfileEditProfileComponent } from "../dialog-edit-profile-edit-profile/dialog-edit-profile-edit-profile.component";

@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ import { MAT_DIALOG_DATA, MatDialog, MatDialogActions, MatDialogContent, MatDial
import { MatInputModule } from "@angular/material/input";
import { MatRadioModule } from "@angular/material/radio";
import { MatIcon } from "@angular/material/icon";
import { ChatService } from "../main/chat/chat.service";
import { UsersList } from "../interfaces/users-list";
import { ChatService } from "../../../shared/chat.service";
import { UsersList } from "../../../interfaces/users-list";
import { addDoc, collection, getFirestore } from "@angular/fire/firestore";
import { MatAutocomplete, MatAutocompleteModule, MatAutocompleteSelectedEvent, MatOption } from "@angular/material/autocomplete";
import { Observable, map, startWith } from "rxjs";
import { MatChipGrid, MatChipsModule } from "@angular/material/chips";
import { CurrentuserService } from "../currentuser.service";
import { CurrentuserService } from "../../../shared/currentuser.service";

@Component({
selector: "app-dialog-add-channel-add-member",
Expand Down Expand Up @@ -71,7 +71,7 @@ export class DialogAddChannelAddMemberComponent {
.filter(user => user.id !== this.currentUser.currentUser.id) // Hier filtern wir den currentUser nach der ID
),
);

}


Expand Down Expand Up @@ -134,9 +134,9 @@ export class DialogAddChannelAddMemberComponent {

this.showChannel(newChannel.id);
}





remove(user: UsersList): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MatButtonModule } from "@angular/material/button";
import { MatDialog, MatDialogActions, MatDialogContent, MatDialogRef } from "@angular/material/dialog";
import { MatInputModule } from "@angular/material/input";
import { DialogAddChannelAddMemberComponent } from "../dialog-add-channel-add-member/dialog-add-channel-add-member.component";
import { FirestoreService } from "../firestore.service";
import { FirestoreService } from "../../../shared/firestore.service";
import { MatBottomSheet } from "@angular/material/bottom-sheet";
import { BottomsheetAddMemberNewChannelComponent } from "../bottomsheet-add-member-new-channel/bottomsheet-add-member-new-channel.component";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { MatInputModule } from "@angular/material/input";
import { map, startWith } from "rxjs/operators";
import { COMMA, ENTER } from "@angular/cdk/keycodes";
import { Observable } from "rxjs";
import { ChatService } from "../main/chat/chat.service";
import { UsersList } from "../interfaces/users-list";
import { ChatService } from "../../../shared/chat.service";
import { UsersList } from "../../../interfaces/users-list";
import { MatChipGrid, MatChipsModule } from "@angular/material/chips";
import { MatIcon, MatIconModule } from "@angular/material/icon";
import { DialogChannelInfoComponent } from "../dialog-channel-info/dialog-channel-info.component";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ main {

> div {
> span {
content: url(../../assets/img/icons/edit.svg);
content: url(../../../../assets/img/icons/edit.svg);
width: 1.5rem;
height: 1.5rem;
padding: 0.1875rem;
Expand All @@ -328,7 +328,7 @@ main {
}

.save {
content: url(../../assets/img/icons/check_circle.svg);
content: url(../../../../assets/img/icons/check_circle.svg);
}
}
}
Expand All @@ -343,7 +343,7 @@ main {

> div {
> span {
content: url(../../assets/img/icons/edit.svg);
content: url(../../../../assets/img/icons/edit.svg);
width: 1.5rem;
height: 1.5rem;
padding: 0.1875rem;
Expand All @@ -352,7 +352,7 @@ main {
}

.save {
content: url(../../assets/img/icons/check_circle.svg);
content: url(../../../../assets/img/icons/check_circle.svg);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { ComponentFixture, TestBed } from "@angular/core/testing";

import { DialogChannelInfoComponent } from "./dialog-channel-info.component";

describe("DialogChannelInfoComponent", () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Component } from "@angular/core";
import { MatButtonModule } from "@angular/material/button";
import { MatDialogRef } from "@angular/material/dialog";
import { ChatService } from "../main/chat/chat.service";
import { ChatService } from "../../../shared/chat.service";
import { FormsModule } from "@angular/forms";
import { doc, getFirestore, updateDoc } from "@angular/fire/firestore";
import { CurrentuserService } from "../currentuser.service";
import { CurrentuserService } from "../../../shared/currentuser.service";
import { DialogShowChannelMemberComponent } from "../dialog-show-channel-member/dialog-show-channel-member.component";

@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ input {

.profile-name-section {
> span {
content: url(../../assets/img/icons/edit.svg);
content: url(../../../../assets/img/icons/edit.svg);
width: 1.5rem;
height: 1.5rem;
padding: 0.1875rem;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { FormsModule } from "@angular/forms";
import { MatButtonModule } from "@angular/material/button";
import { MatDialog, MatDialogActions, MatDialogContent, MatDialogRef } from "@angular/material/dialog";
import { MatInputModule } from "@angular/material/input";
import { FirestoreService } from "../firestore.service";
import { UsersList } from "../interfaces/users-list";
import { HeaderComponent } from "../main/header/header.component";
import { FirestoreService } from "../../../shared/firestore.service";
import { UsersList } from "../../../interfaces/users-list";
import { HeaderComponent } from "../../main/header/header.component";
import { doc, onSnapshot } from "@angular/fire/firestore";
import { ImageService } from "../image.service";
import { ImageService } from "../../../shared/image.service";

@Component({
selector: "app-dialog-edit-profile-edit-profile",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { MatButtonModule } from "@angular/material/button";
import { MatDialog, MatDialogActions, MatDialogContent, MatDialogRef } from "@angular/material/dialog";
import { MatInputModule } from "@angular/material/input";
import { DialogEditProfileEditProfileComponent } from "../dialog-edit-profile-edit-profile/dialog-edit-profile-edit-profile.component";
import { FirestoreService } from "../firestore.service";
import { FirestoreService } from "../../../shared/firestore.service";

@Component({
selector: "app-dialog-edit-profile",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ main {
background-color: var(--bg-color);

> img {
content: url(../../assets/img/icons/person-add-purple.svg);
content: url(../../../../assets/img/icons/person-add-purple.svg);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Component } from "@angular/core";
import { MatDialog, MatDialogRef } from "@angular/material/dialog";
import { ChatService } from "../main/chat/chat.service";
import { ChatService } from "../../../shared/chat.service";
import { CommonModule } from "@angular/common";
import { MatButtonModule } from "@angular/material/button";
import { DialogAddMemberToChnlComponent } from "../dialog-add-member-to-chnl/dialog-add-member-to-chnl.component";
import { PofileInfoCardComponent } from "../pofile-info-card/pofile-info-card.component";
import { UsersList } from "../interfaces/users-list";
import { UsersList } from "../../../interfaces/users-list";
@Component({
selector: "app-dialog-show-channel-member",
standalone: true,
Expand Down Expand Up @@ -36,6 +36,7 @@ export class DialogShowChannelMemberComponent {


openProfileCard(user: UsersList) {
user.online = this.isOnline(user.id);
this.dialog.open(PofileInfoCardComponent, {
data: user,
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Component, Inject } from "@angular/core";
import { MAT_DIALOG_DATA, MatDialogActions, MatDialogRef } from "@angular/material/dialog";
import { UsersList } from "../interfaces/users-list";
import { UsersList } from "../../../interfaces/users-list";
import { MatButtonModule } from "@angular/material/button";
import { MatIconModule } from "@angular/material/icon";
import { ChatService } from "../main/chat/chat.service";
import { DirectmessageService } from "../main/chat/direct-message/directmessage.service";
import { ChatService } from "../../../shared/chat.service";
import { DirectmessageService } from "../../../shared/directmessage.service";

@Component({
selector: "app-pofile-info-card",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@

::ng-deep::ng-deep .mdc-button__label {
>img:first-child {
content: url(../../../assets/img/icons/chat-tag-purple.svg);
content: url(../../../../assets/img/icons/chat-tag-purple.svg);
}

>h1 {
color: var(--purple-3);
}

>img:last-child {
content: url(../../../assets/img/icons/keyboard_arrow_down-purple.svg);
content: url(../../../../assets/img/icons/keyboard_arrow_down-purple.svg);
}
}
}
Expand Down Expand Up @@ -148,7 +148,7 @@
background-color: var(--bg-color);

>img {
content: url(../../../assets/img/icons/person-add-purple.svg);
content: url(../../../../assets/img/icons/person-add-purple.svg);
}
}
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,31 @@ import { CommonModule } from "@angular/common";
import { MatButtonModule } from "@angular/material/button";
import { MatDialog, MatDialogModule } from "@angular/material/dialog";
import { MatIconModule } from "@angular/material/icon";
import { DialogAddMemberToChnlComponent } from "../../dialog-add-member-to-chnl/dialog-add-member-to-chnl.component";
import { DialogAddMemberToChnlComponent } from "../../dialogs/dialog-add-member-to-chnl/dialog-add-member-to-chnl.component";
import { MatMenuModule } from "@angular/material/menu";
import { DialogChannelInfoComponent } from "../../dialog-channel-info/dialog-channel-info.component";
import { DialogShowChannelMemberComponent } from "../../dialog-show-channel-member/dialog-show-channel-member.component";
import { EmojiSearch, PickerComponent } from "@ctrl/ngx-emoji-mart";
import { DialogEditMessageComponent } from "../../dialog-edit-message/dialog-edit-message.component";
import { ChatService } from "./chat.service";
import { DialogChannelInfoComponent } from "../../dialogs/dialog-channel-info/dialog-channel-info.component";
import { DialogShowChannelMemberComponent } from "../../dialogs/dialog-show-channel-member/dialog-show-channel-member.component";
import { PickerComponent } from "@ctrl/ngx-emoji-mart";
import { DialogEditMessageComponent } from "../../dialogs/dialog-edit-message/dialog-edit-message.component";
import { ChatService } from "../../../shared/chat.service";
import { MainComponent } from "../main.component";
import { Message } from "../../interfaces/message";
import { Message } from "../../../interfaces/message";
import { FormControl, FormsModule, ReactiveFormsModule } from "@angular/forms";
import { MatFormFieldModule } from "@angular/material/form-field";
import { serverTimestamp } from "@angular/fire/firestore";
import { Channel } from "../../interfaces/channel";
import { CurrentuserService } from "../../currentuser.service";
import { Channel } from "../../../interfaces/channel";
import { CurrentuserService } from "../../../shared/currentuser.service";
import { MatAutocompleteModule, MatAutocompleteSelectedEvent } from "@angular/material/autocomplete";
import { Observable, map, startWith } from "rxjs";
import { UsersList } from "../../interfaces/users-list";
import { UsersList } from "../../../interfaces/users-list";
import { MatInputModule } from "@angular/material/input";
import { HighlightMentionsPipe } from "../../pipes/highlist-mentions.pipe";
import { PofileInfoCardComponent } from "../../pofile-info-card/pofile-info-card.component";
import { EmojiModule, EmojiService } from "@ctrl/ngx-emoji-mart/ngx-emoji";
import { ImageService } from "../../image.service";
import { DialogImageComponent } from "../../dialog-image/dialog-image.component";
import { CommonFnService } from "../../common-fn.service";
import { ThreadService } from "../thread/thread.service";
import { HighlightMentionsPipe } from "../../../pipes/highlist-mentions.pipe";
import { PofileInfoCardComponent } from "../../dialogs/pofile-info-card/pofile-info-card.component";
import { EmojiModule } from "@ctrl/ngx-emoji-mart/ngx-emoji";
import { ImageService } from "../../../shared/image.service";
import { DialogImageComponent } from "../../dialogs/dialog-image/dialog-image.component";
import { CommonFnService } from "../../../shared/common-fn.service";
import { ThreadService } from "../../../shared/thread.service";

@Component({
selector: "app-chat",
Expand All @@ -54,7 +54,7 @@ import { ThreadService } from "../thread/thread.service";
styleUrls: ["./chat.component.scss"],
})
export class ChatComponent implements AfterViewInit, OnInit {
@Output() threadOpen = new EventEmitter<{ channelId: string; messageId: string }>();
@Output() threadOpen = new EventEmitter<{ channelId: string; messageId: string; }>();
@ViewChild("chatContainer") private chatContainer!: ElementRef;
@ViewChild("messageInput") messageInput!: ElementRef<HTMLInputElement>;
@ViewChild("message") message!: ElementRef<HTMLInputElement>;
Expand All @@ -73,7 +73,7 @@ export class ChatComponent implements AfterViewInit, OnInit {
editMessageId: string | null = null;
perLineCount = 9;


constructor(
public dialog: MatDialog,
public chatService: ChatService,
Expand Down Expand Up @@ -143,6 +143,7 @@ export class ChatComponent implements AfterViewInit, OnInit {
openProfileById(userId: string) {
const user = this.chatService.usersList.find((u) => u.id === userId);
if (user) {
console.log(user);
this.dialog.open(PofileInfoCardComponent, { data: user });
}
}
Expand Down Expand Up @@ -185,7 +186,7 @@ export class ChatComponent implements AfterViewInit, OnInit {
}


calculatePickerPosition(event: MouseEvent): { top: string; left: string } {
calculatePickerPosition(event: MouseEvent): { top: string; left: string; } {
const pickerHeight = 350;
const pickerWidth = 300;
const buttonWidth = 50;
Expand All @@ -210,7 +211,7 @@ export class ChatComponent implements AfterViewInit, OnInit {
}
}


openDialogAddMembers(event: MouseEvent): void {
const dialogPosition = this.getDialogPosition(event);
if (dialogPosition) {
Expand Down Expand Up @@ -275,7 +276,7 @@ export class ChatComponent implements AfterViewInit, OnInit {
}
}


async send() {
const imageUrl = await this.uploadImage();
if (this.messageText.trim() !== "" || imageUrl.trim() !== "") {
Expand Down
Loading

0 comments on commit 01825a3

Please sign in to comment.