Skip to content

Commit 943d4ec

Browse files
committed
Added command line and fixed widget and comment service
1 parent df5ad1e commit 943d4ec

File tree

90 files changed

+7864
-462
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+7864
-462
lines changed

package-lock.json

Lines changed: 14 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"clipboard": "^2.0.10",
4646
"firebase": "^9.6.8",
4747
"g": "^2.0.1",
48+
"ng-keyboard-shortcuts": "^10.1.17",
4849
"ngx-router-animations": "^13.0.0",
4950
"ngx-useful-swiper": "^10.0.1",
5051
"prismjs": "^1.27.0",

src/app/addons/chat/chat-box/chat-box.component.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ div.sender{
33
height:auto;
44
position: relative;
55
float: left;
6-
background-color: var(--color-tertiary);
6+
background-color: rgb(var(--color-tertiary));
77
border-radius: 10px 10px 10px 0px;
88
padding:10px;
99
margin: 10px;
@@ -23,7 +23,7 @@ div.receive{
2323
height:auto;
2424
position: relative;
2525
float: right;
26-
background-color: var(--color-primary);
26+
background-color: rgb(var(--color-primary));
2727
border-radius: 10px 10px 0px 10px;
2828
padding:10px;
2929
margin: 10px;

src/app/addons/chat/chat.component.scss

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ div.chatContainer{
2222
right: 50px;
2323
width: 400px;
2424
height: 500px;
25-
background-color: var(--color-secondary);
25+
background-color: rgb(var(--color-secondary));
2626
z-index: 99999;
2727
border-radius: 7px;
2828
box-shadow: -10px 10px 20px rgba(0,0,0,0.5);
@@ -34,7 +34,7 @@ div.chatContainer{
3434
// width: 100%;
3535
height: var(--headerHeight);
3636
border-radius: 7px 7px 0px 0px;
37-
background-color: var(--color-main);
37+
background-color: rgb(var(--color-main));
3838
display: flex;
3939
justify-content: space-between;
4040
align-items: center;
@@ -44,7 +44,7 @@ div.chatContainer{
4444
flex: 3;
4545
margin-left: 10px;
4646
font-size: 20px;
47-
color: var(--color-text);
47+
color: rgb(var(--color-text));
4848
}
4949
}
5050
div.chatBody{
@@ -57,7 +57,7 @@ div.chatContainer{
5757
left:0px;
5858
height: var(--footerHeight);
5959
border-radius: 0px 0px 7px 7px;
60-
background-color: var(--color-main);
60+
background-color: rgb(var(--color-main));
6161
display: flex;
6262
justify-content: space-between;
6363
align-items: center;
@@ -71,19 +71,19 @@ div.chatContainer{
7171
border: none;
7272
flex: 2;
7373
padding:0px;
74-
color:var(--color-text);
74+
color:rgb(var(--color-text));
7575
height:calc(var(--footerHeight)-10px);
7676
width:100%;
7777
font-size: 18px;
78-
background: var(--color-main);
78+
background: rgb(var(--color-main));
7979
border-bottom: 2px white solid;
8080
}
8181
button{
8282
outline: none;
8383
border: none;
8484
margin: 0px 20px 0px 20px;
85-
background-color: var(--color-main);
86-
color: var(--color-text);
85+
background-color: rgb(var(--color-main));
86+
color: rgb(var(--color-text));
8787
font-size: 20px;
8888
border-radius: 5px;
8989
padding: 5px;
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { NgModule } from '@angular/core';
2+
import { RouterModule, Routes } from '@angular/router';
3+
import { CommandLineComponent } from './command-line.component';
4+
5+
const routes: Routes = [{ path: '', component: CommandLineComponent }];
6+
7+
@NgModule({
8+
imports: [RouterModule.forChild(routes)],
9+
exports: [RouterModule]
10+
})
11+
export class CommandLineRoutingModule { }
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<div class="cli">
2+
<form [formGroup]="searchForm" class="bar">
3+
<i class="ri-arrow-right-s-line"></i>
4+
<input appAutofocus type="text" formControlName="searchText" (change)="showResults($event)" #input>
5+
</form>
6+
<ul #commandsList *ngIf="filteredCommands.length>0">
7+
<button #result (click)="runCommand(command.function)" *ngFor="let command of filteredCommands">
8+
<h6>{{command.title}}</h6>
9+
<p>{{command.description}}</p>
10+
</button>
11+
</ul>
12+
</div>
13+
<!-- <div class="overlay"></div> -->
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
@keyframes popIn {
2+
from{
3+
opacity: 0;
4+
}
5+
to{
6+
opacity: 1;
7+
}
8+
}
9+
div.cli{
10+
animation: popIn 300ms ease-in forwards;
11+
z-index: 100000;
12+
top: 40%;
13+
left: 50%;
14+
width:400px;
15+
height:fit-content;
16+
display: flex;
17+
justify-content: center;
18+
align-items: center;
19+
position: fixed;
20+
transform: translate(-50%,-50%);
21+
flex-direction: column;
22+
form.bar{
23+
display: flex;
24+
align-items: center;
25+
// position: absolute;
26+
width: 400px;
27+
height: 60px;
28+
padding: 5px;
29+
border-radius: 7px;
30+
background: rgb(var(--color-tertiary));
31+
box-shadow: 5px 3px 20px rgba(0,0,0,0.4);
32+
i{
33+
font-size: 30px;
34+
}
35+
input{
36+
padding:5px;
37+
color:rgb(var(--color-text));
38+
font-size: 20px;
39+
height: 100%;
40+
flex: 2;
41+
border: none;
42+
outline: none;
43+
background: rgb(var(--color-tertiary));
44+
}
45+
}
46+
ul{
47+
display: block;
48+
width: 400px;
49+
max-height:240px;
50+
overflow-y: auto;
51+
scroll-snap-type: y mandatory;
52+
overflow-x: hidden;
53+
margin-top: 20px;
54+
padding:5px;
55+
border-radius: 7px;
56+
background: rgb(var(--color-tertiary));
57+
box-shadow: 5px 3px 20px rgba(0,0,0,0.4);
58+
// left: 50%;
59+
// position: fixed;
60+
// transform: translateX(-50%);
61+
button{
62+
scroll-snap-align: start;
63+
text-align: start;
64+
width:400px;
65+
height:60px;
66+
border: none;
67+
outline: none;
68+
background: rgb(var(--color-tertiary));
69+
padding: 10px;
70+
color: rgb(var(--color-text));
71+
font-size: 20px;
72+
cursor: pointer;
73+
&:focus{
74+
background: rgb(var(--color-primary));
75+
}
76+
h6{
77+
font-size: 17px;
78+
color:rgb(var(--color-main-main));
79+
margin: 0px;
80+
}
81+
p{
82+
font-size: 12px;
83+
color: rgb(var(--color-text-main));
84+
}
85+
}
86+
.selected{
87+
background: rgb(var(--color-primary));
88+
// color: rgb(var(--color-tertiary));
89+
}
90+
}
91+
}
92+
div.overlay{
93+
position: fixed;
94+
top: 0;
95+
left: 0;
96+
width: 100vw;
97+
height: 100vh;
98+
filter: blur(10px);
99+
background: rgba(0,0,0,0.5);
100+
backdrop-filter: blur(10px);
101+
z-index: 99999;
102+
}

src/app/sidebar/widget/email-subscribe/email-subscribe.component.spec.ts renamed to src/app/addons/command-line/command-line.component.spec.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
import { ComponentFixture, TestBed } from '@angular/core/testing';
22

3-
import { EmailSubscribeComponent } from './email-subscribe.component';
3+
import { CommandLineComponent } from './command-line.component';
44

5-
describe('EmailSubscribeComponent', () => {
6-
let component: EmailSubscribeComponent;
7-
let fixture: ComponentFixture<EmailSubscribeComponent>;
5+
describe('CommandLineComponent', () => {
6+
let component: CommandLineComponent;
7+
let fixture: ComponentFixture<CommandLineComponent>;
88

99
beforeEach(async () => {
1010
await TestBed.configureTestingModule({
11-
declarations: [ EmailSubscribeComponent ]
11+
declarations: [ CommandLineComponent ]
1212
})
1313
.compileComponents();
1414
});
1515

1616
beforeEach(() => {
17-
fixture = TestBed.createComponent(EmailSubscribeComponent);
17+
fixture = TestBed.createComponent(CommandLineComponent);
1818
component = fixture.componentInstance;
1919
fixture.detectChanges();
2020
});

0 commit comments

Comments
 (0)