You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/templates
Giteabot 1edb57eda9
Fix various bugs for "install" page (#23194) (#23286)
Backport #23194

## TLDR

* Fix the broken page / broken image problem when click "Install"
* Fix the Password Hash Algorithm display problem for #22942
* Close #20089
* Close #23183
* Close #23184

## Details

### The broken page / broken image problem when clicking on "Install"
(Redirect failed after install - #23184)

Before: when clicking on "install", all new requests will fail, because the
server has been restarted. Users just see a broken page with broken
images, sometimes the server is not ready but the user would have been
redirect to "/user/login" page, then the users see a new broken page
(connection refused or something wrong ...)


After: only check InstallLock=true for necessary handlers, and sleep for
a while before restarting the server, then the browser has enough time
to load the "post-install" page. And there is a script to check whether
"/user/login" is ready, the user will only be redirected to the login
page when the server is ready.

### During new instance setup fill 'Gitea Base URL' with
window.location.origin - #20089

If the "app_url" input contains `localhost` (the default value from
config), use current window's location href as the `app_url` (aka
ROOT_URL)


### Fix the Password Hash Algorithm display problem for "Provide the
ability to set password hash algorithm parameters #22942"

Before: the UI shows `pbkdf2$50000$50`

<details>


![image](https://user-images.githubusercontent.com/2114189/221917143-e1e54798-1698-4fee-a18d-00c48081fc39.png)

</details>

After: the UI shows `pbkdf2`

<details>


![image](https://user-images.githubusercontent.com/2114189/221916999-97a15be8-2ebb-4a01-bf93-dac18e354fcc.png)

</details>



### GET data: net::ERR_INVALID_URL #23183

Cause by empty `data:` in `<link rel="manifest"
href="data:{{.ManifestData}}">`

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
2 years ago
..
admin Fix missed `.hide` class (#23208) (#23237) 2 years ago
api/packages/pypi Add Package Registry (#16510) 3 years ago
base Fix various bugs for "install" page (#23194) (#23286) 2 years ago
code Remove Fomantic-UI's `.hidden` CSS class for menu elements (#22895) 2 years ago
custom
explore Add context cache as a request level cache (#22294) 2 years ago
mail Revert relative links to absolute links in mail templates (#23267) (#23269) 2 years ago
org Hide 2FA status from other members in organization members list (#22999) 2 years ago
package Fix nil context in RenderMarkdownToHtml (#23092) (#23108) 2 years ago
projects Scoped labels (#22585) 2 years ago
repo Fix missed `.hide` class (#23208) (#23237) 2 years ago
shared Fix no user listed in org teams page (#22979) 2 years ago
status Move helpers to be prefixed with `gt-` (#22879) 2 years ago
swagger Add scopes to API to create token and display them (#22989) 2 years ago
user Fix incorrect checkbox behaviors in the dashboard repolist's filter (#23147) (#23205) 2 years ago
home.tmpl Add main landmark to templates and adjust titles (#22670) 2 years ago
install.tmpl Refactor hiding-methods, remove jQuery show/hide, remove `.hide` class, remove inline style=display:none (#22950) 2 years ago
post-install.tmpl Fix various bugs for "install" page (#23194) (#23286) 2 years ago