Fix delete and preview back links when baseURL is domain root
Former-commit-id: 3507b4b3c04620666850f91d9805c2aba6b0922a [formerly 947d4eabaf424e08e1c98aa83485ecdc103a21ef] [formerly 9f645f718de412acfb25e74bec57520100b3b18f [formerly 5fd7429d5dc1965ee0b1e1be7ac04aaf9f878c0f]] Former-commit-id: d6ce740e97e1e2fa83f75035ac0d8442e3d11b9e [formerly d0399d9beca23a92d4241ed1001923c9903ecba0] Former-commit-id: 1e106c3c4d098ddeac69952f94d03d20c6327ab8
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
<div>
|
||||
<span v-if="search.length === 0 && commands.length === 0">{{ text() }}</span>
|
||||
<ul v-else-if="search.length > 0">
|
||||
<li v-for="s in search"><a :href="'.' + s">.{{ s }}</a></li>
|
||||
<li v-for="s in search"><a :href="'./' + s">./{{ s }}</a></li>
|
||||
</ul>
|
||||
<ul v-else-if="commands.length > 0">
|
||||
<li v-for="c in commands">{{ c }}</li>
|
||||
@@ -92,7 +92,7 @@ export default {
|
||||
let uri = window.location.host + window.location.pathname
|
||||
|
||||
if (this.$store.state.req.kind !== 'listing') {
|
||||
uri = page.removeLastDir(uri)
|
||||
uri = page.removeLastDir(uri) + '/'
|
||||
}
|
||||
|
||||
uri = `${(this.$store.state.ssl ? 'wss:' : 'ws:')}//${uri}`
|
||||
@@ -121,7 +121,10 @@ export default {
|
||||
conn.onopen = () => conn.send(this.value)
|
||||
|
||||
conn.onmessage = (event) => {
|
||||
this.search.push(event.data)
|
||||
let url = event.data
|
||||
if (url[0] === '/') url = url.substring(1)
|
||||
|
||||
this.search.push(url)
|
||||
this.scrollable.scrollTop = this.scrollable.scrollHeight
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user