summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-08-07 13:25:50 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-08-07 13:25:50 +0900
commit7bd33ecc72c7cbb53a15f3a74f7548564c75fa6b (patch)
tree19c0e4d1771baf02c3e7bb59574262f2f949cc8f /src
parent:pizza: (diff)
downloadsharkey-7bd33ecc72c7cbb53a15f3a74f7548564c75fa6b.tar.gz
sharkey-7bd33ecc72c7cbb53a15f3a74f7548564c75fa6b.tar.bz2
sharkey-7bd33ecc72c7cbb53a15f3a74f7548564c75fa6b.zip
:v:
Diffstat (limited to 'src')
-rw-r--r--src/client/app/auth/script.ts4
-rw-r--r--src/client/app/common/views/components/messaging-room.vue2
-rw-r--r--src/client/app/common/views/pages/follow.vue1
-rw-r--r--src/client/app/desktop/views/components/notes.vue8
-rw-r--r--src/client/app/desktop/views/components/notifications.vue2
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.notes.vue2
-rw-r--r--src/client/app/desktop/views/pages/deck/deck.notifications.vue2
-rw-r--r--src/client/app/desktop/views/pages/home-customize.vue4
-rw-r--r--src/client/app/desktop/views/pages/home.vue3
-rw-r--r--src/client/app/desktop/views/pages/share.vue4
-rw-r--r--src/client/app/desktop/views/pages/user/user.vue1
-rw-r--r--src/client/app/desktop/views/pages/welcome.vue10
-rw-r--r--src/client/app/dev/views/ui.vue2
-rw-r--r--src/client/app/mobile/views/components/notes.vue5
-rw-r--r--src/client/app/mobile/views/components/notifications.vue2
-rw-r--r--src/client/app/mobile/views/components/ui.header.vue4
-rw-r--r--src/client/app/mobile/views/pages/drive.vue9
-rw-r--r--src/client/app/mobile/views/pages/favorites.vue3
-rw-r--r--src/client/app/mobile/views/pages/followers.vue3
-rw-r--r--src/client/app/mobile/views/pages/following.vue3
-rw-r--r--src/client/app/mobile/views/pages/games/reversi.vue3
-rw-r--r--src/client/app/mobile/views/pages/home.vue3
-rw-r--r--src/client/app/mobile/views/pages/messaging-room.vue3
-rw-r--r--src/client/app/mobile/views/pages/messaging.vue3
-rw-r--r--src/client/app/mobile/views/pages/note.vue3
-rw-r--r--src/client/app/mobile/views/pages/notifications.vue2
-rw-r--r--src/client/app/mobile/views/pages/received-follow-requests.vue2
-rw-r--r--src/client/app/mobile/views/pages/search.vue3
-rw-r--r--src/client/app/mobile/views/pages/settings.vue2
-rw-r--r--src/client/app/mobile/views/pages/share.vue4
-rw-r--r--src/client/app/mobile/views/pages/user-lists.vue2
-rw-r--r--src/client/app/mobile/views/pages/user.vue3
-rw-r--r--src/client/app/mobile/views/pages/welcome.vue4
-rw-r--r--src/client/app/mobile/views/pages/widgets.vue3
-rw-r--r--src/config/load.ts2
35 files changed, 69 insertions, 47 deletions
diff --git a/src/client/app/auth/script.ts b/src/client/app/auth/script.ts
index bdfdf70be3..64ab6536db 100644
--- a/src/client/app/auth/script.ts
+++ b/src/client/app/auth/script.ts
@@ -8,14 +8,14 @@ import VueRouter from 'vue-router';
import './style.styl';
import init from '../init';
-
import Index from './views/index.vue';
+import * as config from '../config';
/**
* init
*/
init(launch => {
- document.title = '%i18n:common.name% | %i18n:common.application-authorization%';
+ document.title = `${config.name} | %i18n:common.application-authorization%`;
// Init router
const router = new VueRouter({
diff --git a/src/client/app/common/views/components/messaging-room.vue b/src/client/app/common/views/components/messaging-room.vue
index e4cc30ded9..30143b4f1d 100644
--- a/src/client/app/common/views/components/messaging-room.vue
+++ b/src/client/app/common/views/components/messaging-room.vue
@@ -61,7 +61,7 @@ export default Vue.extend({
const date = new Date(message.createdAt).getDate();
const month = new Date(message.createdAt).getMonth() + 1;
message._date = date;
- message._datetext = `${month}月 ${date}日`;
+ message._datetext = '%i18n:common.month-and-day%'.replace('{month}', month.toString()).replace('{day}', date.toString());
return message;
});
},
diff --git a/src/client/app/common/views/pages/follow.vue b/src/client/app/common/views/pages/follow.vue
index e1b5b1f120..13d855d20a 100644
--- a/src/client/app/common/views/pages/follow.vue
+++ b/src/client/app/common/views/pages/follow.vue
@@ -71,7 +71,6 @@ export default Vue.extend({
this.user = user;
this.fetching = false;
Progress.done();
- document.title = getUserName(this.user) + ' | %i18n:common.name%';
});
},
diff --git a/src/client/app/desktop/views/components/notes.vue b/src/client/app/desktop/views/components/notes.vue
index 0ec2f16dbc..02167ef85c 100644
--- a/src/client/app/desktop/views/components/notes.vue
+++ b/src/client/app/desktop/views/components/notes.vue
@@ -33,7 +33,7 @@
<script lang="ts">
import Vue from 'vue';
-import { url } from '../../../config';
+import * as config from '../../../config';
import getNoteSummary from '../../../../../misc/get-note-summary';
import XNote from './notes.note.vue';
@@ -69,7 +69,7 @@ export default Vue.extend({
const date = new Date(note.createdAt).getDate();
const month = new Date(note.createdAt).getMonth() + 1;
note._date = date;
- note._datetext = `${month}月 ${date}日`;
+ note._datetext = '%i18n:common.month-and-day%'.replace('{month}', month.toString()).replace('{day}', date.toString());
return note;
});
}
@@ -149,7 +149,7 @@ export default Vue.extend({
// サウンドを再生する
if (this.$store.state.device.enableSounds && !silent) {
- const sound = new Audio(`${url}/assets/post.mp3`);
+ const sound = new Audio(`${config.url}/assets/post.mp3`);
sound.volume = this.$store.state.device.soundVolume;
sound.play();
}
@@ -187,7 +187,7 @@ export default Vue.extend({
clearNotification() {
this.unreadCount = 0;
- document.title = '%i18n:common.name%';
+ document.title = config.name;
},
onVisibilitychange() {
diff --git a/src/client/app/desktop/views/components/notifications.vue b/src/client/app/desktop/views/components/notifications.vue
index b291e1f54a..bfe71903e4 100644
--- a/src/client/app/desktop/views/components/notifications.vue
+++ b/src/client/app/desktop/views/components/notifications.vue
@@ -130,7 +130,7 @@ export default Vue.extend({
const date = new Date(notification.createdAt).getDate();
const month = new Date(notification.createdAt).getMonth() + 1;
notification._date = date;
- notification._datetext = `${month}月 ${date}日`;
+ notification._datetext = '%i18n:common.month-and-day%'.replace('{month}', month.toString()).replace('{day}', date.toString());
return notification;
});
}
diff --git a/src/client/app/desktop/views/pages/deck/deck.notes.vue b/src/client/app/desktop/views/pages/deck/deck.notes.vue
index a5ed45b64c..3578e17287 100644
--- a/src/client/app/desktop/views/pages/deck/deck.notes.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.notes.vue
@@ -72,7 +72,7 @@ export default Vue.extend({
const date = new Date(note.createdAt).getDate();
const month = new Date(note.createdAt).getMonth() + 1;
note._date = date;
- note._datetext = `${month}月 ${date}日`;
+ note._datetext = '%i18n:common.month-and-day%'.replace('{month}', month.toString()).replace('{day}', date.toString());
return note;
});
}
diff --git a/src/client/app/desktop/views/pages/deck/deck.notifications.vue b/src/client/app/desktop/views/pages/deck/deck.notifications.vue
index 10c06b0ad2..fcb74b9140 100644
--- a/src/client/app/desktop/views/pages/deck/deck.notifications.vue
+++ b/src/client/app/desktop/views/pages/deck/deck.notifications.vue
@@ -51,7 +51,7 @@ export default Vue.extend({
const date = new Date(notification.createdAt).getDate();
const month = new Date(notification.createdAt).getMonth() + 1;
notification._date = date;
- notification._datetext = `${month}月 ${date}日`;
+ notification._datetext = '%i18n:common.month-and-day%'.replace('{month}', month.toString()).replace('{day}', date.toString());
return notification;
});
}
diff --git a/src/client/app/desktop/views/pages/home-customize.vue b/src/client/app/desktop/views/pages/home-customize.vue
index ffdcf39fe2..4318e89821 100644
--- a/src/client/app/desktop/views/pages/home-customize.vue
+++ b/src/client/app/desktop/views/pages/home-customize.vue
@@ -4,9 +4,11 @@
<script lang="ts">
import Vue from 'vue';
+import * as config from '../../../config';
+
export default Vue.extend({
mounted() {
- document.title = '%i18n:common.name% - %i18n:@title%';
+ document.title = `${config.name} - %i18n:@title%`;
}
});
</script>
diff --git a/src/client/app/desktop/views/pages/home.vue b/src/client/app/desktop/views/pages/home.vue
index 0c42e42bd2..3d3c24bfa4 100644
--- a/src/client/app/desktop/views/pages/home.vue
+++ b/src/client/app/desktop/views/pages/home.vue
@@ -7,6 +7,7 @@
<script lang="ts">
import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
+import * as config from '../../../config';
export default Vue.extend({
props: {
@@ -16,7 +17,7 @@ export default Vue.extend({
}
},
mounted() {
- document.title = '%i18n:common.name%';
+ document.title = config.name;
Progress.start();
},
diff --git a/src/client/app/desktop/views/pages/share.vue b/src/client/app/desktop/views/pages/share.vue
index f5f5c4e184..4a7bdb14cd 100644
--- a/src/client/app/desktop/views/pages/share.vue
+++ b/src/client/app/desktop/views/pages/share.vue
@@ -1,6 +1,6 @@
<template>
<div class="pptjhabgjtt7kwskbfv4y3uml6fpuhmr">
- <h1>{{'%i18n:@share-with%'.split("{}")[0] + '%i18n:common.name%' + '%i18n:@share-with%'.split("{}")[1]}}</h1>
+ <h1>{{ '%i18n:@share-with%'.replace('{}', name) }}</h1>
<div>
<mk-signin v-if="!$store.getters.isSignedIn"/>
<mk-post-form v-else-if="!posted" :initial-text="text" :instant="true" @posted="posted = true"/>
@@ -12,10 +12,12 @@
<script lang="ts">
import Vue from 'vue';
+import * as config from '../../../config';
export default Vue.extend({
data() {
return {
+ name: config.name,
posted: false,
text: new URLSearchParams(location.search).get('text')
};
diff --git a/src/client/app/desktop/views/pages/user/user.vue b/src/client/app/desktop/views/pages/user/user.vue
index 1a83f81342..300fd68f06 100644
--- a/src/client/app/desktop/views/pages/user/user.vue
+++ b/src/client/app/desktop/views/pages/user/user.vue
@@ -68,7 +68,6 @@ export default Vue.extend({
this.user = user;
this.fetching = false;
Progress.done();
- document.title = getUserName(this.user) + ' | %i18n:common.name%';
});
},
diff --git a/src/client/app/desktop/views/pages/welcome.vue b/src/client/app/desktop/views/pages/welcome.vue
index 9543a55b9a..a01b44fc73 100644
--- a/src/client/app/desktop/views/pages/welcome.vue
+++ b/src/client/app/desktop/views/pages/welcome.vue
@@ -8,7 +8,7 @@
<div class="body" :style="{ backgroundImage: `url('${ welcomeBgUrl }')` }">
<div class="container">
<div class="info">
- <span>%i18n:common.name% <b>{{ host }}</b></span>
+ <span><b>{{ host }}</b></span>
<span class="stats" v-if="stats">
<span>%fa:user% {{ stats.originalUsersCount | number }}</span>
<span>%fa:pencil-alt% {{ stats.originalNotesCount | number }}</span>
@@ -16,9 +16,9 @@
</div>
<main>
<div class="about">
- <h1 v-if="name">{{ name }}</h1>
- <h1 v-else><img :src="$store.state.device.darkmode ? 'assets/title.dark.svg' : 'assets/title.light.svg'" alt="%i18n:common.name%"></h1>
- <p class="powerd-by" v-if="name">%i18n:@powered-by-misskey%</p>
+ <h1 v-if="name != 'Misskey'">{{ name }}</h1>
+ <h1 v-else><img :src="$store.state.device.darkmode ? 'assets/title.dark.svg' : 'assets/title.light.svg'" :alt="name"></h1>
+ <p class="powerd-by" v-if="name != 'Misskey'">%i18n:@powered-by-misskey%</p>
<p class="desc" v-html="description || '%i18n:common.about%'"></p>
<a ref="signup" @click="signup">📦 %i18n:@signup%</a>
</div>
@@ -32,7 +32,7 @@
<mk-nav class="nav"/>
</div>
<mk-forkit class="forkit"/>
- <img src="assets/title.dark.svg" alt="%i18n:common.name%">
+ <img src="assets/title.dark.svg" :alt="name">
</div>
<div class="tl">
<mk-welcome-timeline :max="20"/>
diff --git a/src/client/app/dev/views/ui.vue b/src/client/app/dev/views/ui.vue
index 0a1cdf829b..f1e001909f 100644
--- a/src/client/app/dev/views/ui.vue
+++ b/src/client/app/dev/views/ui.vue
@@ -1,7 +1,7 @@
<template>
<div>
<b-navbar toggleable="md" type="dark" variant="info">
- <b-navbar-brand>%i18n:common.name% Developers</b-navbar-brand>
+ <b-navbar-brand>Developers</b-navbar-brand>
<b-navbar-nav>
<b-nav-item to="/">Home</b-nav-item>
<b-nav-item to="/apps">Apps</b-nav-item>
diff --git a/src/client/app/mobile/views/components/notes.vue b/src/client/app/mobile/views/components/notes.vue
index cba8ef1804..aed372d9a2 100644
--- a/src/client/app/mobile/views/components/notes.vue
+++ b/src/client/app/mobile/views/components/notes.vue
@@ -38,6 +38,7 @@
<script lang="ts">
import Vue from 'vue';
import getNoteSummary from '../../../../../misc/get-note-summary';
+import * as config from '../../../config';
const displayLimit = 30;
@@ -66,7 +67,7 @@ export default Vue.extend({
const date = new Date(note.createdAt).getDate();
const month = new Date(note.createdAt).getMonth() + 1;
note._date = date;
- note._datetext = `${month}月 ${date}日`;
+ note._datetext = '%i18n:common.month-and-day%'.replace('{month}', month.toString()).replace('{day}', date.toString());
return note;
});
}
@@ -183,7 +184,7 @@ export default Vue.extend({
clearNotification() {
this.unreadCount = 0;
- document.title = '%i18n:common.name%';
+ document.title = config.name;
},
onVisibilitychange() {
diff --git a/src/client/app/mobile/views/components/notifications.vue b/src/client/app/mobile/views/components/notifications.vue
index fc220c252a..9f20c3fb22 100644
--- a/src/client/app/mobile/views/components/notifications.vue
+++ b/src/client/app/mobile/views/components/notifications.vue
@@ -42,7 +42,7 @@ export default Vue.extend({
const date = new Date(notification.createdAt).getDate();
const month = new Date(notification.createdAt).getMonth() + 1;
notification._date = date;
- notification._datetext = `${month}月 ${date}日`;
+ notification._datetext = '%i18n:common.month-and-day%'.replace('{month}', month.toString()).replace('{day}', date.toString());
return notification;
});
}
diff --git a/src/client/app/mobile/views/components/ui.header.vue b/src/client/app/mobile/views/components/ui.header.vue
index 63399f7465..b87c6f1eb7 100644
--- a/src/client/app/mobile/views/components/ui.header.vue
+++ b/src/client/app/mobile/views/components/ui.header.vue
@@ -8,7 +8,7 @@
<button class="nav" @click="$parent.isDrawerOpening = true">%fa:bars%</button>
<template v-if="hasUnreadNotification || hasUnreadMessagingMessage || hasGameInvitation">%fa:circle%</template>
<h1>
- <slot>%i18n:common.name%</slot>
+ <slot>config.name</slot>
</h1>
<slot name="func"></slot>
</div>
@@ -20,11 +20,13 @@
<script lang="ts">
import Vue from 'vue';
import * as anime from 'animejs';
+import * as config from '../../../config';
export default Vue.extend({
props: ['func'],
data() {
return {
+ config,
hasGameInvitation: false,
connection: null,
connectionId: null
diff --git a/src/client/app/mobile/views/pages/drive.vue b/src/client/app/mobile/views/pages/drive.vue
index 9c635be05b..72427a4780 100644
--- a/src/client/app/mobile/views/pages/drive.vue
+++ b/src/client/app/mobile/views/pages/drive.vue
@@ -25,6 +25,7 @@
<script lang="ts">
import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
+import * as config from '../../../config';
export default Vue.extend({
data() {
@@ -43,7 +44,7 @@ export default Vue.extend({
window.addEventListener('popstate', this.onPopState);
},
mounted() {
- document.title = '%i18n:common.name% Drive';
+ document.title = `${config.name} Drive`;
document.documentElement.style.background = '#fff';
},
beforeDestroy() {
@@ -63,7 +64,7 @@ export default Vue.extend({
(this.$refs as any).browser.openContextMenu();
},
onMoveRoot(silent) {
- const title = '%i18n:common.name% Drive';
+ const title = `${config.name} Drive`;
if (!silent) {
// Rewrite URL
@@ -76,7 +77,7 @@ export default Vue.extend({
this.folder = null;
},
onOpenFolder(folder, silent) {
- const title = folder.name + ' | %i18n:common.name% Drive';
+ const title = `${folder.name} | ${config.name} Drive`;
if (!silent) {
// Rewrite URL
@@ -89,7 +90,7 @@ export default Vue.extend({
this.folder = folder;
},
onOpenFile(file, silent) {
- const title = file.name + ' | %i18n:common.name% Drive';
+ const title = `${file.name} | ${config.name} Drive`;
if (!silent) {
// Rewrite URL
diff --git a/src/client/app/mobile/views/pages/favorites.vue b/src/client/app/mobile/views/pages/favorites.vue
index 88a84bd8a2..491890bb0e 100644
--- a/src/client/app/mobile/views/pages/favorites.vue
+++ b/src/client/app/mobile/views/pages/favorites.vue
@@ -14,6 +14,7 @@
<script lang="ts">
import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
+import * as config from '../../../config';
export default Vue.extend({
data() {
@@ -28,7 +29,7 @@ export default Vue.extend({
this.fetch();
},
mounted() {
- document.title = '%i18n:common.name% | %i18n:@notifications%';
+ document.title = `${config.name} | %i18n:@notifications%`;
},
methods: {
fetch() {
diff --git a/src/client/app/mobile/views/pages/followers.vue b/src/client/app/mobile/views/pages/followers.vue
index 4956eb1b94..5bba534ba0 100644
--- a/src/client/app/mobile/views/pages/followers.vue
+++ b/src/client/app/mobile/views/pages/followers.vue
@@ -21,6 +21,7 @@ import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
import parseAcct from '../../../../../misc/acct/parse';
import getUserName from '../../../../../misc/get-user-name';
+import * as config from '../../../config';
export default Vue.extend({
data() {
@@ -49,7 +50,7 @@ export default Vue.extend({
this.user = user;
this.fetching = false;
- document.title = '%i18n:@followers-of%'.replace('{}', this.name) + ' | %i18n:common.name%';
+ document.title = '%i18n:@followers-of%'.replace('{}', this.name) + ' | ' + config.name;
});
},
onLoaded() {
diff --git a/src/client/app/mobile/views/pages/following.vue b/src/client/app/mobile/views/pages/following.vue
index fa6807a245..cdc009b768 100644
--- a/src/client/app/mobile/views/pages/following.vue
+++ b/src/client/app/mobile/views/pages/following.vue
@@ -20,6 +20,7 @@
import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
import parseAcct from '../../../../../misc/acct/parse';
+import * as config from '../../../config';
export default Vue.extend({
data() {
@@ -48,7 +49,7 @@ export default Vue.extend({
this.user = user;
this.fetching = false;
- document.title = '%i18n:@followers-of%'.replace('{}', this.name) + ' | %i18n:common.name%';
+ document.title = '%i18n:@followers-of%'.replace('{}', this.name) + ' | ' + config.name;
});
},
onLoaded() {
diff --git a/src/client/app/mobile/views/pages/games/reversi.vue b/src/client/app/mobile/views/pages/games/reversi.vue
index e6e6325f8b..448c9b8d77 100644
--- a/src/client/app/mobile/views/pages/games/reversi.vue
+++ b/src/client/app/mobile/views/pages/games/reversi.vue
@@ -7,10 +7,11 @@
<script lang="ts">
import Vue from 'vue';
+import * as config from '../../../../config';
export default Vue.extend({
mounted() {
- document.title = '%i18n:common.name% %i18n:@reversi%';
+ document.title = `${config.name} %i18n:@reversi%`;
document.documentElement.style.background = '#fff';
},
methods: {
diff --git a/src/client/app/mobile/views/pages/home.vue b/src/client/app/mobile/views/pages/home.vue
index 7b14c7ee98..c1ed97ac13 100644
--- a/src/client/app/mobile/views/pages/home.vue
+++ b/src/client/app/mobile/views/pages/home.vue
@@ -49,6 +49,7 @@
import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
import XTl from './home.timeline.vue';
+import * as config from '../../../config';
export default Vue.extend({
components: {
@@ -96,7 +97,7 @@ export default Vue.extend({
},
mounted() {
- document.title = '%i18n:common.name%';
+ document.title = config.name;
Progress.start();
diff --git a/src/client/app/mobile/views/pages/messaging-room.vue b/src/client/app/mobile/views/pages/messaging-room.vue
index 24ffc658a3..e2016fc82a 100644
--- a/src/client/app/mobile/views/pages/messaging-room.vue
+++ b/src/client/app/mobile/views/pages/messaging-room.vue
@@ -11,6 +11,7 @@
<script lang="ts">
import Vue from 'vue';
import parseAcct from '../../../../../misc/acct/parse';
+import * as config from '../../../config';
export default Vue.extend({
data() {
@@ -47,7 +48,7 @@ export default Vue.extend({
this.user = user;
this.fetching = false;
- document.title = `%i18n:@messaging%: ${Vue.filter('userName')(this.user)} | %i18n:common.name%`;
+ document.title = `%i18n:@messaging%: ${Vue.filter('userName')(this.user)} | ${config.name}`;
});
}
}
diff --git a/src/client/app/mobile/views/pages/messaging.vue b/src/client/app/mobile/views/pages/messaging.vue
index b5a4f405fb..9f2beb860c 100644
--- a/src/client/app/mobile/views/pages/messaging.vue
+++ b/src/client/app/mobile/views/pages/messaging.vue
@@ -8,10 +8,11 @@
<script lang="ts">
import Vue from 'vue';
import getAcct from '../../../../../misc/acct/render';
+import * as config from '../../../config';
export default Vue.extend({
mounted() {
- document.title = '%i18n:common.name% %i18n:@messaging%';
+ document.title = `${config.name} %i18n:@messaging%`;
},
methods: {
navigate(user) {
diff --git a/src/client/app/mobile/views/pages/note.vue b/src/client/app/mobile/views/pages/note.vue
index 64d46f051b..8b1095c509 100644
--- a/src/client/app/mobile/views/pages/note.vue
+++ b/src/client/app/mobile/views/pages/note.vue
@@ -16,6 +16,7 @@
<script lang="ts">
import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
+import * as config from '../../../config';
export default Vue.extend({
data() {
@@ -31,7 +32,7 @@ export default Vue.extend({
this.fetch();
},
mounted() {
- document.title = '%i18n:common.name%';
+ document.title = config.name;
},
methods: {
fetch() {
diff --git a/src/client/app/mobile/views/pages/notifications.vue b/src/client/app/mobile/views/pages/notifications.vue
index 3688721613..4d3c8ee534 100644
--- a/src/client/app/mobile/views/pages/notifications.vue
+++ b/src/client/app/mobile/views/pages/notifications.vue
@@ -15,7 +15,7 @@ import Progress from '../../../common/scripts/loading';
export default Vue.extend({
mounted() {
- document.title = '%i18n:common.name% | %i18n:@notifications%';
+ document.title = '%i18n:@notifications%';
Progress.start();
},
diff --git a/src/client/app/mobile/views/pages/received-follow-requests.vue b/src/client/app/mobile/views/pages/received-follow-requests.vue
index fff2fdea56..77938c3d60 100644
--- a/src/client/app/mobile/views/pages/received-follow-requests.vue
+++ b/src/client/app/mobile/views/pages/received-follow-requests.vue
@@ -25,7 +25,7 @@ export default Vue.extend({
};
},
mounted() {
- document.title = '%i18n:common.name% | %i18n:@title%';
+ document.title = '%i18n:@title%';
Progress.start();
diff --git a/src/client/app/mobile/views/pages/search.vue b/src/client/app/mobile/views/pages/search.vue
index a90513dc7c..0b37a3c7bd 100644
--- a/src/client/app/mobile/views/pages/search.vue
+++ b/src/client/app/mobile/views/pages/search.vue
@@ -12,6 +12,7 @@
<script lang="ts">
import Vue from 'vue';
import Progress from '../../../common/scripts/loading';
+import * as config from '../../../config';
const limit = 20;
@@ -34,7 +35,7 @@ export default Vue.extend({
}
},
mounted() {
- document.title = `%i18n:@search%: ${this.q} | %i18n:common.name%`;
+ document.title = `%i18n:@search%: ${this.q} | ${config.name}`;
this.fetch();
},
diff --git a/src/client/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue
index 63fca64ab1..f74b734b6e 100644
--- a/src/client/app/mobile/views/pages/settings.vue
+++ b/src/client/app/mobile/views/pages/settings.vue
@@ -143,7 +143,7 @@ export default Vue.extend({
},
mounted() {
- document.title = '%i18n:common.name% | %i18n:@settings%';
+ document.title = '%i18n:@settings%';
},
methods: {
diff --git a/src/client/app/mobile/views/pages/share.vue b/src/client/app/mobile/views/pages/share.vue
index fffbea9033..dcb55e6702 100644
--- a/src/client/app/mobile/views/pages/share.vue
+++ b/src/client/app/mobile/views/pages/share.vue
@@ -1,6 +1,6 @@
<template>
<div class="azibmfpleajagva420swmu4c3r7ni7iw">
- <h1>{{'%i18n:@share-with%'.split("{}")[0] + '%i18n:common.name%' + '%i18n:@share-with%'.split("{}")[1]}}</h1>
+ <h1>{{ '%i18n:@share-with%'.replace('{}', name) }}</h1>
<div>
<mk-signin v-if="!$store.getters.isSignedIn"/>
<mk-post-form v-else-if="!posted" :initial-text="text" :instant="true" @posted="posted = true"/>
@@ -12,10 +12,12 @@
<script lang="ts">
import Vue from 'vue';
+import * as config from '../../../config';
export default Vue.extend({
data() {
return {
+ name: config.name,
posted: false,
text: new URLSearchParams(location.search).get('text')
};
diff --git a/src/client/app/mobile/views/pages/user-lists.vue b/src/client/app/mobile/views/pages/user-lists.vue
index 1cce3e9bdd..abd04c1496 100644
--- a/src/client/app/mobile/views/pages/user-lists.vue
+++ b/src/client/app/mobile/views/pages/user-lists.vue
@@ -23,7 +23,7 @@ export default Vue.extend({
};
},
mounted() {
- document.title = '%i18n:common.name% | %i18n:@title%';
+ document.title = '%i18n:@title%';
Progress.start();
diff --git a/src/client/app/mobile/views/pages/user.vue b/src/client/app/mobile/views/pages/user.vue
index d016345717..11ca1caebf 100644
--- a/src/client/app/mobile/views/pages/user.vue
+++ b/src/client/app/mobile/views/pages/user.vue
@@ -67,6 +67,7 @@ import * as age from 's-age';
import parseAcct from '../../../../../misc/acct/parse';
import Progress from '../../../common/scripts/loading';
import XHome from './user/home.vue';
+import * as config from '../../../config';
export default Vue.extend({
components: {
@@ -106,7 +107,7 @@ export default Vue.extend({
this.fetching = false;
Progress.done();
- document.title = Vue.filter('userName')(this.user) + ' | %i18n:common.name%';
+ document.title = Vue.filter('userName')(this.user) + ' | ' + config.name;
});
}
}
diff --git a/src/client/app/mobile/views/pages/welcome.vue b/src/client/app/mobile/views/pages/welcome.vue
index acc8e2c490..f8a7ff1c80 100644
--- a/src/client/app/mobile/views/pages/welcome.vue
+++ b/src/client/app/mobile/views/pages/welcome.vue
@@ -1,10 +1,10 @@
<template>
<div class="welcome">
<div>
- <img :src="$store.state.device.darkmode ? 'assets/title.dark.svg' : 'assets/title.light.svg'" alt="%i18n:common.name%">
+ <img :src="$store.state.device.darkmode ? 'assets/title.dark.svg' : 'assets/title.light.svg'" :alt="name">
<p class="host">{{ host }}</p>
<div class="about">
- <h2>{{ name || 'unidentified' }}</h2>
+ <h2>{{ name }}</h2>
<p v-html="description || '%i18n:common.about%'"></p>
<router-link class="signup" to="/signup">%i18n:@signup%</router-link>
</div>
diff --git a/src/client/app/mobile/views/pages/widgets.vue b/src/client/app/mobile/views/pages/widgets.vue
index 543ee8f7d8..b90d710c67 100644
--- a/src/client/app/mobile/views/pages/widgets.vue
+++ b/src/client/app/mobile/views/pages/widgets.vue
@@ -53,6 +53,7 @@
import Vue from 'vue';
import * as XDraggable from 'vuedraggable';
import * as uuid from 'uuid';
+import * as config from '../../../config';
export default Vue.extend({
components: {
@@ -102,7 +103,7 @@ export default Vue.extend({
},
mounted() {
- document.title = '%i18n:common.name%';
+ document.title = config.name;
},
methods: {
diff --git a/src/config/load.ts b/src/config/load.ts
index 44a24c96ae..1c59f82b3e 100644
--- a/src/config/load.ts
+++ b/src/config/load.ts
@@ -47,6 +47,8 @@ export default function load() {
if (config.localDriveCapacityMb == null) config.localDriveCapacityMb = 256;
if (config.remoteDriveCapacityMb == null) config.remoteDriveCapacityMb = 8;
+ if (config.name == null) config.name = 'Misskey';
+
return Object.assign(config, mixin);
}