Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
Minds Backend - Engine
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
Minds
Minds Backend - Engine
Compare revisions
245d49e65c9de0295d871e4066cfc438ec969aa5 to 05d2acc98a8d07d1a21feacc0fe39e4892d98000
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
minds/engine
Select target project
No results found
05d2acc98a8d07d1a21feacc0fe39e4892d98000
Select Git revision
Swap
Target
minds/engine
Select target project
omadrid/engine
javanick/engine
minds/engine
joe59/engine
eiennohi/engine
edgebal/engine
msantang78/engine
maruthi-adithya/engine
duyquoc/engine
benhayward.ben/engine
rlperez/engine
priestd09/engine
dknunn/engine
ascenderking/engine
catastrop/engine
jim-toth/engine
project_connection/engine
manishoo/engine
murbo98/engine
namesty/engine
Moikapy/engine
bedriguler/engine
CodingNagger/engine
jun784/engine
alexgleason/engine
gigasim97/engine
auxchar/engine
pestixaba/engine
m994/engine
webprodev/minds_engine
fabiolalombardim/engine
zackwy/engine
linleyj7/engine
fiatjaf/minds-engine
ppitestsblishaokai/engine
VARUN-KUSH/engine
brainr386/engine
th2tran/engine
38 results
245d49e65c9de0295d871e4066cfc438ec969aa5
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (2)
(feat): Tag list for Pro
· 3c6712f0
Emiliano Balbuena
authored
5 years ago
3c6712f0
(feat): Scheme settings
· 05d2acc9
Emiliano Balbuena
authored
5 years ago
05d2acc9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Core/Pro/Manager.php
+22
-0
22 additions, 0 deletions
Core/Pro/Manager.php
Core/Pro/Repository.php
+6
-1
6 additions, 1 deletion
Core/Pro/Repository.php
Core/Pro/Settings.php
+34
-9
34 additions, 9 deletions
Core/Pro/Settings.php
with
62 additions
and
10 deletions
Core/Pro/Manager.php
View file @
05d2acc9
...
...
@@ -224,6 +224,28 @@ class Manager
->
setFooterLinks
(
array_values
(
$footerLinks
));
}
if
(
isset
(
$values
[
'tag_list'
])
&&
is_array
(
$values
[
'tag_list'
]))
{
$tagList
=
array_map
(
function
(
$item
)
{
$tag
=
trim
(
$item
[
'tag'
],
"#
\t\n\r
"
);
$label
=
(
$item
[
'label'
]
??
null
)
?:
"#
{
$item
[
'tag'
]
}
"
;
return
compact
(
'label'
,
'tag'
);
},
array_filter
(
$values
[
'tag_list'
],
function
(
$item
)
{
return
$item
&&
$item
[
'tag'
];
}));
$settings
->
setTagList
(
array_values
(
$tagList
));
}
if
(
isset
(
$values
[
'scheme'
]))
{
// TODO: Validate!
$settings
->
setScheme
(
$values
[
'scheme'
]);
}
return
$this
->
repository
->
update
(
$settings
);
}
}
This diff is collapsed.
Click to expand it.
Core/Pro/Repository.php
View file @
05d2acc9
...
...
@@ -95,7 +95,10 @@ class Repository
->
setPlainBackgroundColor
(
$data
[
'plain_background_color'
]
??
''
)
->
setLogoGuid
(
$data
[
'logo_guid'
]
??
''
)
->
setFooterText
(
$data
[
'footer_text'
]
??
''
)
->
setFooterLinks
(
$data
[
'footer_links'
]
??
[]);
->
setFooterLinks
(
$data
[
'footer_links'
]
??
[])
->
setTagList
(
$data
[
'tag_list'
]
??
[])
->
setScheme
(
$data
[
'scheme'
]
??
''
)
;
$response
[]
=
$settings
;
}
...
...
@@ -138,6 +141,8 @@ class Repository
'logo_guid'
=>
$settings
->
getLogoGuid
(),
'footer_text'
=>
$settings
->
getFooterText
(),
'footer_links'
=>
$settings
->
getFooterLinks
(),
'tag_list'
=>
$settings
->
getTagList
(),
'scheme'
=>
$settings
->
getScheme
(),
]),
];
...
...
This diff is collapsed.
Click to expand it.
Core/Pro/Settings.php
View file @
05d2acc9
...
...
@@ -32,6 +32,10 @@ use Minds\Traits\MagicAttributes;
* @method Settings setFooterText(string $footerText)
* @method array getFooterLinks()
* @method Settings setFooterLinks(array $footerLinks)
* @method array getTagList()
* @method Settings setTagList(array $footerLinks)
* @method string getScheme()
* @method Settings setScheme(string $scheme)
* @method string getBackgroundImage()
* @method Settings setBackgroundImage(string $backgroundImage)
* @method string getLogoImage()
...
...
@@ -83,30 +87,51 @@ class Settings implements JsonSerializable
/** @var array */
protected
$footerLinks
=
[];
/** @var array */
protected
$tagList
=
[];
/** @var string */
protected
$scheme
;
/**
* @return array
*/
public
function
export
()
{
$textColor
=
$this
->
textColor
?:
static
::
DEFAULT_TEXT_COLOR
;
$primaryColor
=
$this
->
primaryColor
?:
static
::
DEFAULT_PRIMARY_COLOR
;
$plainBackgroundColor
=
$this
->
plainBackgroundColor
?:
static
::
DEFAULT_PLAIN_BACKGROUND_COLOR
;
return
[
'user_guid'
=>
(
string
)
$this
->
userGuid
,
'domain'
=>
$this
->
domain
,
'title'
=>
$this
->
title
,
'headline'
=>
$this
->
headline
,
'text_color'
=>
$
this
->
textColor
?:
static
::
DEFAULT_TEXT_COLOR
,
'primary_color'
=>
$
this
->
primaryColor
?:
static
::
DEFAULT_PRIMARY_COLOR
,
'plain_background_color'
=>
$
this
->
plainBackgroundColor
?:
static
::
DEFAULT_PLAIN_BACKGROUND_COLOR
,
'text_color'
=>
$textColor
,
'primary_color'
=>
$primaryColor
,
'plain_background_color'
=>
$plainBackgroundColor
,
'footer_text'
=>
$this
->
footerText
,
'footer_links'
=>
$this
->
footerLinks
,
'tag_list'
=>
$this
->
tagList
,
'logo_guid'
=>
(
string
)
$this
->
logoGuid
,
'background_image'
=>
$this
->
backgroundImage
,
'logo_image'
=>
$this
->
logoImage
,
'styles'
=>
[
'text_color'
=>
$this
->
textColor
?:
static
::
DEFAULT_TEXT_COLOR
,
'primary_color'
=>
$this
->
primaryColor
?:
static
::
DEFAULT_PRIMARY_COLOR
,
'plain_background_color'
=>
$this
->
plainBackgroundColor
?:
static
::
DEFAULT_PLAIN_BACKGROUND_COLOR
,
'transparent_background_color'
=>
sprintf
(
"%sa0"
,
$this
->
plainBackgroundColor
?:
static
::
DEFAULT_PLAIN_BACKGROUND_COLOR
),
],
'scheme'
=>
$this
->
scheme
,
'styles'
=>
$this
->
buildStyles
(),
];
}
public
function
buildStyles
()
{
$textColor
=
$this
->
textColor
?:
static
::
DEFAULT_TEXT_COLOR
;
$primaryColor
=
$this
->
primaryColor
?:
static
::
DEFAULT_PRIMARY_COLOR
;
$plainBackgroundColor
=
$this
->
plainBackgroundColor
?:
static
::
DEFAULT_PLAIN_BACKGROUND_COLOR
;
return
[
'text_color'
=>
$textColor
,
'primary_color'
=>
$primaryColor
,
'plain_background_color'
=>
$plainBackgroundColor
,
'transparent_background_color'
=>
sprintf
(
"%sa0"
,
$plainBackgroundColor
),
];
}
...
...
This diff is collapsed.
Click to expand it.