From ccef7fb86f9ace9b39f0eb18ea3f979b5353d21e Mon Sep 17 00:00:00 2001 From: RakVhalate Date: Sun, 4 Dec 2022 02:40:33 +1000 Subject: [PATCH] Added one button --- .vs/VSWorkspaceState.json | 1 - .vs/slnx.sqlite | Bin 90112 -> 98304 bytes package-lock.json | 89 ++++++++++++++++++ package.json | 1 + src/app/app-routing.module.ts | 21 +++++ src/app/app.component.css | 65 ++++++++++++- src/app/app.component.html | 15 +++ src/app/app.component.ts | 21 +++-- src/app/app.module.ts | 24 ++--- src/app/models/boards.ts | 9 ++ src/app/pages/about/about.component.ts | 7 +- src/app/pages/home/home.component.html | 2 +- src/app/pages/home/home.component.ts | 6 +- src/app/pages/nav-bar/nav-bar.component.css | 0 src/app/pages/nav-bar/nav-bar.component.html | 10 ++ .../pages/nav-bar/nav-bar.component.spec.ts | 23 +++++ src/app/pages/nav-bar/nav-bar.component.ts | 21 +++++ src/app/services/api-chat.service.ts | 31 ++++-- 18 files changed, 303 insertions(+), 43 deletions(-) create mode 100644 src/app/app-routing.module.ts create mode 100644 src/app/models/boards.ts create mode 100644 src/app/pages/nav-bar/nav-bar.component.css create mode 100644 src/app/pages/nav-bar/nav-bar.component.html create mode 100644 src/app/pages/nav-bar/nav-bar.component.spec.ts create mode 100644 src/app/pages/nav-bar/nav-bar.component.ts diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json index 20ae7b8..4969a6c 100644 --- a/.vs/VSWorkspaceState.json +++ b/.vs/VSWorkspaceState.json @@ -3,7 +3,6 @@ "", "\\src", "\\src\\app", - "\\src\\app\\send-post", "\\src\\app\\services" ], "PreviewInSolutionExplorer": false diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite index e94d76ff6f1a46b758c6469f6b62486d05930f87..de4bfe88ec049e89fd13993af3bba85dd9f25aa3 100644 GIT binary patch delta 8655 zcmeG?3vgW3b@%Q2?7qKOtJSWwmbLm@lC`od3t8B*!IF?I$#(p~_@m!iTFLtDihZlE zWv>?-V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OV8eJXVgAiM2GLzMkkd`t6%Ycqt@_oWC`TpG(*KV#HlK zN8wzSVhQ@3kp`k+nmqUkTrqLB8Q}g7S2=9i)neMrX3_<(ng+2HlOvt3QMgW>p47mg z9%fuk#p2Ok;IE@R{j?7T0kC6`^d4*>ot|jW>Y0j-s+mgK^>7FZgY}L9nVWD zu3*~H5h8WBj2cUfJp4W$!f|{rF2?yd+gJsczvV`iQErqNGYprJZfJ&p-^Op?*YR=V zVH`4E#&hvL{4;zf{u6d!geA&@1Q&`U+h@|3d#nN73_W?Aj0b%P?az z)Bd543LMLJZKW8FnHV)OLa{S!V#vfn6StTcq}V-RV!w%fCI%>W^qS~5vByN8iQN<( zT_$##*de3?RlgapWAwUqK(THUSsHP<@yCq2aTPe3(bxp2H?9N}y^SOkaXabM=2jEe znb<;++!rY^qiJrV!^&zC7n)dQ;sT0}O0YEDJ0H;PtpLpM&I8oF<$$8YOLa=hOe{5V zu8DIfI!Y)O%{FnCi8D^ey@jox(@uo8%%{kUmvf@d@ol%?tgS;3x2X z=%*-(TG92W0NpHnzAJxN32oFf_Nv}#r zq=Uwn+Ms$#J*_^c9#n_a^~%l4t9U(Lp*ZBP<E?5+%+EP-Oq?6 z5E)8UcGp%HU(QZ#-{Dv`U&%rPcg}Y66;l-89EBq)pJfR;!=~~>8#1NN&~$z&Y$9~` z8J&Y3zM8#ufA8Fq!&iY`VOTwu_-`M2JcLo+j_TZ5gFGIDCfC6<)Z$f0k$$Y&$DV#yqhcd^7hQjl_be}_{l znq?Xx@2$+7KGWQdsm-{knC=F-d!%;kmx;y7DQ&)w5Sz^nj_NanS3X1cTYEeSg#W YY)HF#Kk3?vcu%T=lZpDZkL-T$|KDt(X#fBK diff --git a/package-lock.json b/package-lock.json index 791181c..bb0f7ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "@angular/compiler": "^14.2.0", "@angular/core": "^14.2.0", "@angular/forms": "^14.2.0", + "@angular/material": "^7.0.0", "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", @@ -349,6 +350,35 @@ "@angular/core": "14.2.6" } }, + "node_modules/@angular/cdk": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-7.0.0.tgz", + "integrity": "sha512-HX+gIJzST/Nu07ASg1XR583KSEmHI6kUbiSBdq0LqF3mIQgId5z3auBqQcXAgvB0Cg29+/38aj31hnoK/LswEQ==", + "peer": true, + "dependencies": { + "tslib": "^1.7.1" + }, + "optionalDependencies": { + "parse5": "^5.0.0" + }, + "peerDependencies": { + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0" + } + }, + "node_modules/@angular/cdk/node_modules/parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "optional": true, + "peer": true + }, + "node_modules/@angular/cdk/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "peer": true + }, "node_modules/@angular/cli": { "version": "14.2.6", "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-14.2.6.tgz", @@ -481,6 +511,25 @@ "rxjs": "^6.5.3 || ^7.4.0" } }, + "node_modules/@angular/material": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-7.0.0.tgz", + "integrity": "sha512-HgHzHWsUvNiSpRmoOJqnH/TVb4Ki7sXxbWuw5OVKOKiBW6Gwvd29+cP4XauzH47wHMyvS9/HH8kj3gC72pLhJQ==", + "dependencies": { + "tslib": "^1.7.1" + }, + "peerDependencies": { + "@angular/animations": ">=7.0.0", + "@angular/cdk": "7.0.0", + "@angular/common": ">=7.0.0", + "@angular/core": ">=7.0.0" + } + }, + "node_modules/@angular/material/node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + }, "node_modules/@angular/platform-browser": { "version": "14.2.6", "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-14.2.6.tgz", @@ -13153,6 +13202,31 @@ "tslib": "^2.3.0" } }, + "@angular/cdk": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-7.0.0.tgz", + "integrity": "sha512-HX+gIJzST/Nu07ASg1XR583KSEmHI6kUbiSBdq0LqF3mIQgId5z3auBqQcXAgvB0Cg29+/38aj31hnoK/LswEQ==", + "peer": true, + "requires": { + "parse5": "^5.0.0", + "tslib": "^1.7.1" + }, + "dependencies": { + "parse5": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/parse5/-/parse5-5.1.1.tgz", + "integrity": "sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==", + "optional": true, + "peer": true + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "peer": true + } + } + }, "@angular/cli": { "version": "14.2.6", "resolved": "https://registry.npmjs.org/@angular/cli/-/cli-14.2.6.tgz", @@ -13231,6 +13305,21 @@ "tslib": "^2.3.0" } }, + "@angular/material": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/@angular/material/-/material-7.0.0.tgz", + "integrity": "sha512-HgHzHWsUvNiSpRmoOJqnH/TVb4Ki7sXxbWuw5OVKOKiBW6Gwvd29+cP4XauzH47wHMyvS9/HH8kj3gC72pLhJQ==", + "requires": { + "tslib": "^1.7.1" + }, + "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + } + } + }, "@angular/platform-browser": { "version": "14.2.6", "resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-14.2.6.tgz", diff --git a/package.json b/package.json index ef32b85..2bd10a0 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@angular/compiler": "^14.2.0", "@angular/core": "^14.2.0", "@angular/forms": "^14.2.0", + "@angular/material": "^7.0.0", "@angular/platform-browser": "^14.2.0", "@angular/platform-browser-dynamic": "^14.2.0", "@angular/router": "^14.2.0", diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts new file mode 100644 index 0000000..d34a5e8 --- /dev/null +++ b/src/app/app-routing.module.ts @@ -0,0 +1,21 @@ +import { NgModule } from '@angular/core'; +import {RouterModule, Routes} from "@angular/router"; +import {HomeComponent} from "./pages/home/home.component"; +import {ThreadsComponent} from "./pages/BoardThreads/threads.component"; +import {BoardsComponent} from "./pages/SingleThread/boards.component"; +import {AboutComponent} from "./pages/about/about.component"; +import {NotFoundComponent} from "./pages/not-found/not-found.component"; + +const appRoutes: Routes = [ + { path: '', component: HomeComponent }, + { path: 'threads', component: ThreadsComponent}, + { path: 'board', component: BoardsComponent }, + { path: 'about', component: AboutComponent }, + { path: '**', component: NotFoundComponent } +] + +@NgModule({ + imports: [RouterModule.forRoot(appRoutes)], + exports: [RouterModule] +}) +export class AppRoutingModule { } diff --git a/src/app/app.component.css b/src/app/app.component.css index 1675c58..6240e0b 100644 --- a/src/app/app.component.css +++ b/src/app/app.component.css @@ -1,4 +1,63 @@ -h1{ - color: red; - font-size: 10rem; + +.main-container { + height: 100%; +} + +.sidenav-content { + + height: 100%; + align-items: center; + justify-content: center; +} + +.sidenav { + padding: 20px; + border: 1px solid rgba(25, 116, 211, 0.5); +} +.navToggle-btn { + height: 40px; + color: #fff; + border-radius: 5px; + padding: 10px 25px; + font-family: 'Lato', sans-serif; + font-weight: 500; + background: transparent; + cursor: pointer; + transition: all 0.3s ease; + position: relative; + display: inline-block; + box-shadow:inset 2px 2px 2px 0px rgba(255,255,255,.5), + 7px 7px 20px 0px rgba(0,0,0,.1), + 4px 4px 5px 0px rgba(0,0,0,.1); + outline: none; +} +.btn-14 { + background: rgb(255,151,0); + border: none; + z-index: 1; +} +.btn-14:after { + position: absolute; + content: ""; + width: 100%; + height: 0; + top: 0; + left: 0; + z-index: -1; + border-radius: 5px; + background-color: #ff0000; + background-image: linear-gradient(315deg, #000000 0%, #ff0000 74%); + box-shadow:inset 2px 2px 2px 0px rgba(255,255,255,.5); + transition: all 0.3s ease; +} +.btn-14:hover { + color: #ffffff; +} +.btn-14:hover:after { + top: auto; + bottom: 0; + height: 100%; +} +.btn-14:active { + top: 2px; } diff --git a/src/app/app.component.html b/src/app/app.component.html index e69de29..d2e585c 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -0,0 +1,15 @@ +
+

Welcome, traveler.

+ + + + + +
+ +
+ +
+
diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 67729d2..f011eac 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,18 +1,19 @@ import { Component } from '@angular/core'; + @Component({ selector: 'app-root', - template: `
-

Welcome, traveler.

- - -
` + templateUrl: `app.component.html`, + styleUrls:['app.component.css'] }) + export class AppComponent { title = 'Nedvach Angular'; + + ngOnInit(): void { + } } + + + + diff --git a/src/app/app.module.ts b/src/app/app.module.ts index c9f72e8..435ee3b 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -1,9 +1,9 @@ import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; -import { Routes, RouterModule } from '@angular/router'; import { HttpClientModule } from '@angular/common/http'; + import { AppComponent } from './app.component'; import { HomeComponent } from './pages/home/home.component'; import { AboutComponent } from './pages/about/about.component'; @@ -15,14 +15,12 @@ import { SendPostComponent } from './pages/send-post/send-post.component'; import { PostComponent } from './pages/SingleThread/post/post.component' import { ThreadsComponent } from './pages/BoardThreads/threads.component'; import { OPComponent } from './pages/BoardThreads/op/op.component'; +import { AppRoutingModule } from './app-routing.module'; +import {MatSidenavModule} from "@angular/material/sidenav"; +import {BrowserAnimationsModule} from "@angular/platform-browser/animations"; +import { NavBarComponent } from './pages/nav-bar/nav-bar.component'; + -const appRoutes: Routes = [ - { path: '', component: HomeComponent }, - { path: 'threads', component: ThreadsComponent}, - { path: 'board', component: BoardsComponent }, - { path: 'about', component: AboutComponent }, - { path: '**', component: NotFoundComponent } -] @NgModule({ declarations: [ @@ -34,13 +32,17 @@ const appRoutes: Routes = [ PostComponent, SendPostComponent, ThreadsComponent, - OPComponent + OPComponent, + NavBarComponent, + ], imports: [ BrowserModule, - RouterModule.forRoot(appRoutes), HttpClientModule, - FormsModule + FormsModule, + AppRoutingModule, + MatSidenavModule, + BrowserAnimationsModule ], providers: [ ApiChatService diff --git a/src/app/models/boards.ts b/src/app/models/boards.ts new file mode 100644 index 0000000..becdad3 --- /dev/null +++ b/src/app/models/boards.ts @@ -0,0 +1,9 @@ +export interface Board { + BoardName: string, + BoardExplainedName: string, + BoardID: number, + ThreadCount: number, + PostCount: number +} + + diff --git a/src/app/pages/about/about.component.ts b/src/app/pages/about/about.component.ts index de35370..3f4af62 100644 --- a/src/app/pages/about/about.component.ts +++ b/src/app/pages/about/about.component.ts @@ -1,6 +1,4 @@ import { Component, OnInit } from '@angular/core'; - // двач лучший двач -import { ApiChatService } from '../../services/api-chat.service'; @Component({ selector: 'app-about', @@ -8,12 +6,9 @@ import { ApiChatService } from '../../services/api-chat.service'; styleUrls: [`./about.component.css`] }) export class AboutComponent implements OnInit { -// это комментарий ngOnInit(): void { - - - console.log('ya tochno ne ta stroka chto budet v drugom commite!'); + console.log('Yeah, you REALLY expect me to push changes without any console debugging?'); } } diff --git a/src/app/pages/home/home.component.html b/src/app/pages/home/home.component.html index 16a058d..ef2973b 100644 --- a/src/app/pages/home/home.component.html +++ b/src/app/pages/home/home.component.html @@ -1 +1 @@ -

home works!

\ No newline at end of file + diff --git a/src/app/pages/home/home.component.ts b/src/app/pages/home/home.component.ts index fe46403..912dbc4 100644 --- a/src/app/pages/home/home.component.ts +++ b/src/app/pages/home/home.component.ts @@ -2,11 +2,11 @@ import { Component, OnInit } from '@angular/core'; @Component({ selector: 'app-home', - template: `` - + templateUrl: `home.component.html`, + }) export class HomeComponent implements OnInit { - title = 'Home компонент'; + title = 'Напоминание'; diff --git a/src/app/pages/nav-bar/nav-bar.component.css b/src/app/pages/nav-bar/nav-bar.component.css new file mode 100644 index 0000000..e69de29 diff --git a/src/app/pages/nav-bar/nav-bar.component.html b/src/app/pages/nav-bar/nav-bar.component.html new file mode 100644 index 0000000..bc235da --- /dev/null +++ b/src/app/pages/nav-bar/nav-bar.component.html @@ -0,0 +1,10 @@ + diff --git a/src/app/pages/nav-bar/nav-bar.component.spec.ts b/src/app/pages/nav-bar/nav-bar.component.spec.ts new file mode 100644 index 0000000..1cefcdb --- /dev/null +++ b/src/app/pages/nav-bar/nav-bar.component.spec.ts @@ -0,0 +1,23 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { NavBarComponent } from './nav-bar.component'; + +describe('NavBarComponent', () => { + let component: NavBarComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ NavBarComponent ] + }) + .compileComponents(); + + fixture = TestBed.createComponent(NavBarComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/pages/nav-bar/nav-bar.component.ts b/src/app/pages/nav-bar/nav-bar.component.ts new file mode 100644 index 0000000..41af055 --- /dev/null +++ b/src/app/pages/nav-bar/nav-bar.component.ts @@ -0,0 +1,21 @@ +import { Component, OnInit } from '@angular/core'; +import {Board} from "../../models/boards"; +import {ApiChatService} from "../../services/api-chat.service"; + +@Component({ + selector: 'app-nav-bar', + templateUrl: './nav-bar.component.html', + styleUrls: ['./nav-bar.component.css'] +}) +export class NavBarComponent implements OnInit { + boardsToList: Board[]; + + + constructor(public apiChatService: ApiChatService) { + } + + ngOnInit(): void { + this.boardsToList = this.apiChatService.getBoards() + } + +} diff --git a/src/app/services/api-chat.service.ts b/src/app/services/api-chat.service.ts index 010ac5a..02ac9b3 100644 --- a/src/app/services/api-chat.service.ts +++ b/src/app/services/api-chat.service.ts @@ -2,6 +2,7 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { SinglePost } from '../models/post'; +import {Board} from "../models/boards"; import * as globals from '../const/api'; @@ -12,9 +13,9 @@ export class ApiChatService { constructor(private http: HttpClient) { } - getPosts(boardName:string, threadID: number): Observable { + getPosts(boardName: string, threadID: number): Observable { //console.log("Получаю посты и картинки"); - return this.http.get(globals.api_endpoint +'List/', {params:{board: boardName , thread: threadID}}) ; + return this.http.get(globals.api_endpoint + 'List/', {params: {board: boardName, thread: threadID}}); } sendPostToApi(text: string, imgUrl: string[], threadId: number,) { @@ -27,19 +28,33 @@ export class ApiChatService { ImgURL: imgUrl, Thread_Id: threadId } - return this.http.post( globals.api_endpoint +'PostTo', postToSend) + return this.http.post(globals.api_endpoint + 'PostTo', postToSend) } - sendpic(picToSend: File):Observable { + sendpic(picToSend: File): Observable { const PostPicture = new FormData(); PostPicture.append('PostPicture', picToSend); - return this.http.post(globals.api_endpoint +'UploadPic', PostPicture) + return this.http.post(globals.api_endpoint + 'UploadPic', PostPicture) } - getThreads(boardName:string): Observable { + getThreads(boardName: string): Observable { //console.log("Получаю посты и картинки"); - return this.http.get(globals.api_endpoint +'Threads/', {params:{board: boardName}}) ; + return this.http.get(globals.api_endpoint + 'Threads/', {params: {board: boardName}}); } - } + sampleBoardList = [ +{ + BoardName: 'b', + BoardExplainedName: 'Всего понемногу', + BoardID: 228, + ThreadCount: 4, + PostCount: 4445 +} +] + + getBoards(): Board[] { + return this.sampleBoardList; + //return this.http.get(globals.api_endpoint + 'Boards/'); + } +}