Skip to content
Next
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Minds Backend - Engine
Project
Project
Details
Activity
Releases
Dependency List
Cycle Analytics
Insights
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
185
Issues
185
List
Boards
Labels
Service Desk
Milestones
Merge Requests
32
Merge Requests
32
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 Backend - Engine
Commits
57c29d90
Commit
57c29d90
authored
1 day ago
by
Emiliano Balbuena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fix): Pro settings and style
parent
78f731c4
epic/minds-pro
1 merge request
!281
WIP: (feat): Minds Pro
Pipeline
#73229516
failed with stages
in 14 minutes and 20 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
+19
-14
Manager.php
Core/Pro/Manager.php
+14
-14
Settings.php
Core/Pro/Settings.php
+5
-0
No files found.
Core/Pro/Manager.php
View file @
57c29d90
...
...
@@ -139,11 +139,11 @@ class Manager
}
/**
* @param array $
setting
s
* @param array $
value
s
* @return bool
* @throws Exception
*/
public
function
set
(
array
$
setting
s
=
[])
public
function
set
(
array
$
value
s
=
[])
{
if
(
!
$this
->
user
)
{
throw
new
Exception
(
'Invalid user'
);
...
...
@@ -154,46 +154,46 @@ class Manager
$settings
->
setUserGuid
(
$this
->
user
->
guid
);
if
(
isset
(
$
setting
s
[
'domain'
]))
{
if
(
isset
(
$
value
s
[
'domain'
]))
{
// TODO: Validate!
$settings
->
setDomain
(
$
setting
s
[
'domain'
]);
->
setDomain
(
$
value
s
[
'domain'
]);
}
if
(
isset
(
$
setting
s
[
'title'
]))
{
if
(
isset
(
$
value
s
[
'title'
]))
{
// TODO: Validate!
$settings
->
setTitle
(
$
setting
s
[
'title'
]);
->
setTitle
(
$
value
s
[
'title'
]);
}
if
(
isset
(
$
setting
s
[
'headline'
]))
{
if
(
isset
(
$
value
s
[
'headline'
]))
{
// TODO: Validate!
$settings
->
setHeadline
(
$
setting
s
[
'headline'
]);
->
setHeadline
(
$
value
s
[
'headline'
]);
}
if
(
isset
(
$
setting
s
[
'text_color'
]))
{
if
(
isset
(
$
value
s
[
'text_color'
]))
{
// TODO: Validate!
$settings
->
setTextColor
(
$
setting
s
[
'text_color'
]);
->
setTextColor
(
$
value
s
[
'text_color'
]);
}
if
(
isset
(
$
setting
s
[
'primary_color'
]))
{
if
(
isset
(
$
value
s
[
'primary_color'
]))
{
// TODO: Validate!
$settings
->
setPrimaryColor
(
$
setting
s
[
'primary_color'
]);
->
setPrimaryColor
(
$
value
s
[
'primary_color'
]);
}
if
(
isset
(
$
setting
s
[
'plain_background_color'
]))
{
if
(
isset
(
$
value
s
[
'plain_background_color'
]))
{
// TODO: Validate!
$settings
->
setPlainBackgroundColor
(
$
setting
s
[
'plain_background_color'
]);
->
setPlainBackgroundColor
(
$
value
s
[
'plain_background_color'
]);
}
return
$this
->
repository
->
update
(
$settings
);
...
...
This diff is collapsed.
Click to expand it.
Core/Pro/Settings.php
View file @
57c29d90
...
...
@@ -77,6 +77,11 @@ class Settings implements JsonSerializable
'plain_background_color'
=>
$this
->
plainBackgroundColor
,
'background_image'
=>
$this
->
backgroundImage
,
'logo_image'
=>
$this
->
logoImage
,
'styles'
=>
[
'text_color'
=>
$this
->
textColor
?:
'#000000'
,
'primary_color'
=>
$this
->
primaryColor
?:
'#4690df'
,
'plain_background_color'
=>
$this
->
plainBackgroundColor
?:
'#ffffff'
,
],
];
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment