mirror of https://gitee.com/karson/fastadmin.git
parent
70b9c8affe
commit
fce5b8e374
|
|
@ -21,11 +21,12 @@ class Addon extends Command
|
||||||
$this
|
$this
|
||||||
->setName('addon')
|
->setName('addon')
|
||||||
->addOption('name', 'a', Option::VALUE_REQUIRED, 'addon name', null)
|
->addOption('name', 'a', Option::VALUE_REQUIRED, 'addon name', null)
|
||||||
->addOption('action', 'c', Option::VALUE_REQUIRED, 'action(create/enable/disable/install/uninstall/refresh/upgrade/package/move)', 'create')
|
->addOption('action', 'c', Option::VALUE_REQUIRED, 'action(create/enable/disable/uninstall/refresh/package/move)', 'create')
|
||||||
->addOption('force', 'f', Option::VALUE_OPTIONAL, 'force override', null)
|
->addOption('force', 'f', Option::VALUE_OPTIONAL, 'force override', null)
|
||||||
->addOption('release', 'r', Option::VALUE_OPTIONAL, 'addon release version', null)
|
->addOption('release', 'r', Option::VALUE_OPTIONAL, 'addon release version', null)
|
||||||
->addOption('uid', 'u', Option::VALUE_OPTIONAL, 'fastadmin uid', null)
|
->addOption('uid', 'u', Option::VALUE_OPTIONAL, 'fastadmin uid', null)
|
||||||
->addOption('token', 't', Option::VALUE_OPTIONAL, 'fastadmin token', null)
|
->addOption('token', 't', Option::VALUE_OPTIONAL, 'fastadmin token', null)
|
||||||
|
->addOption('domain', 'd', Option::VALUE_OPTIONAL, 'domain', null)
|
||||||
->addOption('local', 'l', Option::VALUE_OPTIONAL, 'local package', null)
|
->addOption('local', 'l', Option::VALUE_OPTIONAL, 'local package', null)
|
||||||
->setDescription('Addon manager');
|
->setDescription('Addon manager');
|
||||||
}
|
}
|
||||||
|
|
@ -48,7 +49,7 @@ class Addon extends Command
|
||||||
|
|
||||||
include dirname(__DIR__) . DS . 'common.php';
|
include dirname(__DIR__) . DS . 'common.php';
|
||||||
|
|
||||||
if (!$name) {
|
if (!$name && !in_array($action, ['refresh'])) {
|
||||||
throw new Exception('Addon name could not be empty');
|
throw new Exception('Addon name could not be empty');
|
||||||
}
|
}
|
||||||
if (!$action || !in_array($action, ['create', 'disable', 'enable', 'install', 'uninstall', 'refresh', 'upgrade', 'package', 'move'])) {
|
if (!$action || !in_array($action, ['create', 'disable', 'enable', 'install', 'uninstall', 'refresh', 'upgrade', 'package', 'move'])) {
|
||||||
|
|
@ -132,42 +133,6 @@ class Addon extends Command
|
||||||
}
|
}
|
||||||
$output->info(ucfirst($action) . " Successed!");
|
$output->info(ucfirst($action) . " Successed!");
|
||||||
break;
|
break;
|
||||||
case 'install':
|
|
||||||
//非覆盖模式时如果存在则报错
|
|
||||||
if (is_dir($addonDir) && !$force) {
|
|
||||||
throw new Exception("addon already exists!\nIf you need to install again, use the parameter --force=true ");
|
|
||||||
}
|
|
||||||
//如果存在先移除
|
|
||||||
if (is_dir($addonDir)) {
|
|
||||||
rmdirs($addonDir);
|
|
||||||
}
|
|
||||||
// 获取本地路径
|
|
||||||
$local = $input->getOption('local');
|
|
||||||
try {
|
|
||||||
Service::install($name, 0, ['version' => $release], $local);
|
|
||||||
} catch (AddonException $e) {
|
|
||||||
if ($e->getCode() != -3) {
|
|
||||||
throw new Exception($e->getMessage());
|
|
||||||
}
|
|
||||||
if (!$force) {
|
|
||||||
//如果有冲突文件则提醒
|
|
||||||
$data = $e->getData();
|
|
||||||
foreach ($data['conflictlist'] as $k => $v) {
|
|
||||||
$output->warning($v);
|
|
||||||
}
|
|
||||||
$output->info("Are you sure you want to override all those files? Type 'yes' to continue: ");
|
|
||||||
$line = fgets(defined('STDIN') ? STDIN : fopen('php://stdin', 'r'));
|
|
||||||
if (trim($line) != 'yes') {
|
|
||||||
throw new Exception("Operation is aborted!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Service::install($name, 1, ['version' => $release, 'uid' => $uid, 'token' => $token], $local);
|
|
||||||
} catch (Exception $e) {
|
|
||||||
throw new Exception($e->getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
$output->info("Install Successed!");
|
|
||||||
break;
|
|
||||||
case 'uninstall':
|
case 'uninstall':
|
||||||
//非覆盖模式时如果存在则报错
|
//非覆盖模式时如果存在则报错
|
||||||
if (!$force) {
|
if (!$force) {
|
||||||
|
|
@ -202,10 +167,6 @@ class Addon extends Command
|
||||||
Service::refresh();
|
Service::refresh();
|
||||||
$output->info("Refresh Successed!");
|
$output->info("Refresh Successed!");
|
||||||
break;
|
break;
|
||||||
case 'upgrade':
|
|
||||||
Service::upgrade($name, ['version' => $release, 'uid' => $uid, 'token' => $token]);
|
|
||||||
$output->info("Upgrade Successed!");
|
|
||||||
break;
|
|
||||||
case 'package':
|
case 'package':
|
||||||
$infoFile = $addonDir . 'info.ini';
|
$infoFile = $addonDir . 'info.ini';
|
||||||
if (!is_file($infoFile)) {
|
if (!is_file($infoFile)) {
|
||||||
|
|
@ -256,8 +217,8 @@ class Addon extends Command
|
||||||
case 'move':
|
case 'move':
|
||||||
$movePath = [
|
$movePath = [
|
||||||
'adminOnlySelfDir' => ['admin/behavior', 'admin/controller', 'admin/library', 'admin/model', 'admin/validate', 'admin/view'],
|
'adminOnlySelfDir' => ['admin/behavior', 'admin/controller', 'admin/library', 'admin/model', 'admin/validate', 'admin/view'],
|
||||||
'adminAllSubDir' => ['admin/lang'],
|
'adminAllSubDir' => ['admin/lang'],
|
||||||
'publicDir' => ['public/assets/addons', 'public/assets/js/backend']
|
'publicDir' => ['public/assets/addons', 'public/assets/js/backend']
|
||||||
];
|
];
|
||||||
$paths = [];
|
$paths = [];
|
||||||
$appPath = str_replace('/', DS, APP_PATH);
|
$appPath = str_replace('/', DS, APP_PATH);
|
||||||
|
|
@ -350,7 +311,7 @@ class Addon extends Command
|
||||||
/**
|
/**
|
||||||
* 写入到文件
|
* 写入到文件
|
||||||
* @param string $name
|
* @param string $name
|
||||||
* @param array $data
|
* @param array $data
|
||||||
* @param string $pathname
|
* @param string $pathname
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -51,18 +51,4 @@ class {%addonClassName%} extends Addons
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 实现钩子方法
|
|
||||||
* @return mixed
|
|
||||||
*/
|
|
||||||
public function testhook($param)
|
|
||||||
{
|
|
||||||
// 调用钩子时候的参数信息
|
|
||||||
print_r($param);
|
|
||||||
// 当前插件的配置信息,配置信息存在当前目录的config.php文件中,见下方
|
|
||||||
print_r($this->getConfig());
|
|
||||||
// 可以返回模板,模板文件默认读取的为插件目录中的文件。模板名不能为空!
|
|
||||||
//return $this->fetch('view/info');
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
name = {%name%}
|
name = {%name%}
|
||||||
title = 插件名称{%name%}
|
title = 插件名称{%name%}
|
||||||
intro = FastAdmin插件
|
intro = 插件介绍
|
||||||
author = yourname
|
author = yourname
|
||||||
website = https://www.fastadmin.net
|
website = https://www.fastadmin.net
|
||||||
version = 1.0.0
|
version = 1.0.0
|
||||||
state = 1
|
state = 1
|
||||||
|
|
|
||||||
|
|
@ -19,16 +19,91 @@ class Crud extends Command
|
||||||
protected $stubList = [];
|
protected $stubList = [];
|
||||||
|
|
||||||
protected $internalKeywords = [
|
protected $internalKeywords = [
|
||||||
'abstract', 'and', 'array', 'as', 'break', 'callable', 'case', 'catch', 'class', 'clone', 'const', 'continue', 'declare', 'default', 'die', 'do', 'echo', 'else', 'elseif', 'empty', 'enddeclare', 'endfor', 'endforeach', 'endif', 'endswitch', 'endwhile', 'eval', 'exit', 'extends', 'final', 'for', 'foreach', 'function', 'global', 'goto', 'if', 'implements', 'include', 'include_once', 'instanceof', 'insteadof', 'interface', 'isset', 'list', 'namespace', 'new', 'or', 'print', 'private', 'protected', 'public', 'require', 'require_once', 'return', 'static', 'switch', 'throw', 'trait', 'try', 'unset', 'use', 'var', 'while', 'xor'
|
'abstract',
|
||||||
|
'and',
|
||||||
|
'array',
|
||||||
|
'as',
|
||||||
|
'break',
|
||||||
|
'callable',
|
||||||
|
'case',
|
||||||
|
'catch',
|
||||||
|
'class',
|
||||||
|
'clone',
|
||||||
|
'const',
|
||||||
|
'continue',
|
||||||
|
'declare',
|
||||||
|
'default',
|
||||||
|
'die',
|
||||||
|
'do',
|
||||||
|
'echo',
|
||||||
|
'else',
|
||||||
|
'elseif',
|
||||||
|
'empty',
|
||||||
|
'enddeclare',
|
||||||
|
'endfor',
|
||||||
|
'endforeach',
|
||||||
|
'endif',
|
||||||
|
'endswitch',
|
||||||
|
'endwhile',
|
||||||
|
'eval',
|
||||||
|
'exit',
|
||||||
|
'extends',
|
||||||
|
'final',
|
||||||
|
'for',
|
||||||
|
'foreach',
|
||||||
|
'function',
|
||||||
|
'global',
|
||||||
|
'goto',
|
||||||
|
'if',
|
||||||
|
'implements',
|
||||||
|
'include',
|
||||||
|
'include_once',
|
||||||
|
'instanceof',
|
||||||
|
'insteadof',
|
||||||
|
'interface',
|
||||||
|
'isset',
|
||||||
|
'list',
|
||||||
|
'namespace',
|
||||||
|
'new',
|
||||||
|
'or',
|
||||||
|
'print',
|
||||||
|
'private',
|
||||||
|
'protected',
|
||||||
|
'public',
|
||||||
|
'require',
|
||||||
|
'require_once',
|
||||||
|
'return',
|
||||||
|
'static',
|
||||||
|
'switch',
|
||||||
|
'throw',
|
||||||
|
'trait',
|
||||||
|
'try',
|
||||||
|
'unset',
|
||||||
|
'use',
|
||||||
|
'var',
|
||||||
|
'while',
|
||||||
|
'xor'
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 受保护的系统表, crud不会生效
|
* 受保护的系统表, crud不会生效
|
||||||
*/
|
*/
|
||||||
protected $systemTables = [
|
protected $systemTables = [
|
||||||
'admin', 'admin_log', 'auth_group', 'auth_group_access', 'auth_rule',
|
'admin',
|
||||||
'attachment', 'config', 'category', 'ems', 'sms',
|
'admin_log',
|
||||||
'user', 'user_group', 'user_rule', 'user_score_log', 'user_token',
|
'auth_group',
|
||||||
|
'auth_group_access',
|
||||||
|
'auth_rule',
|
||||||
|
'attachment',
|
||||||
|
'config',
|
||||||
|
'category',
|
||||||
|
'ems',
|
||||||
|
'sms',
|
||||||
|
'user',
|
||||||
|
'user_group',
|
||||||
|
'user_rule',
|
||||||
|
'user_score_log',
|
||||||
|
'user_token',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -68,11 +143,21 @@ class Crud extends Command
|
||||||
*/
|
*/
|
||||||
protected $citySuffix = ['city'];
|
protected $citySuffix = ['city'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 时间区间后缀
|
||||||
|
*/
|
||||||
|
protected $rangeSuffix = ['range'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* JSON后缀
|
* JSON后缀
|
||||||
*/
|
*/
|
||||||
protected $jsonSuffix = ['json'];
|
protected $jsonSuffix = ['json'];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标签后缀
|
||||||
|
*/
|
||||||
|
protected $tagSuffix = ['tag', 'tags'];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Selectpage对应的后缀
|
* Selectpage对应的后缀
|
||||||
*/
|
*/
|
||||||
|
|
@ -95,7 +180,9 @@ class Crud extends Command
|
||||||
'images' => 'images',
|
'images' => 'images',
|
||||||
'avatar' => 'image',
|
'avatar' => 'image',
|
||||||
'switch' => 'toggle',
|
'switch' => 'toggle',
|
||||||
'time' => ['type' => ['int', 'timestamp'], 'name' => 'datetime']
|
'tag' => 'flag',
|
||||||
|
'tags' => 'flag',
|
||||||
|
'time' => ['type' => ['int', 'timestamp'], 'name' => 'datetime'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -183,12 +270,14 @@ class Crud extends Command
|
||||||
->addOption('switchsuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate switch component with suffix', null)
|
->addOption('switchsuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate switch component with suffix', null)
|
||||||
->addOption('citysuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate citypicker component with suffix', null)
|
->addOption('citysuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate citypicker component with suffix', null)
|
||||||
->addOption('jsonsuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate fieldlist component with suffix', null)
|
->addOption('jsonsuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate fieldlist component with suffix', null)
|
||||||
|
->addOption('tagsuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate tag component with suffix', null)
|
||||||
->addOption('editorsuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate editor component with suffix', null)
|
->addOption('editorsuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate editor component with suffix', null)
|
||||||
->addOption('selectpagesuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate selectpage component with suffix', null)
|
->addOption('selectpagesuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate selectpage component with suffix', null)
|
||||||
->addOption('selectpagessuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate multiple selectpage component with suffix', null)
|
->addOption('selectpagessuffix', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'automatically generate multiple selectpage component with suffix', null)
|
||||||
->addOption('ignorefields', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'ignore fields', null)
|
->addOption('ignorefields', null, Option::VALUE_OPTIONAL | Option::VALUE_IS_ARRAY, 'ignore fields', null)
|
||||||
->addOption('sortfield', null, Option::VALUE_OPTIONAL, 'sort field', null)
|
->addOption('sortfield', null, Option::VALUE_OPTIONAL, 'sort field', null)
|
||||||
->addOption('headingfilterfield', null, Option::VALUE_OPTIONAL, 'heading filter field', null)
|
->addOption('headingfilterfield', null, Option::VALUE_OPTIONAL, 'heading filter field', null)
|
||||||
|
->addOption('fixedcolumns', null, Option::VALUE_OPTIONAL, 'fixed columns', null)
|
||||||
->addOption('editorclass', null, Option::VALUE_OPTIONAL, 'automatically generate editor class', null)
|
->addOption('editorclass', null, Option::VALUE_OPTIONAL, 'automatically generate editor class', null)
|
||||||
->addOption('db', null, Option::VALUE_OPTIONAL, 'database config name', 'database')
|
->addOption('db', null, Option::VALUE_OPTIONAL, 'database config name', 'database')
|
||||||
->setDescription('Build CRUD controller and model from table');
|
->setDescription('Build CRUD controller and model from table');
|
||||||
|
|
@ -214,12 +303,12 @@ class Crud extends Command
|
||||||
$force = $input->getOption('force');
|
$force = $input->getOption('force');
|
||||||
//是否为本地model,为0时表示为全局model将会把model放在app/common/model中
|
//是否为本地model,为0时表示为全局model将会把model放在app/common/model中
|
||||||
$local = $input->getOption('local');
|
$local = $input->getOption('local');
|
||||||
|
|
||||||
if (!$table) {
|
if (!$table) {
|
||||||
throw new Exception('table name can\'t empty');
|
throw new Exception('table name can\'t empty');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//是否生成菜单
|
//是否生成菜单
|
||||||
$menu = $input->getOption("menu");
|
$menu = $input->getOption("menu");
|
||||||
//关联表
|
//关联表
|
||||||
|
|
@ -242,10 +331,14 @@ class Crud extends Command
|
||||||
$imagefield = $input->getOption('imagefield');
|
$imagefield = $input->getOption('imagefield');
|
||||||
//文件后缀
|
//文件后缀
|
||||||
$filefield = $input->getOption('filefield');
|
$filefield = $input->getOption('filefield');
|
||||||
|
//标签后缀
|
||||||
|
$tagsuffix = $input->getOption('tagsuffix');
|
||||||
//日期后缀
|
//日期后缀
|
||||||
$intdatesuffix = $input->getOption('intdatesuffix');
|
$intdatesuffix = $input->getOption('intdatesuffix');
|
||||||
//开关后缀
|
//开关后缀
|
||||||
$switchsuffix = $input->getOption('switchsuffix');
|
$switchsuffix = $input->getOption('switchsuffix');
|
||||||
|
//富文本编辑器
|
||||||
|
$editorsuffix = $input->getOption('editorsuffix');
|
||||||
//城市后缀
|
//城市后缀
|
||||||
$citysuffix = $input->getOption('citysuffix');
|
$citysuffix = $input->getOption('citysuffix');
|
||||||
//JSON配置后缀
|
//JSON配置后缀
|
||||||
|
|
@ -260,6 +353,8 @@ class Crud extends Command
|
||||||
$sortfield = $input->getOption('sortfield');
|
$sortfield = $input->getOption('sortfield');
|
||||||
//顶部筛选过滤字段
|
//顶部筛选过滤字段
|
||||||
$headingfilterfield = $input->getOption('headingfilterfield');
|
$headingfilterfield = $input->getOption('headingfilterfield');
|
||||||
|
//固定列数量
|
||||||
|
$fixedcolumns = $input->getOption('fixedcolumns');
|
||||||
//编辑器Class
|
//编辑器Class
|
||||||
$editorclass = $input->getOption('editorclass');
|
$editorclass = $input->getOption('editorclass');
|
||||||
if ($setcheckboxsuffix) {
|
if ($setcheckboxsuffix) {
|
||||||
|
|
@ -274,12 +369,18 @@ class Crud extends Command
|
||||||
if ($filefield) {
|
if ($filefield) {
|
||||||
$this->fileField = $filefield;
|
$this->fileField = $filefield;
|
||||||
}
|
}
|
||||||
|
if ($tagsuffix) {
|
||||||
|
$this->tagSuffix = $tagsuffix;
|
||||||
|
}
|
||||||
if ($intdatesuffix) {
|
if ($intdatesuffix) {
|
||||||
$this->intDateSuffix = $intdatesuffix;
|
$this->intDateSuffix = $intdatesuffix;
|
||||||
}
|
}
|
||||||
if ($switchsuffix) {
|
if ($switchsuffix) {
|
||||||
$this->switchSuffix = $switchsuffix;
|
$this->switchSuffix = $switchsuffix;
|
||||||
}
|
}
|
||||||
|
if ($editorsuffix) {
|
||||||
|
$this->editorSuffix = $editorsuffix;
|
||||||
|
}
|
||||||
if ($citysuffix) {
|
if ($citysuffix) {
|
||||||
$this->citySuffix = $citysuffix;
|
$this->citySuffix = $citysuffix;
|
||||||
}
|
}
|
||||||
|
|
@ -312,7 +413,7 @@ class Crud extends Command
|
||||||
$prefix = Config::get($db . '.prefix');
|
$prefix = Config::get($db . '.prefix');
|
||||||
|
|
||||||
//系统表无法生成,防止后台错乱
|
//系统表无法生成,防止后台错乱
|
||||||
if(in_array(str_replace($prefix,"",$table),$this->systemTables)){
|
if (in_array(str_replace($prefix, "", $table), $this->systemTables)) {
|
||||||
throw new Exception('system table can\'t be crud');
|
throw new Exception('system table can\'t be crud');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -685,6 +786,14 @@ class Crud extends Command
|
||||||
$attrArr['data-use-current'] = "true";
|
$attrArr['data-use-current'] = "true";
|
||||||
$formAddElement = Form::text($fieldName, $defaultDateTime, $attrArr);
|
$formAddElement = Form::text($fieldName, $defaultDateTime, $attrArr);
|
||||||
$formEditElement = Form::text($fieldName, ($fieldFunc ? "{:\$row.{$field}?{$fieldFunc}(\$row.{$field}):''}" : "{\$row.{$field}{$fieldFunc}}"), $attrArr);
|
$formEditElement = Form::text($fieldName, ($fieldFunc ? "{:\$row.{$field}?{$fieldFunc}(\$row.{$field}):''}" : "{\$row.{$field}{$fieldFunc}}"), $attrArr);
|
||||||
|
} elseif ($inputType == 'datetimerange') {
|
||||||
|
$cssClassArr[] = 'datetimerange';
|
||||||
|
$attrArr['class'] = implode(' ', $cssClassArr);
|
||||||
|
$attrArr['data-locale'] = '{"format":"YYYY-MM-DD HH:mm:ss"}';
|
||||||
|
$fieldFunc = '';
|
||||||
|
$defaultDateTime = "";
|
||||||
|
$formAddElement = Form::text($fieldName, $defaultDateTime, $attrArr);
|
||||||
|
$formEditElement = Form::text($fieldName, $editValue, $attrArr);
|
||||||
} elseif ($inputType == 'checkbox' || $inputType == 'radio') {
|
} elseif ($inputType == 'checkbox' || $inputType == 'radio') {
|
||||||
unset($attrArr['data-rule']);
|
unset($attrArr['data-rule']);
|
||||||
$fieldName = $inputType == 'checkbox' ? $fieldName .= "[]" : $fieldName;
|
$fieldName = $inputType == 'checkbox' ? $fieldName .= "[]" : $fieldName;
|
||||||
|
|
@ -728,12 +837,25 @@ class Crud extends Command
|
||||||
$attrArr['data-toggle'] = "city-picker";
|
$attrArr['data-toggle'] = "city-picker";
|
||||||
$formAddElement = sprintf("<div class='control-relative'>%s</div>", Form::input('text', $fieldName, $defaultValue, $attrArr));
|
$formAddElement = sprintf("<div class='control-relative'>%s</div>", Form::input('text', $fieldName, $defaultValue, $attrArr));
|
||||||
$formEditElement = sprintf("<div class='control-relative'>%s</div>", Form::input('text', $fieldName, $editValue, $attrArr));
|
$formEditElement = sprintf("<div class='control-relative'>%s</div>", Form::input('text', $fieldName, $editValue, $attrArr));
|
||||||
|
} elseif ($inputType == 'tagsinput') {
|
||||||
|
$attrArr['class'] = implode(' ', $cssClassArr);
|
||||||
|
$attrArr['data-role'] = "tagsinput";
|
||||||
|
$formAddElement = Form::input('text', $fieldName, $defaultValue, $attrArr);
|
||||||
|
$formEditElement = Form::input('text', $fieldName, $editValue, $attrArr);
|
||||||
} elseif ($inputType == 'fieldlist') {
|
} elseif ($inputType == 'fieldlist') {
|
||||||
$itemArr = $this->getItemArray($itemArr, $field, $v['COLUMN_COMMENT']);
|
$itemArr = $this->getItemArray($itemArr, $field, $v['COLUMN_COMMENT']);
|
||||||
|
$templateName = !isset($itemArr['key']) && !isset($itemArr['value']) && count($itemArr) > 0 ? 'fieldlist-template' : 'fieldlist';
|
||||||
$itemKey = isset($itemArr['key']) ? ucfirst($itemArr['key']) : 'Key';
|
$itemKey = isset($itemArr['key']) ? ucfirst($itemArr['key']) : 'Key';
|
||||||
$itemValue = isset($itemArr['value']) ? ucfirst($itemArr['value']) : 'Value';
|
$itemValue = isset($itemArr['value']) ? ucfirst($itemArr['value']) : 'Value';
|
||||||
$formAddElement = $this->getReplacedStub('html/' . $inputType, ['field' => $field, 'fieldName' => $fieldName, 'itemKey' => $itemKey, 'itemValue' => $itemValue, 'fieldValue' => $defaultValue]);
|
$theadListArr = $tbodyListArr = [];
|
||||||
$formEditElement = $this->getReplacedStub('html/' . $inputType, ['field' => $field, 'fieldName' => $fieldName, 'itemKey' => $itemKey, 'itemValue' => $itemValue, 'fieldValue' => $editValue]);
|
foreach ($itemArr as $index => $item) {
|
||||||
|
$theadListArr[] = "<td>{:__('" . $item . "')}</td>";
|
||||||
|
$tbodyListArr[] = '<td><input type="text" name="<%=name%>[<%=index%>][' . $index . ']" class="form-control" value="<%=row.' . $index . '%>"/></td>';
|
||||||
|
}
|
||||||
|
$colspan = count($theadListArr) + 1;
|
||||||
|
$commonFields = ['field' => $field, 'fieldName' => $fieldName, 'itemKey' => $itemKey, 'itemValue' => $itemValue, 'theadList' => implode("\n", $theadListArr), 'tbodyList' => implode("\n", $tbodyListArr), 'colspan' => $colspan];
|
||||||
|
$formAddElement = $this->getReplacedStub('html/' . $templateName, array_merge($commonFields, ['fieldValue' => $defaultValue]));
|
||||||
|
$formEditElement = $this->getReplacedStub('html/' . $templateName, array_merge($commonFields, ['fieldValue' => $editValue]));
|
||||||
} else {
|
} else {
|
||||||
$search = $replace = '';
|
$search = $replace = '';
|
||||||
//特殊字段为关联搜索
|
//特殊字段为关联搜索
|
||||||
|
|
@ -858,6 +980,12 @@ class Crud extends Command
|
||||||
}
|
}
|
||||||
unset($line);
|
unset($line);
|
||||||
$langList = implode(",\n", array_filter($langList));
|
$langList = implode(",\n", array_filter($langList));
|
||||||
|
$fixedcolumns = count($columnList) >= 10 ? 1 : $fixedcolumns;
|
||||||
|
|
||||||
|
$fixedColumnsJs = '';
|
||||||
|
if (is_numeric($fixedcolumns) && $fixedcolumns) {
|
||||||
|
$fixedColumnsJs = "\n" . str_repeat(" ", 16) . "fixedColumns: true,\n" . str_repeat(" ", 16) . ($fixedcolumns < 0 ? "fixedNumber" : "fixedRightNumber") . ": " . $fixedcolumns . ",";
|
||||||
|
}
|
||||||
|
|
||||||
//表注释
|
//表注释
|
||||||
$tableComment = $modelTableInfo['Comment'];
|
$tableComment = $modelTableInfo['Comment'];
|
||||||
|
|
@ -885,6 +1013,7 @@ class Crud extends Command
|
||||||
'iconName' => $iconName,
|
'iconName' => $iconName,
|
||||||
'pk' => $priKey,
|
'pk' => $priKey,
|
||||||
'order' => $order,
|
'order' => $order,
|
||||||
|
'fixedColumnsJs' => $fixedColumnsJs,
|
||||||
'table' => $table,
|
'table' => $table,
|
||||||
'tableName' => $modelTableName,
|
'tableName' => $modelTableName,
|
||||||
'addList' => $addList,
|
'addList' => $addList,
|
||||||
|
|
@ -904,7 +1033,7 @@ class Crud extends Command
|
||||||
'recyclebinJs' => '',
|
'recyclebinJs' => '',
|
||||||
'headingHtml' => $headingHtml,
|
'headingHtml' => $headingHtml,
|
||||||
'recyclebinHtml' => $recyclebinHtml,
|
'recyclebinHtml' => $recyclebinHtml,
|
||||||
'visibleFieldList' => $fields ? "\$row->visible(['" . implode("','", array_filter(in_array($priKey,explode(',', $fields))?explode(',', $fields):explode(',',$priKey.','.$fields))) . "']);" : '',
|
'visibleFieldList' => $fields ? "\$row->visible(['" . implode("','", array_filter(in_array($priKey, explode(',', $fields)) ? explode(',', $fields) : explode(',', $priKey . ',' . $fields))) . "']);" : '',
|
||||||
'appendAttrList' => implode(",\n", $appendAttrList),
|
'appendAttrList' => implode(",\n", $appendAttrList),
|
||||||
'getEnumList' => implode("\n\n", $getEnumArr),
|
'getEnumList' => implode("\n\n", $getEnumArr),
|
||||||
'getAttrList' => implode("\n\n", $getAttrArr),
|
'getAttrList' => implode("\n\n", $getAttrArr),
|
||||||
|
|
@ -963,7 +1092,7 @@ class Crud extends Command
|
||||||
|
|
||||||
if ($relations) {
|
if ($relations) {
|
||||||
foreach ($relations as $i => $relation) {
|
foreach ($relations as $i => $relation) {
|
||||||
$relation['modelNamespace'] = $data['modelNamespace'];
|
$relation['modelNamespace'] = $relation['relationNamespace'];
|
||||||
if (!is_file($relation['relationFile'])) {
|
if (!is_file($relation['relationFile'])) {
|
||||||
// 生成关联模型文件
|
// 生成关联模型文件
|
||||||
$this->writeToFile('relationmodel', $relation, $relation['relationFile']);
|
$this->writeToFile('relationmodel', $relation, $relation['relationFile']);
|
||||||
|
|
@ -1360,10 +1489,18 @@ EOD;
|
||||||
if ($this->isMatchSuffix($fieldsName, $this->citySuffix) && ($v['DATA_TYPE'] == 'varchar' || $v['DATA_TYPE'] == 'char')) {
|
if ($this->isMatchSuffix($fieldsName, $this->citySuffix) && ($v['DATA_TYPE'] == 'varchar' || $v['DATA_TYPE'] == 'char')) {
|
||||||
$inputType = "citypicker";
|
$inputType = "citypicker";
|
||||||
}
|
}
|
||||||
|
// 指定后缀结尾城市选择框
|
||||||
|
if ($this->isMatchSuffix($fieldsName, $this->rangeSuffix) && ($v['DATA_TYPE'] == 'varchar' || $v['DATA_TYPE'] == 'char')) {
|
||||||
|
$inputType = "datetimerange";
|
||||||
|
}
|
||||||
// 指定后缀结尾JSON配置
|
// 指定后缀结尾JSON配置
|
||||||
if ($this->isMatchSuffix($fieldsName, $this->jsonSuffix) && ($v['DATA_TYPE'] == 'varchar' || $v['DATA_TYPE'] == 'text')) {
|
if ($this->isMatchSuffix($fieldsName, $this->jsonSuffix) && ($v['DATA_TYPE'] == 'varchar' || $v['DATA_TYPE'] == 'text')) {
|
||||||
$inputType = "fieldlist";
|
$inputType = "fieldlist";
|
||||||
}
|
}
|
||||||
|
// 指定后缀结尾标签配置
|
||||||
|
if ($this->isMatchSuffix($fieldsName, $this->tagSuffix) && ($v['DATA_TYPE'] == 'varchar' || $v['DATA_TYPE'] == 'text')) {
|
||||||
|
$inputType = "tagsinput";
|
||||||
|
}
|
||||||
return $inputType;
|
return $inputType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="form-group layer-footer">
|
<div class="form-group layer-footer">
|
||||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
|
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||||
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
|
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<div class="form-group layer-footer">
|
<div class="form-group layer-footer">
|
||||||
<label class="control-label col-xs-12 col-sm-2"></label>
|
<label class="control-label col-xs-12 col-sm-2"></label>
|
||||||
<div class="col-xs-12 col-sm-8">
|
<div class="col-xs-12 col-sm-8">
|
||||||
<button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
|
<button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
|
||||||
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
|
<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
|
||||||
|
<table class="table fieldlist" data-name="{%fieldName%}" data-template="{%fieldName%}tpl">
|
||||||
|
<tr>
|
||||||
|
{%theadList%}
|
||||||
|
<td width="90">{:__('Operate')}</td>
|
||||||
|
</tr>
|
||||||
|
<tr><td colspan="{%colspan%}">
|
||||||
|
<a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a>
|
||||||
|
<textarea name="{%fieldName%}" class="form-control hide" cols="30" rows="5">{%fieldValue%}</textarea>
|
||||||
|
</td></tr>
|
||||||
|
</table>
|
||||||
|
<script type="text/html" id="{%fieldName%}tpl">
|
||||||
|
<tr>
|
||||||
|
{%tbodyList%}
|
||||||
|
<td width="90">
|
||||||
|
<span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
|
||||||
|
<span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</script>
|
||||||
|
|
@ -21,7 +21,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
table.bootstrapTable({
|
table.bootstrapTable({
|
||||||
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
url: $.fn.bootstrapTable.defaults.extend.index_url,
|
||||||
pk: '{%pk%}',
|
pk: '{%pk%}',
|
||||||
sortName: '{%order%}',
|
sortName: '{%order%}',{%fixedColumnsJs%}
|
||||||
columns: [
|
columns: [
|
||||||
[
|
[
|
||||||
{%javascriptList%}
|
{%javascriptList%}
|
||||||
|
|
@ -45,4 +45,4 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefin
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return Controller;
|
return Controller;
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,10 @@ class Install extends Command
|
||||||
if (!preg_match("/^[\S]{6,16}$/", $adminPassword)) {
|
if (!preg_match("/^[\S]{6,16}$/", $adminPassword)) {
|
||||||
throw new Exception(__('Please input correct password'));
|
throw new Exception(__('Please input correct password'));
|
||||||
}
|
}
|
||||||
|
$weakPasswordArr = ['123456', '12345678', '123456789', '654321', '111111', '000000', 'password', 'qwerty', 'abc123', '1qaz2wsx'];
|
||||||
|
if (in_array($adminPassword, $weakPasswordArr)) {
|
||||||
|
throw new Exception(__('Password is too weak'));
|
||||||
|
}
|
||||||
if ($siteName == '' || preg_match("/fast" . "admin/i", $siteName)) {
|
if ($siteName == '' || preg_match("/fast" . "admin/i", $siteName)) {
|
||||||
throw new Exception(__('Please input correct website'));
|
throw new Exception(__('Please input correct website'));
|
||||||
}
|
}
|
||||||
|
|
@ -230,18 +234,19 @@ class Install extends Command
|
||||||
throw new Exception(__('The current permissions are insufficient to write the file %s', 'application/config.php'));
|
throw new Exception(__('The current permissions are insufficient to write the file %s', 'application/config.php'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$avatar = request()->domain() . '/assets/img/avatar.png';
|
||||||
// 变更默认管理员密码
|
// 变更默认管理员密码
|
||||||
$adminPassword = $adminPassword ? $adminPassword : Random::alnum(8);
|
$adminPassword = $adminPassword ? $adminPassword : Random::alnum(8);
|
||||||
$adminEmail = $adminEmail ? $adminEmail : "admin@admin.com";
|
$adminEmail = $adminEmail ? $adminEmail : "admin@admin.com";
|
||||||
$newSalt = substr(md5(uniqid(true)), 0, 6);
|
$newSalt = substr(md5(uniqid(true)), 0, 6);
|
||||||
$newPassword = md5(md5($adminPassword) . $newSalt);
|
$newPassword = md5(md5($adminPassword) . $newSalt);
|
||||||
$data = ['username' => $adminUsername, 'email' => $adminEmail, 'password' => $newPassword, 'salt' => $newSalt];
|
$data = ['username' => $adminUsername, 'email' => $adminEmail, 'avatar' => $avatar, 'password' => $newPassword, 'salt' => $newSalt];
|
||||||
$instance->name('admin')->where('username', 'admin')->update($data);
|
$instance->name('admin')->where('username', 'admin')->update($data);
|
||||||
|
|
||||||
// 变更前台默认用户的密码,随机生成
|
// 变更前台默认用户的密码,随机生成
|
||||||
$newSalt = substr(md5(uniqid(true)), 0, 6);
|
$newSalt = substr(md5(uniqid(true)), 0, 6);
|
||||||
$newPassword = md5(md5(Random::alnum(8)) . $newSalt);
|
$newPassword = md5(md5(Random::alnum(8)) . $newSalt);
|
||||||
$instance->name('user')->where('username', 'admin')->update(['password' => $newPassword, 'salt' => $newSalt]);
|
$instance->name('user')->where('username', 'admin')->update(['avatar' => $avatar, 'password' => $newPassword, 'salt' => $newSalt]);
|
||||||
|
|
||||||
// 修改后台入口
|
// 修改后台入口
|
||||||
$adminName = '';
|
$adminName = '';
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ CREATE TABLE `fa_admin_log` (
|
||||||
`username` varchar(30) DEFAULT '' COMMENT '管理员名字',
|
`username` varchar(30) DEFAULT '' COMMENT '管理员名字',
|
||||||
`url` varchar(1500) DEFAULT '' COMMENT '操作页面',
|
`url` varchar(1500) DEFAULT '' COMMENT '操作页面',
|
||||||
`title` varchar(100) DEFAULT '' COMMENT '日志标题',
|
`title` varchar(100) DEFAULT '' COMMENT '日志标题',
|
||||||
`content` text NOT NULL COMMENT '内容',
|
`content` longtext NOT NULL COMMENT '内容',
|
||||||
`ip` varchar(50) DEFAULT '' COMMENT 'IP',
|
`ip` varchar(50) DEFAULT '' COMMENT 'IP',
|
||||||
`useragent` varchar(255) DEFAULT '' COMMENT 'User-Agent',
|
`useragent` varchar(255) DEFAULT '' COMMENT 'User-Agent',
|
||||||
`createtime` int(10) DEFAULT NULL COMMENT '操作时间',
|
`createtime` int(10) DEFAULT NULL COMMENT '操作时间',
|
||||||
|
|
@ -395,6 +395,7 @@ CREATE TABLE `fa_test` (
|
||||||
`admin_id` int(10) DEFAULT '0' COMMENT '管理员ID',
|
`admin_id` int(10) DEFAULT '0' COMMENT '管理员ID',
|
||||||
`category_id` int(10) unsigned DEFAULT '0' COMMENT '分类ID(单选)',
|
`category_id` int(10) unsigned DEFAULT '0' COMMENT '分类ID(单选)',
|
||||||
`category_ids` varchar(100) COMMENT '分类ID(多选)',
|
`category_ids` varchar(100) COMMENT '分类ID(多选)',
|
||||||
|
`tags` varchar(255) DEFAULT '' COMMENT '标签',
|
||||||
`week` enum('monday','tuesday','wednesday') COMMENT '星期(单选):monday=星期一,tuesday=星期二,wednesday=星期三',
|
`week` enum('monday','tuesday','wednesday') COMMENT '星期(单选):monday=星期一,tuesday=星期二,wednesday=星期三',
|
||||||
`flag` set('hot','index','recommend') DEFAULT '' COMMENT '标志(多选):hot=热门,index=首页,recommend=推荐',
|
`flag` set('hot','index','recommend') DEFAULT '' COMMENT '标志(多选):hot=热门,index=首页,recommend=推荐',
|
||||||
`genderdata` enum('male','female') DEFAULT 'male' COMMENT '性别(单选):male=男,female=女',
|
`genderdata` enum('male','female') DEFAULT 'male' COMMENT '性别(单选):male=男,female=女',
|
||||||
|
|
@ -408,8 +409,10 @@ CREATE TABLE `fa_test` (
|
||||||
`description` varchar(255) DEFAULT '' COMMENT '描述',
|
`description` varchar(255) DEFAULT '' COMMENT '描述',
|
||||||
`city` varchar(100) DEFAULT '' COMMENT '省市',
|
`city` varchar(100) DEFAULT '' COMMENT '省市',
|
||||||
`json` varchar(255) DEFAULT NULL COMMENT '配置:key=名称,value=值',
|
`json` varchar(255) DEFAULT NULL COMMENT '配置:key=名称,value=值',
|
||||||
|
`multiplejson` varchar(1500) DEFAULT '' COMMENT '二维数组:title=标题,intro=介绍,author=作者,age=年龄',
|
||||||
`price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '价格',
|
`price` decimal(10,2) unsigned DEFAULT '0.00' COMMENT '价格',
|
||||||
`views` int(10) unsigned DEFAULT '0' COMMENT '点击',
|
`views` int(10) unsigned DEFAULT '0' COMMENT '点击',
|
||||||
|
`workrange` varchar(100) DEFAULT '' COMMENT '时间区间',
|
||||||
`startdate` date DEFAULT NULL COMMENT '开始日期',
|
`startdate` date DEFAULT NULL COMMENT '开始日期',
|
||||||
`activitytime` datetime DEFAULT NULL COMMENT '活动时间(datetime)',
|
`activitytime` datetime DEFAULT NULL COMMENT '活动时间(datetime)',
|
||||||
`year` year(4) DEFAULT NULL COMMENT '年',
|
`year` year(4) DEFAULT NULL COMMENT '年',
|
||||||
|
|
@ -429,7 +432,7 @@ CREATE TABLE `fa_test` (
|
||||||
-- Records of fa_test
|
-- Records of fa_test
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
BEGIN;
|
BEGIN;
|
||||||
INSERT INTO `fa_test` VALUES (1, 0, 12, '12,13', 'monday', 'hot,index', 'male', 'music,reading', '我是一篇测试文章', '<p>我是测试内容</p>', '/assets/img/avatar.png', '/assets/img/avatar.png,/assets/img/qrcode.png', '/assets/img/avatar.png', '关键字', '描述', '广西壮族自治区/百色市/平果县', '{\"a\":\"1\",\"b\":\"2\"}', 0.00, 0, '2017-07-10', '2017-07-10 18:24:45', 2017, '18:24:45', 1491635035, 1491635035, 1491635035, NULL, 0, 1, 'normal', '1');
|
INSERT INTO `fa_test` VALUES (1, 0, 12, '12,13', '互联网,计算机', 'monday', 'hot,index', 'male', 'music,reading', '我是一篇测试文章', '<p>我是测试内容</p>', '/assets/img/avatar.png', '/assets/img/avatar.png,/assets/img/qrcode.png', '/assets/img/avatar.png', '关键字', '描述', '广西壮族自治区/百色市/平果县', '{\"a\":\"1\",\"b\":\"2\"}', '[{\"title\":\"标题一\",\"intro\":\"介绍一\",\"author\":\"小明\",\"age\":\"21\"}]', 0.00, 0, '2020-10-01 00:00:00 - 2021-10-31 23:59:59', '2017-07-10', '2017-07-10 18:24:45', 2017, '18:24:45', 1491635035, 1491635035, 1491635035, NULL, 0, 1, 'normal', '1');
|
||||||
COMMIT;
|
COMMIT;
|
||||||
|
|
||||||
-- ----------------------------
|
-- ----------------------------
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
color: #18bc9c;
|
color: #4e73df;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -81,7 +81,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-field input:focus {
|
.form-field input:focus {
|
||||||
border-color: #18bc9c;
|
border-color: #4e73df;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
color: #444;
|
color: #444;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
|
@ -165,7 +165,7 @@
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<g id="logo" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
<g id="logo" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
<path d="M64.433651,605.899968 C20.067302,536.265612 0,469.698785 0,389.731348 C0,174.488668 171.922656,0 384,0 C596.077344,0 768,174.488668 768,389.731348 C768,469.698785 747.932698,536.265612 703.566349,605.899968 C614.4,753.480595 441.6,870.4 384,870.4 C326.4,870.4 153.6,753.480595 64.433651,605.899968 L64.433651,605.899968 Z"
|
<path d="M64.433651,605.899968 C20.067302,536.265612 0,469.698785 0,389.731348 C0,174.488668 171.922656,0 384,0 C596.077344,0 768,174.488668 768,389.731348 C768,469.698785 747.932698,536.265612 703.566349,605.899968 C614.4,753.480595 441.6,870.4 384,870.4 C326.4,870.4 153.6,753.480595 64.433651,605.899968 L64.433651,605.899968 Z"
|
||||||
id="body" fill="#18BC9C"></path>
|
id="body" fill="#4e73df"></path>
|
||||||
<path d="M429.648991,190.816 L430.160991,190.816 L429.648991,190.816 L429.648991,190.816 Z M429.648991,156 L427.088991,156 C419.408991,157.024 411.728991,160.608 404.560991,168.8 L403.024991,170.848 L206.928991,429.92 C198.736991,441.184 197.712991,453.984 204.368991,466.784 C210.512991,478.048 222.288991,485.728 235.600991,485.728 L336.464991,486.24 L304.208991,673.632 C301.648991,689.504 310.352991,705.376 325.200991,712.032 C329.808991,714.08 334.416991,714.592 339.536991,714.592 C349.776991,714.592 358.992991,709.472 366.160991,700.256 L561.744991,419.168 C569.936991,407.904 570.960991,395.104 564.304991,382.304 C557.648991,369.504 547.408991,363.36 533.072991,363.36 L432.208991,363.36 L463.952991,199.008 C464.464991,196.448 464.976991,193.376 464.976991,190.816 C464.976991,171.872 449.104991,156 431.184991,156 L429.648991,156 L429.648991,156 Z"
|
<path d="M429.648991,190.816 L430.160991,190.816 L429.648991,190.816 L429.648991,190.816 Z M429.648991,156 L427.088991,156 C419.408991,157.024 411.728991,160.608 404.560991,168.8 L403.024991,170.848 L206.928991,429.92 C198.736991,441.184 197.712991,453.984 204.368991,466.784 C210.512991,478.048 222.288991,485.728 235.600991,485.728 L336.464991,486.24 L304.208991,673.632 C301.648991,689.504 310.352991,705.376 325.200991,712.032 C329.808991,714.08 334.416991,714.592 339.536991,714.592 C349.776991,714.592 358.992991,709.472 366.160991,700.256 L561.744991,419.168 C569.936991,407.904 570.960991,395.104 564.304991,382.304 C557.648991,369.504 547.408991,363.36 533.072991,363.36 L432.208991,363.36 L463.952991,199.008 C464.464991,196.448 464.976991,193.376 464.976991,190.816 C464.976991,171.872 449.104991,156 431.184991,156 L429.648991,156 L429.648991,156 Z"
|
||||||
id="flash" fill="#FFFFFF"></path>
|
id="flash" fill="#FFFFFF"></path>
|
||||||
</g>
|
</g>
|
||||||
|
|
@ -287,7 +287,7 @@
|
||||||
if (typeof data.adminName !== 'undefined') {
|
if (typeof data.adminName !== 'undefined') {
|
||||||
var url = location.href.replace(/install\.php/, data.adminName);
|
var url = location.href.replace(/install\.php/, data.adminName);
|
||||||
$("#warmtips").html("{:__('Security tips')}" + '<a href="' + url + '">' + url + '</a>').show();
|
$("#warmtips").html("{:__('Security tips')}" + '<a href="' + url + '">' + url + '</a>').show();
|
||||||
$('<a class="btn" href="' + url + '" id="btn-admin" style="background:#18bc9c">' + "{:__('Dashboard')}" + '</a>').appendTo($buttons);
|
$('<a class="btn" href="' + url + '" id="btn-admin" style="background:#4e73df">' + "{:__('Dashboard')}" + '</a>').appendTo($buttons);
|
||||||
}
|
}
|
||||||
localStorage.setItem("fastep", "installed");
|
localStorage.setItem("fastep", "installed");
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ return [
|
||||||
'Please input correct database' => '请输入正确的数据库名',
|
'Please input correct database' => '请输入正确的数据库名',
|
||||||
'Please input correct username' => '用户名只能由3-12位数字、字母、下划线组合',
|
'Please input correct username' => '用户名只能由3-12位数字、字母、下划线组合',
|
||||||
'Please input correct password' => '密码长度必须在6-16位之间,不能包含空格',
|
'Please input correct password' => '密码长度必须在6-16位之间,不能包含空格',
|
||||||
|
'Password is too weak' => '密码太简单,请重新输入',
|
||||||
'The two passwords you entered did not match' => '两次输入的密码不一致',
|
'The two passwords you entered did not match' => '两次输入的密码不一致',
|
||||||
'Please input correct website' => '网站名称输入不正确',
|
'Please input correct website' => '网站名称输入不正确',
|
||||||
'The current version %s is too low, please use PHP 7.1 or higher' => '当前版本%s过低,请使用PHP7.1以上版本',
|
'The current version %s is too low, please use PHP 7.1 or higher' => '当前版本%s过低,请使用PHP7.1以上版本',
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue