summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-02-06 23:20:59 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2020-02-06 23:20:59 +0900
commitc2a8e29ef993e620086f1f1ff45c2caa203f5e9d (patch)
treeae6fb43ab3fdaa23354e5162136ffed8c17ab98e
parentFix #5856 (diff)
downloadsharkey-c2a8e29ef993e620086f1f1ff45c2caa203f5e9d.tar.gz
sharkey-c2a8e29ef993e620086f1f1ff45c2caa203f5e9d.tar.bz2
sharkey-c2a8e29ef993e620086f1f1ff45c2caa203f5e9d.zip
Not found page
-rw-r--r--locales/ja-JP.yml2
-rw-r--r--src/client/pages/not-found.vue36
-rw-r--r--src/client/router.ts2
3 files changed, 39 insertions, 1 deletions
diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml
index cb5e5d7572..4d97952d96 100644
--- a/locales/ja-JP.yml
+++ b/locales/ja-JP.yml
@@ -352,6 +352,8 @@ autoReloadWhenDisconnected: "サーバー切断時に自動リロード"
autoNoteWatch: "ノートの自動ウォッチ"
reduceUiAnimation: "UIのアニメーションを減らす"
share: "共有"
+notFound: "見つかりません"
+notFoundDescription: "指定されたURLに該当するページはありませんでした。"
_2fa:
registerDevice: "デバイスを登録"
diff --git a/src/client/pages/not-found.vue b/src/client/pages/not-found.vue
new file mode 100644
index 0000000000..05bd347724
--- /dev/null
+++ b/src/client/pages/not-found.vue
@@ -0,0 +1,36 @@
+<template>
+<div class="">
+ <portal to="icon"><fa :icon="faExclamationTriangle"/></portal>
+ <portal to="title">{{ $t('notFound') }}</portal>
+
+ <section class="_card">
+ <div class="_title"><fa :icon="faExclamationTriangle"/> {{ $t('notFound') }}</div>
+ <div class="_content">{{ $t('notFoundDescription') }}</div>
+ </section>
+</div>
+</template>
+
+<script lang="ts">
+import Vue from 'vue';
+import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons';
+import i18n from '../i18n';
+
+export default Vue.extend({
+ i18n,
+
+ metaInfo() {
+ return {
+ title: this.$t('notFound') as string
+ };
+ },
+
+ data() {
+ return {
+ faExclamationTriangle
+ }
+ },
+});
+</script>
+
+<style lang="scss" scoped>
+</style>
diff --git a/src/client/router.ts b/src/client/router.ts
index 70bc48c49e..c1140355fd 100644
--- a/src/client/router.ts
+++ b/src/client/router.ts
@@ -53,7 +53,7 @@ export const router = new VueRouter({
{ path: '/auth/:token', component: page('auth') },
{ path: '/authorize-follow', component: page('follow') },
{ path: '/share', component: page('share') },
- /*{ path: '*', component: MkNotFound }*/
+ { path: '*', component: page('not-found') }
],
// なんかHacky
// 通常の使い方をすると scroll メソッドの behavior を設定できないため、自前で window.scroll するようにする