Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guxukai
baas-ide
Commits
b815dae7
Commit
b815dae7
authored
May 13, 2019
by
Grandschtroumpf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add title if no permission exist
parent
6382e855
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
4 deletions
+11
-4
plugin-manager-settings.js
src/app/components/plugin-manager-settings.js
+11
-4
No files found.
src/app/components/plugin-manager-settings.js
View file @
b815dae7
...
@@ -17,6 +17,7 @@ const css = csjs`
...
@@ -17,6 +17,7 @@ const css = csjs`
}
}
.permissionForm h4 {
.permissionForm h4 {
font-size: 1.3rem;
font-size: 1.3rem;
text-align: center;
}
}
.permissionForm h6 {
.permissionForm h6 {
font-size: 1.1rem;
font-size: 1.1rem;
...
@@ -36,7 +37,8 @@ const css = csjs`
...
@@ -36,7 +37,8 @@ const css = csjs`
export
class
PluginManagerSettings
{
export
class
PluginManagerSettings
{
openDialog
()
{
openDialog
()
{
this
.
permissions
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
'plugins/permissions'
))
const
fromLocal
=
window
.
localStorage
.
getItem
(
'plugins/permissions'
)
this
.
permissions
=
JSON
.
parse
(
fromLocal
||
'{}'
)
modalDialog
(
'Plugin Manager Settings'
,
this
.
settings
(),
modalDialog
(
'Plugin Manager Settings'
,
this
.
settings
(),
{
fn
:
()
=>
this
.
onValidation
()
},
{
fn
:
()
=>
this
.
onValidation
()
},
)
)
...
@@ -64,22 +66,27 @@ export class PluginManagerSettings {
...
@@ -64,22 +66,27 @@ export class PluginManagerSettings {
</div>`
</div>`
}
}
const
by
Plugin
=
Object
const
by
Module
=
Object
.
keys
(
permission
)
.
keys
(
permission
)
.
map
(
name
=>
permissionByPlugin
(
name
,
permission
[
name
]))
.
map
(
name
=>
permissionByPlugin
(
name
,
permission
[
name
]))
return
yo
`
return
yo
`
<div>
<div>
<h6>
${
key
}
:</h6>
<h6>
${
key
}
:</h6>
${
by
Plugin
}
${
by
Module
}
</div>`
</div>`
}
}
const
permissions
=
Object
const
permissions
=
Object
.
keys
(
this
.
permissions
)
.
keys
(
this
.
permissions
)
.
map
(
key
=>
permissionByModule
(
key
,
this
.
permissions
[
key
]))
.
map
(
key
=>
permissionByModule
(
key
,
this
.
permissions
[
key
]))
const
title
=
permissions
.
length
===
0
?
yo
`<h4>No Permission requested yet.</h4>`
:
yo
`<h4>Current Permission settings</h4>`
return
yo
`<form class="
${
css
.
permissionForm
}
">
return
yo
`<form class="
${
css
.
permissionForm
}
">
<h4>Current Permission settings</h4>
${
title
}
<hr/>
<hr/>
${
permissions
}
${
permissions
}
</form>`
</form>`
...
...
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