diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2023-07-10 06:43:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-09 22:43:37 +0000 |
commit | fa0b5b14c2faa6a5f76bb2e7bc9241a5e4354189 (patch) | |
tree | 885a32e803e934883ca047116441f56ac9435b5b /templates/install.tmpl | |
parent | 61e0d1a767e1a1a509de9de4aff42bdb79cc6443 (diff) | |
download | gitea-fa0b5b14c2faa6a5f76bb2e7bc9241a5e4354189.tar.gz gitea-fa0b5b14c2faa6a5f76bb2e7bc9241a5e4354189.zip |
Make "install page" respect environment config (#25648)
Replace #25580
Fix #19453
The problem was: when users set "GITEA__XXX__YYY" , the "install page"
doesn't respect it.
So, to make the result consistent and avoid surprising end users, now
the "install page" also writes the environment variables to the config
file.
And, to make things clear, there are enough messages on the UI to tell
users what will happen.
There are some necessary/related changes to `environment-to-ini.go`:
* The "--clear" flag is removed and it was incorrectly written there.
The "clear" operation should be done if INSTALL_LOCK=true
* The "--prefix" flag is removed because it's never used, never
documented and it only causes inconsistent behavior.
![image](https://github.com/go-gitea/gitea/assets/2114189/12778ee4-3fb5-4664-a73a-41ebbd77cd5b)
Diffstat (limited to 'templates/install.tmpl')
-rw-r--r-- | templates/install.tmpl | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/templates/install.tmpl b/templates/install.tmpl index 48eabe8e74..b5caab1489 100644 --- a/templates/install.tmpl +++ b/templates/install.tmpl @@ -1,6 +1,6 @@ {{template "base/head" .}} <div role="main" aria-label="{{.Title}}" class="page-content install"> - <div class="ui middle very relaxed page grid"> + <div class="ui grid install-config-container"> <div class="sixteen wide center aligned centered column"> <h3 class="ui top attached header"> {{.locale.Tr "install.title"}} @@ -149,7 +149,7 @@ </div> <div class="inline field"> <div class="ui checkbox"> - <label for="enable_update_checker">{{.locale.Tr "install.enable_update_checker"}}</label> + <label>{{.locale.Tr "install.enable_update_checker"}}</label> <input name="enable_update_checker" type="checkbox"> </div> <span class="help">{{.locale.Tr "install.enable_update_checker_helper"}}</span> @@ -160,7 +160,7 @@ <!-- Email --> <details class="optional field"> - <summary class="title gt-py-3{{if .Err_SMTP}} text red{{end}}"> + <summary class="right-content gt-py-3{{if .Err_SMTP}} text red{{end}}"> {{.locale.Tr "install.email_title"}} </summary> <div class="inline field"> @@ -200,7 +200,7 @@ <!-- Server and other services --> <details class="optional field"> - <summary class="title gt-py-3{{if .Err_Services}} text red{{end}}"> + <summary class="right-content gt-py-3{{if .Err_Services}} text red{{end}}"> {{.locale.Tr "install.server_service_title"}} </summary> <div class="inline field"> @@ -298,7 +298,7 @@ <!-- Admin --> <details class="optional field"> - <summary class="title gt-py-3{{if .Err_Admin}} text red{{end}}"> + <summary class="right-content gt-py-3{{if .Err_Admin}} text red{{end}}"> {{.locale.Tr "install.admin_title"}} </summary> <p class="center">{{.locale.Tr "install.admin_setting_desc"}}</p> @@ -320,10 +320,27 @@ </div> </details> + {{if .EnvConfigKeys}} + <!-- Environment Config --> + <h4 class="ui dividing header">{{.locale.Tr "install.env_config_keys"}}</h4> + <div class="inline field"> + <div class="right-content"> + {{.locale.Tr "install.env_config_keys_prompt"}} + </div> + <div class="right-content gt-mt-3"> + {{range .EnvConfigKeys}}<span class="ui label">{{.}}</span>{{end}} + </div> + </div> + {{end}} + <div class="divider"></div> <div class="inline field"> - <label></label> - <button class="ui primary button">{{.locale.Tr "install.install_btn_confirm"}}</button> + <div class="right-content"> + These configuration options will be written into: {{.CustomConfFile}} + </div> + <div class="right-content gt-mt-3"> + <button class="ui primary button">{{.locale.Tr "install.install_btn_confirm"}}</button> + </div> </div> </form> </div> |