Skip to content

Commit a7a6685

Browse files
author
Di Wang
committed
settings page - add dots
1 parent e6c1042 commit a7a6685

File tree

6 files changed

+75
-7
lines changed

6 files changed

+75
-7
lines changed

src/app/app.module.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import { SettingsComponent } from './dashboard/settings/settings.component';
2828
import { PriceTableComponent } from './dashboard/component/pricetable/pricetable.component';
2929
import { PanelsComponent } from './dashboard/component/panels/panels.component';
3030

31-
import { SidebarBgServiceService } from './services/sidebar-bg-service.service';
31+
import { SettingsService } from './services/settings.service';
3232

3333
@NgModule({
3434
declarations: [
@@ -65,7 +65,7 @@ import { SidebarBgServiceService } from './services/sidebar-bg-service.service';
6565
MdMenuModule,
6666
MdCheckboxModule
6767
],
68-
providers: [SidebarBgServiceService],
68+
providers: [SettingsService],
6969
bootstrap: [AppComponent]
7070
})
7171
export class AppModule { }

src/app/dashboard/root/root.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, OnInit, OnDestroy } from '@angular/core';
2-
import { SidebarBgServiceService } from '../../services/sidebar-bg-service.service';
2+
import { SettingsService } from '../../services/settings.service';
33

44
@Component({
55
selector: 'app-root',
@@ -8,7 +8,7 @@ import { SidebarBgServiceService } from '../../services/sidebar-bg-service.servi
88
})
99
export class RootComponent implements OnInit, OnDestroy {
1010
public id: number;
11-
constructor(public sidebarService: SidebarBgServiceService) {
11+
constructor(public sidebarService: SettingsService) {
1212
this.id = sidebarService.getSidebarIndex();
1313
}
1414

src/app/dashboard/settings/settings.component.css

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,48 @@
2828
.sidebar-btn .active{
2929
border-color: #00bbff;
3030
}
31+
32+
.dot-row{
33+
display: flex;
34+
justify-content: center;
35+
margin: 20px 0 40px 0;
36+
}
37+
38+
.dot{
39+
border-radius: 50%;
40+
width: 30px;
41+
height: 30px;
42+
margin: 0 10px;
43+
}
44+
45+
.purple{
46+
background-color: #9c27b0;
47+
}
48+
49+
.blue{
50+
background-color: #00bcd4;
51+
}
52+
53+
.green{
54+
background-color: #4caf50;
55+
}
56+
57+
.orange{
58+
background-color: #ff9800;
59+
}
60+
61+
.red{
62+
background-color: #f44336;
63+
}
64+
65+
.white{
66+
background-color: rgba(200, 200, 200, 0.2);
67+
}
68+
69+
.rose{
70+
background-color: #e91e63;
71+
}
72+
73+
.black{
74+
background-color: #000;
75+
}

src/app/dashboard/settings/settings.component.html

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,29 @@
22
<app-navbar title="Settings"></app-navbar>
33
<div class="row" style="margin-top: 30px">
44
<div class="col-md-10 col-md-offset-1">
5+
<h4 class="text-center text-uppercase">Sidebar Filters</h4>
6+
<div class="col-md-12 dot-row">
7+
<div class="dot purple"></div>
8+
<div class="dot blue"></div>
9+
<div class="dot green"></div>
10+
<div class="dot orange"></div>
11+
<div class="dot red"></div>
12+
<div class="dot white"></div>
13+
<div class="dot rose"></div>
14+
</div>
15+
</div>
16+
17+
<div class="col-md-10 col-md-offset-1">
18+
<h4 class="text-center text-uppercase">Sidebar Background</h4>
19+
<div class="col-md-12 dot-row">
20+
<div class="dot red"></div>
21+
<div class="dot white"></div>
22+
<div class="dot black"></div>
23+
</div>
24+
</div>
25+
26+
<div class="col-md-10 col-md-offset-1">
27+
<h4 class="text-uppercase text-center">SideBar Background Image</h4>
528
<div class="col-md-3 col-sm-3 col-xs-6">
629
<button class="sidebar-btn" (click)="bgChooseClick(1)"><img src="../../../assets/img/sidebar-1.jpg" alt="sidebar-bg" class="sidebar-bg"/></button>
730
</div>

src/app/dashboard/settings/settings.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Component, OnInit } from '@angular/core';
2-
import { SidebarBgServiceService } from '../../services/sidebar-bg-service.service';
2+
import { SettingsService } from '../../services/settings.service';
33

44
@Component({
55
selector: 'app-settings',
@@ -8,7 +8,7 @@ import { SidebarBgServiceService } from '../../services/sidebar-bg-service.servi
88
})
99
export class SettingsComponent implements OnInit {
1010

11-
constructor(public sidebarService: SidebarBgServiceService) { }
11+
constructor(public sidebarService: SettingsService) { }
1212

1313
ngOnInit() {
1414
const defaultId = this.sidebarService.getSidebarIndex();

src/app/services/sidebar-bg-service.service.ts renamed to src/app/services/settings.service.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { Injectable, EventEmitter } from '@angular/core';
22

33
@Injectable()
4-
export class SidebarBgServiceService {
4+
export class SettingsService {
55
public sidebarIndex = 1;
66
public sidebarIndexUpdate: EventEmitter<number> = new EventEmitter();
77

0 commit comments

Comments
 (0)