#32 fix social media ucinają gwiazdkę z `/on*`
This commit is contained in:
parent
cbf360fcab
commit
e2ff62303c
|
@ -77,7 +77,7 @@
|
||||||
templates: templates,
|
templates: templates,
|
||||||
getTemplate: getTemplate,
|
getTemplate: getTemplate,
|
||||||
|
|
||||||
selectedTemplate: buildTemplate(templates, this.$route.path.substr(1)),
|
selectedTemplate: buildTemplate(templates, this.$route.path.substr(1).replace(/\/$/, '')),
|
||||||
|
|
||||||
counter: 0,
|
counter: 0,
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const title = 'Moje zaimki to: ' + this.selectedTemplate.name();
|
const title = 'Moje zaimki to: ' + this.selectedTemplate.name();
|
||||||
const banner = `${process.env.baseUrl}/banner${this.$route.path}.png`;
|
const banner = `${process.env.baseUrl}/banner${this.$route.path.replace(/\/$/, '')}.png`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
title: title,
|
title: title,
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
Wybierz sposród najpopularniejszych:
|
Wybierz sposród najpopularniejszych:
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<nuxt-link v-for="(template, pronoun) in templates" :to="'/' + pronoun" :key="pronoun" class="btn btn-outline-primary m-2 btn-md-lg">
|
<nuxt-link v-for="(template, pronoun) in templates" :to="addSlash('/' + pronoun)" :key="pronoun" class="btn btn-outline-primary m-2 btn-md-lg">
|
||||||
{{template.name()}}
|
{{template.name()}}
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</section>
|
</section>
|
||||||
|
@ -247,14 +247,14 @@
|
||||||
if (!this.selectedTemplate.pronoun()) {
|
if (!this.selectedTemplate.pronoun()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return process.env.baseUrl + '/' + (this.usedBaseEquals ? this.usedBase : this.longLink);
|
return this.addSlash(process.env.baseUrl + '/' + (this.usedBaseEquals ? this.usedBase : this.longLink));
|
||||||
},
|
},
|
||||||
linkMultiple() {
|
linkMultiple() {
|
||||||
if (!this.multiple.length) {
|
if (!this.multiple.length) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
return process.env.baseUrl + '/' + this.multiple.join('&');
|
return this.addSlash(process.env.baseUrl + '/' + this.multiple.join('&'));
|
||||||
},
|
},
|
||||||
sources() {
|
sources() {
|
||||||
return getSources(this.selectedTemplate);
|
return getSources(this.selectedTemplate);
|
||||||
|
@ -268,6 +268,9 @@
|
||||||
} else {
|
} else {
|
||||||
this.multiple.push(name);
|
this.multiple.push(name);
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
addSlash(link) {
|
||||||
|
return link + (link.substr(link.length - 1) === '*' ? '/' : '');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue