mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-08 17:07:03 +03:00
Admin -> Config application.ini passwords as input password
This commit is contained in:
parent
950a5ad454
commit
5c71d22215
1 changed files with 3 additions and 3 deletions
|
|
@ -12,13 +12,13 @@ export class ConfigAdminSettings /*extends AbstractViewSettings*/ {
|
||||||
Remote.request('AdminSettingsGet', (iError, data) => {
|
Remote.request('AdminSettingsGet', (iError, data) => {
|
||||||
if (!iError) {
|
if (!iError) {
|
||||||
const cfg = [],
|
const cfg = [],
|
||||||
getInputType = value => {
|
getInputType = (value, pass) => {
|
||||||
switch (typeof value)
|
switch (typeof value)
|
||||||
{
|
{
|
||||||
case 'boolean': return 'checkbox';
|
case 'boolean': return 'checkbox';
|
||||||
case 'number': return 'number';
|
case 'number': return 'number';
|
||||||
}
|
}
|
||||||
return 'text';
|
return pass ? 'password' : 'text';
|
||||||
};
|
};
|
||||||
Object.entries(data.Result).forEach(([key, items]) => {
|
Object.entries(data.Result).forEach(([key, items]) => {
|
||||||
const section = {
|
const section = {
|
||||||
|
|
@ -30,7 +30,7 @@ export class ConfigAdminSettings /*extends AbstractViewSettings*/ {
|
||||||
key: `config[${key}][${skey}]`,
|
key: `config[${key}][${skey}]`,
|
||||||
name: skey,
|
name: skey,
|
||||||
value: item[0],
|
value: item[0],
|
||||||
type: getInputType(item[0]),
|
type: getInputType(item[0], skey.includes('password')),
|
||||||
comment: item[1]
|
comment: item[1]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue