Use string interpolation
This commit is contained in:
@@ -105,9 +105,9 @@ export default Vue.extend({
|
||||
computed: {
|
||||
draftId(): string {
|
||||
return this.renote
|
||||
? 'renote:' + this.renote.id
|
||||
? `renote:${this.renote.id}`
|
||||
: this.reply
|
||||
? 'reply:' + this.reply.id
|
||||
? `reply:${this.reply.id}`
|
||||
: 'note';
|
||||
},
|
||||
|
||||
@@ -229,7 +229,7 @@ export default Vue.extend({
|
||||
navigator.geolocation.getCurrentPosition(pos => {
|
||||
this.geo = pos.coords;
|
||||
}, err => {
|
||||
alert('%i18n:@error%: ' + err.message);
|
||||
alert(`%i18n:@error%: ${err.message}`);
|
||||
}, {
|
||||
enableHighAccuracy: true
|
||||
});
|
||||
|
@@ -82,7 +82,7 @@ export default Vue.extend({
|
||||
search() {
|
||||
const query = window.prompt('%i18n:@search%');
|
||||
if (query == null || query == '') return;
|
||||
this.$router.push('/search?q=' + encodeURIComponent(query));
|
||||
this.$router.push(`/search?q=${encodeURIComponent(query)}`);
|
||||
},
|
||||
onReversiInvited() {
|
||||
this.hasGameInvitation = true;
|
||||
|
@@ -80,7 +80,7 @@ export default Vue.extend({
|
||||
|
||||
if (!silent) {
|
||||
// Rewrite URL
|
||||
history.pushState(null, title, '/i/drive/folder/' + folder.id);
|
||||
history.pushState(null, title, `/i/drive/folder/${folder.id}`);
|
||||
}
|
||||
|
||||
document.title = title;
|
||||
@@ -93,7 +93,7 @@ export default Vue.extend({
|
||||
|
||||
if (!silent) {
|
||||
// Rewrite URL
|
||||
history.pushState(null, title, '/i/drive/file/' + file.id);
|
||||
history.pushState(null, title, `/i/drive/file/${file.id}`);
|
||||
}
|
||||
|
||||
document.title = title;
|
||||
|
@@ -49,7 +49,7 @@ export default Vue.extend({
|
||||
this.user = user;
|
||||
this.fetching = false;
|
||||
|
||||
document.title = '%i18n:@followers-of%'.replace('{}', this.name) + ' | ' + (this as any).os.instanceName;
|
||||
document.title = `${'%i18n:@followers-of%'.replace('{}', this.name)} | ${(this as any).os.instanceName}`;
|
||||
});
|
||||
},
|
||||
onLoaded() {
|
||||
|
@@ -48,7 +48,7 @@ export default Vue.extend({
|
||||
this.user = user;
|
||||
this.fetching = false;
|
||||
|
||||
document.title = '%i18n:@followers-of%'.replace('{}', this.name) + ' | ' + (this as any).os.instanceName;
|
||||
document.title = `${'%i18n:@followers-of%'.replace('{}', this.name)} | ${(this as any).os.instanceName}`;
|
||||
});
|
||||
},
|
||||
onLoaded() {
|
||||
|
@@ -16,10 +16,10 @@ export default Vue.extend({
|
||||
methods: {
|
||||
nav(game, actualNav) {
|
||||
if (actualNav) {
|
||||
this.$router.push('/reversi/' + game.id);
|
||||
this.$router.push(`/reversi/${game.id}`);
|
||||
} else {
|
||||
// TODO: https://github.com/vuejs/vue-router/issues/703
|
||||
this.$router.push('/reversi/' + game.id);
|
||||
this.$router.push(`/reversi/${game.id}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -2,7 +2,7 @@
|
||||
<mk-ui>
|
||||
<span slot="header">%fa:cog%%i18n:@settings%</span>
|
||||
<main :data-darkmode="$store.state.device.darkmode">
|
||||
<div class="signin-as" v-html="'%i18n:@signed-in-as%'.replace('{}', '<b>' + name + '</b>')"></div>
|
||||
<div class="signin-as" v-html="'%i18n:@signed-in-as%'.replace('{}', `<b>${name}</b>`)"></div>
|
||||
|
||||
<div>
|
||||
<x-profile/>
|
||||
|
@@ -43,7 +43,7 @@ export default Vue.extend({
|
||||
title
|
||||
});
|
||||
|
||||
this.$router.push('/i/lists/' + list.id);
|
||||
this.$router.push(`/i/lists/${list.id}`);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@@ -107,7 +107,7 @@ export default Vue.extend({
|
||||
this.fetching = false;
|
||||
|
||||
Progress.done();
|
||||
document.title = Vue.filter('userName')(this.user) + ' | ' + (this as any).os.instanceName;
|
||||
document.title = `${Vue.filter('userName')(this.user)} | ${(this as any).os.instanceName}`;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user