Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
864
Issues
864
List
Boards
Labels
Service Desk
Milestones
Merge Requests
47
Merge Requests
47
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
List
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds Frontend
Compare Revisions
c3cc56c31b10552cc0cc7f13f8b201c9fa643c6e...7be57ec085edeb753c7dc6395d783ccd4f661697
Source
7be57ec085edeb753c7dc6395d783ccd4f661697
Select Git revision
...
Target
c3cc56c31b10552cc0cc7f13f8b201c9fa643c6e
Select Git revision
Compare
Commits (2)
(feat): Color scheme settings
· 091acaf8
Emiliano Balbuena
authored
22 minutes ago
091acaf8
(feat): Apply dark or light color scheme, regardless of the global
· 7be57ec0
Emiliano Balbuena
authored
4 minutes ago
setting
7be57ec0
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
46 additions
and
12 deletions
+46
-12
channel.component.ts
src/app/modules/pro/channel/channel.component.ts
+10
-1
pro.service.ts
src/app/modules/pro/pro.service.ts
+17
-1
settings.component.html
src/app/modules/pro/settings/settings.component.html
+11
-1
settings.component.scss
src/app/modules/pro/settings/settings.component.scss
+6
-0
settings.component.ts
src/app/modules/pro/settings/settings.component.ts
+0
-8
themes.scss
src/stylesheets/themes.scss
+2
-1
No files found.
src/app/modules/pro/channel/channel.component.ts
View file @
7be57ec0
...
...
@@ -3,7 +3,8 @@ import {
ChangeDetectorRef
,
Component
,
ElementRef
,
HostBinding
,
HostListener
,
HostBinding
,
HostListener
,
OnDestroy
,
OnInit
}
from
'
@angular/core
'
;
...
...
@@ -164,6 +165,14 @@ export class ProChannelComponent implements OnInit, OnDestroy {
return
`url(
${
this
.
channel
.
pro_settings
.
background_image
}
)`
;
}
@
HostBinding
(
'
class
'
)
get
cssColorSchemeOverride
()
{
if
(
!
this
.
channel
)
{
return
''
;
}
return
`m-theme--wrapper__
${
this
.
channel
.
pro_settings
.
scheme
||
'
light
'
}
`
;
}
@
HostListener
(
'
window:resize
'
)
onResize
()
{
this
.
collapseNavItems
=
window
.
innerWidth
<=
992
?
true
:
false
;
}
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/pro.service.ts
View file @
7be57ec0
...
...
@@ -29,7 +29,23 @@ export class ProService {
}
async
get
():
Promise
<
{
isActive
,
settings
}
>
{
return
await
this
.
client
.
get
(
'
api/v2/pro/settings
'
,
{},
{
cache
:
false
})
as
any
;
const
{
isActive
,
settings
}
=
await
this
.
client
.
get
(
'
api/v2/pro/settings
'
,
{},
{
cache
:
false
})
as
any
;
if
(
settings
)
{
if
(
settings
.
tag_list
)
{
settings
.
tag_list
=
settings
.
tag_list
.
map
(({
tag
,
label
})
=>
{
const
formattedTag
=
`#
${
tag
}
`
;
return
{
tag
:
formattedTag
,
label
};
});
}
if
(
!
settings
.
scheme
)
{
settings
.
scheme
=
'
light
'
;
}
}
return
{
isActive
,
settings
};
}
async
set
(
settings
):
Promise
<
boolean
>
{
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/settings/settings.component.html
View file @
7be57ec0
...
...
@@ -97,7 +97,7 @@
<ng-template
ngSwitchCase=
"theme"
>
<p
class=
"m-pro--settings--note"
i18n
>
Set up your color
s schema
below.
Set up your color
scheme
below.
</p>
<div
class=
"m-pro--settings--field"
>
...
...
@@ -115,6 +115,16 @@
<input
type=
"color"
id=
"plain_background_color"
name=
"plain_background_color"
[(ngModel)]=
"settings.plain_background_color"
>
</div>
<div
class=
"m-pro--settings--field"
>
<label
i18n
>
Color Schema
</label>
<input
type=
"radio"
id=
"scheme_light"
name=
"scheme"
value=
"light"
[(ngModel)]=
"settings.scheme"
>
<label
for=
"scheme_light"
class=
"m-pro--settings--inline-label"
>
Light
</label>
<input
type=
"radio"
id=
"scheme_dark"
name=
"scheme"
value=
"dark"
[(ngModel)]=
"settings.scheme"
>
<label
for=
"scheme_dark"
class=
"m-pro--settings--inline-label"
>
Dark
</label>
</div>
<div
class=
"m-pro--settings--field"
>
<label
for=
"logo_guid"
i18n
>
Logo Asset GUID
</label>
<input
type=
"text"
id=
"logo_guid"
name=
"logo_guid"
[(ngModel)]=
"settings.logo_guid"
>
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/settings/settings.component.scss
View file @
7be57ec0
...
...
@@ -38,6 +38,12 @@
@include
m-theme
()
{
color
:
themed
(
$m-grey-800
);
}
&
.m-pro--settings--inline-label
{
display
:
inline-block
;
padding
:
0
;
margin
:
0
0
.35em
;
}
}
input
[
type
=
text
],
...
...
This diff is collapsed.
Click to expand it.
src/app/modules/pro/settings/settings.component.ts
View file @
7be57ec0
...
...
@@ -45,14 +45,6 @@ export class ProSettingsComponent implements OnInit {
this
.
settings
=
settings
;
if
(
this
.
settings
&&
this
.
settings
.
tag_list
)
{
this
.
settings
.
tag_list
=
this
.
settings
.
tag_list
.
map
(({
tag
,
label
})
=>
{
const
formattedTag
=
`#
${
tag
}
`
;
return
{
tag
:
formattedTag
,
label
};
});
}
this
.
title
.
setTitle
(
'
Pro Settings
'
);
this
.
inProgress
=
false
;
...
...
This diff is collapsed.
Click to expand it.
src/stylesheets/themes.scss
View file @
7be57ec0
...
...
@@ -3,7 +3,8 @@
// Colors change when .theme__light/.theme__dark classes are toggled on body tag
@mixin
m-theme
()
{
@each
$theme
,
$colors
in
$themes
{
body
.m-theme__
#{
$theme
}
&
{
body
.m-theme__
#{
$theme
}
&
,
body
.m-theme--wrapper__
#{
$theme
}
&
{
$theme-map
:
()
!
global
;
@each
$color-name
,
$color
in
$colors
{
$value
:
map-get
(
map-get
(
$themes
,
$theme
)
,
'
#{
$color-name
}
'
);
...
...
This diff is collapsed.
Click to expand it.