mirror of
https://github.com/filebrowser/filebrowser.git
synced 2024-06-07 23:00:43 +00:00
fix settings link
This commit is contained in:
parent
6b87fc2485
commit
489db64055
@ -1,7 +1,8 @@
|
|||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', event => {
|
document.addEventListener('DOMContentLoaded', event => {
|
||||||
document.getElementById('logout').insertAdjacentHTML('beforebegin', `<a href="/admin/settings/">
|
let link = document.querySelector('header > div:first-child a:first-child').getAttribute('href') + "/settings/"
|
||||||
|
document.getElementById('logout').insertAdjacentHTML('beforebegin', `<a href="${link}">
|
||||||
<div class="action">
|
<div class="action">
|
||||||
<i class="material-icons">settings</i>
|
<i class="material-icons">settings</i>
|
||||||
</div>
|
</div>
|
||||||
|
2
hugo.go
2
hugo.go
@ -69,7 +69,7 @@ func (h Hugo) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) {
|
|||||||
frontmatter = "toml"
|
frontmatter = "toml"
|
||||||
}
|
}
|
||||||
|
|
||||||
http.Redirect(w, r, h.Config.BaseURL+"/config."+frontmatter, http.StatusTemporaryRedirect)
|
http.Redirect(w, r, h.FileManager.Configs[0].AbsoluteURL+"/config."+frontmatter, http.StatusTemporaryRedirect)
|
||||||
return 0, nil
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user