Browse Source

安装页优化

tags/6.2.5
叙述、别离 1 year ago
parent
commit
56bcf28761
4 changed files with 139 additions and 127 deletions
  1. +131
    -126
      src/install/install.html
  2. +2
    -1
      src/static/web/css/admin.css
  3. +5
    -0
      src/static/web/js/popper.min.js
  4. +1
    -0
      src/static/web/js/popper.min.js.map

+ 131
- 126
src/install/install.html View File

@@ -1,136 +1,141 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
<title>安装DedeV<?php echo $cfg_version_detail;?></title>
<link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
<link rel="shortcut icon" href="../static/web/img/favicon.ico">
<script src="../static/web/js/jquery.min.js"></script>
<script src="../static/web/js/bootstrap.min.js"></script>
<script src="../static/web/js/style.js"></script>
<style>*{margin:0;padding:0;letter-spacing:.6px;box-sizing:border-box}body{line-height:1.5;font:14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#545b62;background:#f5f5f5}a{color:#545b62}h2,legend{font-size:18px;font-weight:600}input,select,.btn{font-size:14px!important}.install-box{margin:0 auto;width:860px}.admin-head{padding:1rem 0;background:#fff}.logo{height:36px}.admin-nav{height:36px;line-height:36px}.admin-nav-a{padding-right:30px}.admin-btn{color:#545b62}.dropdown-menu{min-width:8rem;font-size:14px}.dropdown-item{padding:0 1rem;height:36px;line-height:36px;font-size:14px;color:#545b62!important}@media (max-width:760px){.install-box{width:100%}.admin-head{padding:1rem 15px}.admin-nav-a{display:none!important}}</style>
</head>
<body>
<div class="d-flex flex-md-row align-items-center shadow-sm admin-head mb-5">
<div class="container">
<div class="row">
<div class="col-6 col-md-4 text-left"><img src="../static/web/img/logo.png" title="<?php echo $cfg_soft_enname;?>" class="logo"></div>
<div class="col-6 col-md-8 text-right d-flex justify-content-end admin-nav">
<a href="https://www.dedebiz.com/help" target="_blank" class="admin-nav-a"><i class="fa fa-info-circle"></i> 帮助中心</a>
<a href="https://www.dedebiz.com/service" target="_blank" class="admin-nav-a"><i class="fa fa-handshake-o"></i> 技术服务</a>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
<title>安装DedeV<?php echo $cfg_version_detail;?></title>
<link rel="stylesheet" href="../static/web/css/bootstrap.min.css">
<link rel="stylesheet" href="../static/web/font/css/font-awesome.min.css">
<link rel="shortcut icon" href="../static/web/img/favicon.ico">
<script src="../static/web/js/jquery.min.js"></script>
<script src="../static/web/js/popper.min.js"></script>
<script src="../static/web/js/bootstrap.min.js"></script>
<script src="../static/web/js/style.js"></script>
<style>*{margin:0;padding:0;letter-spacing:.6px;box-sizing:border-box}body{line-height:1.5;font:14px Helvetica Neue,Helvetica,PingFang SC,Tahoma,Arial,sans-serif;color:#545b62;background:#f5f5f5}a{color:#545b62}h2,legend{font-size:18px;font-weight:600}input,select,.btn{font-size:14px!important}.install-box{margin:0 auto;width:860px}.admin-head{padding:1rem 0;background:#fff}.logo{height:36px}.admin-nav{height:36px;line-height:36px}.admin-nav-a{padding-right:30px}.admin-btn{color:#545b62}.dropdown-menu{min-width:8rem;font-size:14px}.dropdown-item{padding:0 1rem;height:36px;line-height:36px;font-size:14px;color:#545b62!important}.fa{font-size:14px!important;color:inherit;cursor:pointer}@media (max-width:760px){.install-box{width:100%}.admin-head{padding:1rem 15px}.admin-nav-a{display:none!important}}</style>
</head>
<body>
<div class="d-flex flex-md-row align-items-center shadow-sm admin-head mb-5">
<div class="container">
<div class="row">
<div class="col-6 col-md-4 text-left"><img src="../static/web/img/logo.png" title="<?php echo $cfg_soft_enname;?>" class="logo"></div>
<div class="col-6 col-md-8 text-right d-flex justify-content-end admin-nav">
<a href="https://www.dedebiz.com/help" target="_blank" class="admin-nav-a"><i class="fa fa-info-circle"></i> 帮助中心</a>
<a href="https://www.dedebiz.com/service" target="_blank" class="admin-nav-a"><i class="fa fa-handshake-o"></i> 技术服务</a>
</div>
</div>
</div>
</div>
</div>
<div class="container install-box">
<div class="row">
<div class="col-md-12">
<?php
if (count($arrMsg) > 0){
foreach($arrMsg as $msg){
?>
<div class="alert alert-warning"><?php echo $msg ?></div>
<?php }}?>
<div class="alert alert-warning">请先阅读<a href="https://www.dedebiz.com/license?from=install" target="_blank" class="text-primary">《站点授权协议》</a></div>
<div class="card shadow-sm mb-3">
<div class="card-header bg-success text-white">
<h2 class="text-center my-0">欢迎使用DedeV<?php echo $cfg_version_detail;?></h2>
</div>
<div class="card-body">
<form action="../install/index.php" method="post" name="form1">
<input type="hidden" name="step" value="2">
<input type="hidden" name="cookieencode" value="<?php echo $rnd_cookieEncode;?>">
<input type="hidden" name="adminmail" value="admin@dedebiz.com">
<legend class="text-success">数据库设置</legend>
<hr>
<div class="form-group">
<label for="dbtype" class="form-label">数据库类型(数据库类型一般为MySQL,类型SQLite用于开发调试,不建议生产中使用)</label>
<select id="dbtype" name="dbtype" class="form-control form-select">
<option value="mysql" selected>MySQL</option>
<?php if(extension_loaded("sqlite3")) {;?><option value="sqlite">SQLite</option><?php }?>
</select>
</div>
<div class="form-group server">
<label for="dbhost" class="form-label">数据库地址</label>
<input type="text" name="dbhost" id="dbhost" class="form-control" placeholder="localhost">
</div>
<div class="form-group server">
<label for="dbuser" class="form-label">数据库用户</label>
<input type="text" name="dbuser" id="dbuser" class="form-control" placeholder="root">
</div>
<div class="form-group server">
<label for="exampleInputPassword1" class="form-label">数据库密码</label>
<input type="text" name="dbpwd" id="dbpwd" class="form-control">
</div>
<div class="form-group">
<label for="dbprefix" class="form-label">数据表前缀(请注意DedeV6数据表前缀默认为<span class="text-danger">biz_</span>)</label>
<input type="text" name="dbprefix" id="dbprefix" class="form-control" placeholder="biz_">
</div>
<div class="form-group">
<label for="dbname" class="form-label">数据库名称</label>
<div class="input-group">
<input id="dbname" name="dbname" type="text" class="form-control" placeholder="DedeBIZ">
<div class="input-group-append"><button type="button" id="btnCheckConnect" class="btn btn-success">检查</button></div>
<div class="container install-box">
<div class="row">
<div class="col-md-12">
<?php
if (count($arrMsg) > 0){
foreach($arrMsg as $msg){
?>
<div class="alert alert-warning"><?php echo $msg ?></div>
<?php }}?>
<div class="alert alert-warning">请先阅读<a href="https://www.dedebiz.com/license?from=install" target="_blank" class="text-primary">《站点授权协议》</a></div>
<div class="card shadow-sm mb-3">
<div class="card-header bg-success text-white">
<h2 class="text-center my-0">安装DedeV<?php echo $cfg_version_detail;?></h2>
</div>
<div class="card-body">
<form action="../install/index.php" method="post" name="form1">
<input type="hidden" name="step" value="2">
<input type="hidden" name="cookieencode" value="<?php echo $rnd_cookieEncode;?>">
<input type="hidden" name="adminmail" value="admin@dedebiz.com">
<legend class="text-success">数据库设置</legend>
<hr>
<div class="form-group">
<label for="dbtype" class="form-label">数据库类型<i class="ml-2 fa fa-question-circle text-warning" data-toggle="tooltip" title="数据库类型一般为MySQL,类型SQLite用于开发调试,不建议生产中使用"></i></label>
<select id="dbtype" name="dbtype" class="form-control form-select">
<option value="mysql" selected>MySQL</option>
<?php if(extension_loaded("sqlite3")) {;?><option value="sqlite">SQLite</option><?php }?>
</select>
</div>
<div class="form-group server">
<label for="dbhost" class="form-label">数据库地址</label>
<input type="text" name="dbhost" id="dbhost" class="form-control" placeholder="localhost">
</div>
<div class="form-group server">
<label for="dbuser" class="form-label">数据库用户</label>
<input type="text" name="dbuser" id="dbuser" class="form-control" placeholder="root">
</div>
<div class="form-group server">
<label for="exampleInputPassword1" class="form-label">数据库密码</label>
<input type="text" name="dbpwd" id="dbpwd" class="form-control">
</div>
<div class="form-group">
<label for="dbprefix" class="form-label">数据表前缀<i class="fa fa-exclamation-circle text-danger ml-2" data-toggle="tooltip" data-html="true" title="请注意DedeV6数据表前缀默认为<span class='text-danger'>biz_</span>"></i></label>
<input type="text" name="dbprefix" id="dbprefix" class="form-control" placeholder="biz_">
</div>
<div class="form-group">
<label for="dbname" class="form-label">数据库名称</label>
<div class="input-group">
<input id="dbname" name="dbname" type="text" class="form-control" placeholder="DedeBIZ">
<div class="input-group-append"><button type="button" id="btnCheckConnect" class="btn btn-success">检查</button></div>
</div>
</div>
</div>
<div id="alertConnect"></div>
<legend class="text-success">站点设置</legend>
<hr>
<div class="form-group">
<label for="baseurl" class="form-label">网站网址</label>
<input type="text" name="baseurl" id="baseurl" class="form-control" placeholder="<?php echo $baseurl;?>">
</div>
<div class="form-group">
<label for="webname" class="form-label">网站名称</label>
<input type="text" name="webname" id="webname" class="form-control" placeholder="某某公司">
</div>
<div class="form-group">
<label for="adminuser" class="form-label">管理员账号(只能用[0-9a-zA-Z_@!.-]以内范围的字符)</label>
<input type="text" name="adminuser" id="adminuser" class="form-control" placeholder="admin">
</div>
<div class="form-group">
<label for="adminpwd" class="form-label">管理员密码</label>
<input type="text" name="adminpwd" id="adminpwd" class="form-control" placeholder="admin">
</div>
<div class="form-group">
<label for="cmspath" class="form-label">安装目录(根目录安装时不必理会)</label>
<input type="text" name="cmspath" id="cmspath" class="form-control" value="<?php echo $basepath;?>" placeholder="<?php echo $basepath;?>">
</div>
<div class="text-right"><button type="submit" class="btn btn-success">安装</button></div>
</form>
<div id="alertConnect"></div>
<legend class="text-success">站点设置</legend>
<hr>
<div class="form-group">
<label for="baseurl" class="form-label">网站网址</label>
<input type="text" name="baseurl" id="baseurl" class="form-control" placeholder="<?php echo $baseurl;?>">
</div>
<div class="form-group">
<label for="webname" class="form-label">网站名称</label>
<input type="text" name="webname" id="webname" class="form-control" placeholder="某某公司">
</div>
<div class="form-group">
<label for="adminuser" class="form-label">管理员账号<i class="fa fa-question-circle text-warning ml-2" data-toggle="tooltip" title="只能用[0-9a-zA-Z_@!.-]以内范围的字符"></i></label>
<input type="text" name="adminuser" id="adminuser" class="form-control" placeholder="admin">
</div>
<div class="form-group">
<label for="adminpwd" class="form-label">管理员密码</label>
<input type="text" name="adminpwd" id="adminpwd" class="form-control" placeholder="admin">
</div>
<div class="form-group">
<label for="cmspath" class="form-label">安装目录<i class="fa fa-question-circle text-warning ml-2" data-toggle="tooltip" title="根目录安装时不必理会"></i></label>
<input type="text" name="cmspath" id="cmspath" class="form-control" value="<?php echo $basepath;?>" placeholder="<?php echo $basepath;?>">
</div>
<div class="text-right"><button type="submit" class="btn btn-success">安装</button></div>
</form>
</div>
</div>
</div>
<div class="col-md-12">
<p>Powered by <a href="https://www.dedebiz.com" target="_blank">DedeBIZ开发团队</a></p>
</div>
</div>
<div class="col-md-12">
<p>Powered by <a href="https://www.dedebiz.com" target="_blank" class="text-dark">DedeBIZ开发团队</a></p>
</div>
</div>
<script>
$("#btnCheckConnect").click(function() {
let dbhost = $('#dbhost').val();
let dbuser = $('#dbuser').val();
let dbpwd = $('#dbpwd').val();
if (!dbhost) dbhost = "localhost";
if (!dbuser) dbuser = "root";
$.get('index.php?step=10&dbhost=' + dbhost + '&dbuser=' + dbuser + '&dbpwd=' + dbpwd,function(rs){
console.log(rs);
let result = JSON.parse(rs);
if (result.code === 200) {
ShowAlert("#alertConnect", result.data, "success", 5000);
} else {
ShowAlert("#alertConnect", result.data, "danger", 5000);
}
})
})
$("#dbtype").change(function () {
if ($(this).val() === 'sqlite') {
$(".form-group.server").hide();
} else {
$(".form-group.server").show();
}
})
</script>
</body>
<script>
$("#btnCheckConnect").click(function() {
let dbhost = $('#dbhost').val();
let dbuser = $('#dbuser').val();
let dbpwd = $('#dbpwd').val();
if (!dbhost) dbhost = "localhost";
if (!dbuser) dbuser = "root";
$.get('index.php?step=10&dbhost=' + dbhost + '&dbuser=' + dbuser + '&dbpwd=' + dbpwd,
function(rs) {
console.log(rs);
let result = JSON.parse(rs);
if (result.code === 200) {
ShowAlert("#alertConnect", result.data, "success", 5000)
} else {
ShowAlert("#alertConnect", result.data, "danger", 5000)
}
})
});
$("#dbtype").change(function() {
if ($(this).val() === 'sqlite') {
$(".form-group.server").hide()
} else {
$(".form-group.server").show()
}
});
$(function() {
$('[data-toggle="tooltip"]').tooltip()
});
</script>
</body>
</html>

+ 2
- 1
src/static/web/css/admin.css View File

@@ -525,7 +525,8 @@ span.page-link {
}
.fa {
font-size:14px!important;
color:inherit
color:inherit;
cursor:pointer
}
.admin-win {
background:#f5f5f5;


+ 5
- 0
src/static/web/js/popper.min.js
File diff suppressed because it is too large
View File


+ 1
- 0
src/static/web/js/popper.min.js.map
File diff suppressed because it is too large
View File


Loading…
Cancel
Save