From c796ed3849e3cd5b28cc8234edc71bbedafbc7da Mon Sep 17 00:00:00 2001 From: FuXiaoHei Date: Thu, 27 Mar 2014 20:39:18 +0800 Subject: [PATCH] update install page ui --- public/js/app.js | 21 +++++ templates/install.tmpl | 181 ++++++++++++++++++++++++++++++++++------- 2 files changed, 171 insertions(+), 31 deletions(-) diff --git a/public/js/app.js b/public/js/app.js index 8b0e5cd62..5bebeaf87 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -352,6 +352,24 @@ function initRepository() { }()); } +function initInstall(){ + $('#install-database').on("change", function () { + var val = $(this).val(); + if (val != "sqlite") { + $('.server-sql').show(); + $('.sqlite-setting').addClass("hide"); + if (val == "pgsql") { + $('.pgsql-setting').removeClass("hide"); + } else { + $('.pgsql-setting').addClass("hide"); + } + } else { + $('.server-sql').hide(); + $('.sqlite-setting').removeClass("hide"); + } + }); +} + (function ($) { $(function () { initCore(); @@ -365,5 +383,8 @@ function initRepository() { if ($('.repo-nav').length) { initRepository(); } + if($('#install-card').length){ + initInstall(); + } }); })(jQuery); diff --git a/templates/install.tmpl b/templates/install.tmpl index 849491f89..b2ae3bac2 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -2,44 +2,81 @@
{{.CsrfTokenHtml}} -

Install Steps

+

Install Steps For First Running

+
{{.ErrorMsg}}

GoGits need MySQL or PostgreSQL server

-
- +
+ +
- +
-
- -
- +
+
+ + +
+ +
+
+
+ + +
+ +
+
+
+ + +
+ +
+
+
+ + +
+ +
+
+
+ + +
+ + +

Recommend use INNODB engine with utf8_general_ci charset.

+
+
+
+ +
+ +

Use SSL protocol to connect PostgreSQL.

+
-
- -
- -
-
-
- -
- -
-
-
- -
- -

Recommend use INNODB engine with utf8_general_ci charset.

+
+
+ + +
+ +

The file path of SQLite database.

+
- +
@@ -47,24 +84,106 @@

General settings for GoGits

-
+
+
+

The git copy of each repository is saved in this directory.

-
- +
+ +
+

The user has access to visit and run GoGits.

+
-
- Install GoGits + +

Admin Account Settings

+ +
+ + +
+ +
+
+ + +
+ +
+
+ +
+ +
+ + +
+ + +
{{template "base/footer" .}} \ No newline at end of file