0
0
This commit is contained in:
syuilo 2020-02-05 14:39:52 +09:00
parent 28c2063043
commit a3c1a29fbf
2 changed files with 43 additions and 41 deletions

View File

@ -1,5 +1,5 @@
<template>
<div class="wjqjnyhzogztorhrdgcpqlkxhkmuetgj _panel">
<div class="mjndxjcg _panel">
<p><fa :icon="faExclamationTriangle"/> {{ $t('error') }}</p>
<mk-button @click="() => $emit('retry')" class="button">{{ $t('retry') }}</mk-button>
</div>
@ -25,7 +25,7 @@ export default Vue.extend({
</script>
<style lang="scss" scoped>
.wjqjnyhzogztorhrdgcpqlkxhkmuetgj {
.mjndxjcg {
max-width: 350px;
margin: 0 auto;
padding: 32px;

View File

@ -4,50 +4,52 @@ import MkIndex from './pages/index.vue';
Vue.use(VueRouter);
const page = (path: string) => () => import(`./pages/${path}.vue`).then(m => m.default);
export const router = new VueRouter({
mode: 'history',
routes: [
{ path: '/', name: 'index', component: MkIndex },
{ path: '/@:user', name: 'user', component: () => import('./pages/user/index.vue').then(m => m.default), children: [
{ path: 'following', name: 'userFollowing', component: () => import('./pages/user/follow-list.vue').then(m => m.default), props: { type: 'following' } },
{ path: 'followers', name: 'userFollowers', component: () => import('./pages/user/follow-list.vue').then(m => m.default), props: { type: 'followers' } },
{ path: '/@:user', name: 'user', component: page('user/index'), children: [
{ path: 'following', name: 'userFollowing', component: page('user/follow-list'), props: { type: 'following' } },
{ path: 'followers', name: 'userFollowers', component: page('user/follow-list'), props: { type: 'followers' } },
]},
{ path: '/@:user/pages/:page', component: () => import('./pages/page.vue').then(m => m.default), props: route => ({ pageName: route.params.page, username: route.params.user }) },
{ path: '/@:user/pages/:pageName/view-source', component: () => import('./pages/page-editor/page-editor.vue').then(m => m.default), props: route => ({ initUser: route.params.user, initPageName: route.params.pageName }) },
{ path: '/announcements', component: () => import('./pages/announcements.vue').then(m => m.default) },
{ path: '/about', component: () => import('./pages/about.vue').then(m => m.default) },
{ path: '/featured', component: () => import('./pages/featured.vue').then(m => m.default) },
{ path: '/explore', component: () => import('./pages/explore.vue').then(m => m.default) },
{ path: '/explore/tags/:tag', props: true, component: () => import('./pages/explore.vue').then(m => m.default) },
{ path: '/search', component: () => import('./pages/search.vue').then(m => m.default) },
{ path: '/my/favorites', component: () => import('./pages/favorites.vue').then(m => m.default) },
{ path: '/my/messages', component: () => import('./pages/messages.vue').then(m => m.default) },
{ path: '/my/mentions', component: () => import('./pages/mentions.vue').then(m => m.default) },
{ path: '/my/messaging', name: 'messaging', component: () => import('./pages/messaging.vue').then(m => m.default) },
{ path: '/my/messaging/:user', component: () => import('./pages/messaging-room.vue').then(m => m.default) },
{ path: '/my/drive', name: 'drive', component: () => import('./pages/drive.vue').then(m => m.default) },
{ path: '/my/drive/folder/:folder', component: () => import('./pages/drive.vue').then(m => m.default) },
{ path: '/my/pages', name: 'pages', component: () => import('./pages/pages.vue').then(m => m.default) },
{ path: '/my/pages/new', component: () => import('./pages/page-editor/page-editor.vue').then(m => m.default) },
{ path: '/my/pages/edit/:pageId', component: () => import('./pages/page-editor/page-editor.vue').then(m => m.default), props: route => ({ initPageId: route.params.pageId }) },
{ path: '/my/settings', component: () => import('./pages/settings/index.vue').then(m => m.default) },
{ path: '/my/follow-requests', component: () => import('./pages/follow-requests.vue').then(m => m.default) },
{ path: '/my/lists', component: () => import('./pages/my-lists/index.vue').then(m => m.default) },
{ path: '/my/lists/:list', component: () => import('./pages/my-lists/list.vue').then(m => m.default) },
{ path: '/my/antennas', component: () => import('./pages/my-antennas/index.vue').then(m => m.default) },
{ path: '/instance', component: () => import('./pages/instance/index.vue').then(m => m.default) },
{ path: '/instance/emojis', component: () => import('./pages/instance/emojis.vue').then(m => m.default) },
{ path: '/instance/users', component: () => import('./pages/instance/users.vue').then(m => m.default) },
{ path: '/instance/files', component: () => import('./pages/instance/files.vue').then(m => m.default) },
{ path: '/instance/monitor', component: () => import('./pages/instance/monitor.vue').then(m => m.default) },
{ path: '/instance/queue', component: () => import('./pages/instance/queue.vue').then(m => m.default) },
{ path: '/instance/stats', component: () => import('./pages/instance/stats.vue').then(m => m.default) },
{ path: '/instance/federation', component: () => import('./pages/instance/federation.vue').then(m => m.default) },
{ path: '/instance/announcements', component: () => import('./pages/instance/announcements.vue').then(m => m.default) },
{ path: '/notes/:note', name: 'note', component: () => import('./pages/note.vue').then(m => m.default) },
{ path: '/tags/:tag', component: () => import('./pages/tag.vue').then(m => m.default) },
{ path: '/auth/:token', component: () => import('./pages/auth.vue').then(m => m.default) },
{ path: '/authorize-follow', component: () => import('./pages/follow.vue').then(m => m.default) },
{ path: '/@:user/pages/:page', component: page('page'), props: route => ({ pageName: route.params.page, username: route.params.user }) },
{ path: '/@:user/pages/:pageName/view-source', component: page('page-editor/page-editor'), props: route => ({ initUser: route.params.user, initPageName: route.params.pageName }) },
{ path: '/announcements', component: page('announcements') },
{ path: '/about', component: page('about') },
{ path: '/featured', component: page('featured') },
{ path: '/explore', component: page('explore') },
{ path: '/explore/tags/:tag', props: true, component: page('explore') },
{ path: '/search', component: page('search') },
{ path: '/my/favorites', component: page('favorites') },
{ path: '/my/messages', component: page('messages') },
{ path: '/my/mentions', component: page('mentions') },
{ path: '/my/messaging', name: 'messaging', component: page('messaging') },
{ path: '/my/messaging/:user', component: page('messaging-room') },
{ path: '/my/drive', name: 'drive', component: page('drive') },
{ path: '/my/drive/folder/:folder', component: page('drive') },
{ path: '/my/pages', name: 'pages', component: page('pages') },
{ path: '/my/pages/new', component: page('page-editor/page-editor') },
{ path: '/my/pages/edit/:pageId', component: page('page-editor/page-editor'), props: route => ({ initPageId: route.params.pageId }) },
{ path: '/my/settings', component: page('settings/index') },
{ path: '/my/follow-requests', component: page('follow-requests') },
{ path: '/my/lists', component: page('my-lists/index') },
{ path: '/my/lists/:list', component: page('my-lists/list') },
{ path: '/my/antennas', component: page('my-antennas/index') },
{ path: '/instance', component: page('instance/index') },
{ path: '/instance/emojis', component: page('instance/emojis') },
{ path: '/instance/users', component: page('instance/users') },
{ path: '/instance/files', component: page('instance/files') },
{ path: '/instance/monitor', component: page('instance/monitor') },
{ path: '/instance/queue', component: page('instance/queue') },
{ path: '/instance/stats', component: page('instance/stats') },
{ path: '/instance/federation', component: page('instance/federation') },
{ path: '/instance/announcements', component: page('instance/announcements') },
{ path: '/notes/:note', name: 'note', component: page('note') },
{ path: '/tags/:tag', component: page('tag') },
{ path: '/auth/:token', component: page('auth') },
{ path: '/authorize-follow', component: page('follow') },
/*{ path: '*', component: MkNotFound }*/
],
// なんかHacky