Fix #5073
This commit is contained in:
parent
7ffe559525
commit
5f0ac0f46a
@ -5,6 +5,9 @@
|
|||||||
<span class="hostname">{{ hostname }}</span>
|
<span class="hostname">{{ hostname }}</span>
|
||||||
<span class="port" v-if="port != ''">:{{ port }}</span>
|
<span class="port" v-if="port != ''">:{{ port }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="pathname === '/' && self">
|
||||||
|
<span class="self">{{ hostname }}</span>
|
||||||
|
</template>
|
||||||
<span class="pathname" v-if="pathname != ''">{{ self ? pathname.substr(1) : pathname }}</span>
|
<span class="pathname" v-if="pathname != ''">{{ self ? pathname.substr(1) : pathname }}</span>
|
||||||
<span class="query">{{ query }}</span>
|
<span class="query">{{ query }}</span>
|
||||||
<span class="hash">{{ hash }}</span>
|
<span class="hash">{{ hash }}</span>
|
||||||
@ -22,6 +25,7 @@ export default Vue.extend({
|
|||||||
data() {
|
data() {
|
||||||
const isSelf = this.url.startsWith(local);
|
const isSelf = this.url.startsWith(local);
|
||||||
const hasRoute = isSelf && (
|
const hasRoute = isSelf && (
|
||||||
|
(this.url.substr(local.length) === '/') ||
|
||||||
this.url.substr(local.length).startsWith('/@') ||
|
this.url.substr(local.length).startsWith('/@') ||
|
||||||
this.url.substr(local.length).startsWith('/notes/') ||
|
this.url.substr(local.length).startsWith('/notes/') ||
|
||||||
this.url.substr(local.length).startsWith('/pages/'));
|
this.url.substr(local.length).startsWith('/pages/'));
|
||||||
@ -54,19 +58,28 @@ export default Vue.extend({
|
|||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
.mk-url
|
.mk-url
|
||||||
word-break break-all
|
word-break break-all
|
||||||
|
|
||||||
> [data-icon]
|
> [data-icon]
|
||||||
padding-left 2px
|
padding-left 2px
|
||||||
font-size .9em
|
font-size .9em
|
||||||
font-weight 400
|
font-weight 400
|
||||||
font-style normal
|
font-style normal
|
||||||
|
|
||||||
|
> .self
|
||||||
|
font-weight bold
|
||||||
|
|
||||||
> .schema
|
> .schema
|
||||||
opacity 0.5
|
opacity 0.5
|
||||||
|
|
||||||
> .hostname
|
> .hostname
|
||||||
font-weight bold
|
font-weight bold
|
||||||
|
|
||||||
> .pathname
|
> .pathname
|
||||||
opacity 0.8
|
opacity 0.8
|
||||||
|
|
||||||
> .query
|
> .query
|
||||||
opacity 0.5
|
opacity 0.5
|
||||||
|
|
||||||
> .hash
|
> .hash
|
||||||
font-style italic
|
font-style italic
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user