Skip to content

Commit 40416ee

Browse files
committed
some changes for pro version
1 parent dc24c69 commit 40416ee

6 files changed

Lines changed: 121 additions & 4 deletions

File tree

ui/src/app/app.component.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ $noise: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyA
8282

8383
.dropdown-section {
8484
width: 100%;
85+
box-sizing: border-box;
8586
position: absolute;
8687
z-index: 4;
8788
transform-origin: right top;

ui/src/app/app.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ export class AppComponent implements OnInit, AfterContentInit {
3939
public analytics: AnalyticsService,
4040
public app: ApplicationService,
4141
public settings: SettingsService
42-
) { }
42+
) {
43+
this.app.ref = this
44+
}
4345

4446
async ngOnInit () {
4547
await this.sync()

ui/src/app/app.module.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ import { ConfirmDialogComponent } from './components/confirm-dialog/confirm-dial
7676
import { EqualizerPresetsComponent } from './sections/effects/equalizers/presets/equalizer-presets.component'
7777
import { PromptDialogComponent } from './components/prompt-dialog/prompt-dialog.component'
7878
import { OptionsDialogComponent } from './components/options-dialog/options-dialog.component'
79+
import { MatSnackBarModule } from '@angular/material/snack-bar'
7980

8081
@NgModule({
8182
imports: [
@@ -85,6 +86,7 @@ import { OptionsDialogComponent } from './components/options-dialog/options-dial
8586
PipesModule,
8687
EqmacComponentsModule,
8788
MatDialogModule,
89+
MatSnackBarModule,
8890
BrowserModule
8991
],
9092
entryComponents: [

ui/src/app/services/app.service.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { Injectable } from '@angular/core'
2+
import { AppComponent } from '../app.component'
23
import { DataService } from './data.service'
34

45
export interface MacInfo {
@@ -11,6 +12,8 @@ export interface MacInfo {
1112
providedIn: 'root'
1213
})
1314
export class ApplicationService extends DataService {
15+
ref?: AppComponent
16+
1417
getMacInfo (): Promise<MacInfo> {
1518
return this.request({ method: 'GET', endpoint: '/info' })
1619
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import { Injectable } from '@angular/core'
2+
import { MatSnackBar } from '@angular/material/snack-bar'
3+
4+
@Injectable({
5+
providedIn: 'root'
6+
})
7+
export class ToastService {
8+
constructor (private readonly snackBar: MatSnackBar) {}
9+
10+
open ({ message, action }: {
11+
message: string
12+
action?: string
13+
}) {
14+
action = action || 'Hide'
15+
const duration = 1000
16+
const toast = this.snackBar.open(message, action, {
17+
horizontalPosition: 'center',
18+
verticalPosition: 'top',
19+
duration: 10000,
20+
panelClass: [ 'dark-bg', 'light' ]
21+
})
22+
setTimeout(() => {
23+
toast?.dismiss()
24+
}, duration)
25+
}
26+
}

ui/src/app/styles/_colors.scss

Lines changed: 86 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,89 @@
11
$accent: #4f8d71;
2-
$warning: #e80415;
2+
::ng-deep .accent {
3+
color: $accent !important;
4+
}
5+
6+
::ng-deep .accent-bg {
7+
background-color: $accent !important;
8+
}
9+
10+
$accent-light: #4DAD82;
11+
::ng-deep .accent-light {
12+
color: $accent-light !important;
13+
}
14+
15+
::ng-deep .accent-light-bg {
16+
background-color: $accent-light !important;
17+
}
18+
19+
$warning: #eb3f42;
20+
::ng-deep .warning {
21+
color: $warning !important;
22+
}
23+
24+
::ng-deep .warning-bg {
25+
background-color: $warning !important;
26+
}
27+
328
$gradient-start: #5a5b5f;
4-
$gradient-end: #2c2c2e;
29+
::ng-deep .gradient-start {
30+
color: $gradient-start !important;
31+
}
32+
33+
::ng-deep .gradient-start-bg {
34+
background-color: $gradient-start !important;
35+
}
36+
37+
$gradient-end: rgb(44, 44, 46);
38+
::ng-deep .gradient-end {
39+
color: $gradient-end !important;
40+
}
41+
42+
::ng-deep .gradient-end-bg {
43+
background-color: $gradient-end !important;
44+
}
45+
46+
$icon-gradient-start: #05FF71;
47+
::ng-deep .icon-gradient-start {
48+
color: $icon-gradient-start !important;
49+
}
50+
51+
::ng-deep .icon-gradient-start-bg {
52+
background-color: $icon-gradient-start !important;
53+
}
54+
55+
$icon-gradient-middle: #03F193;
56+
::ng-deep .icon-gradient-middle {
57+
color: $icon-gradient-middle !important;
58+
}
59+
60+
::ng-deep .icon-gradient-middle-bg {
61+
background-color: $icon-gradient-middle !important;
62+
}
63+
64+
$icon-gradient-end: #04E2B5;
65+
::ng-deep .icon-gradient-end {
66+
color: $icon-gradient-end !important;
67+
}
68+
69+
::ng-deep .icon-gradient-end-bg {
70+
background-color: $icon-gradient-end !important;
71+
}
72+
573
$light: #c9cdd0;
6-
$dark: #16191c;
74+
::ng-deep .light {
75+
color: $light !important;
76+
}
77+
78+
::ng-deep .light-bg {
79+
background-color: $light !important;
80+
}
81+
82+
$dark: rgb(22, 25, 28);
83+
::ng-deep .dark {
84+
color: $dark !important;
85+
}
86+
87+
::ng-deep .dark-bg {
88+
background-color: $dark !important;
89+
}

0 commit comments

Comments
 (0)