mirror of
https://github.com/hotomoe/hotomoe
synced 2024-12-19 00:58:12 +09:00
65 lines
1.8 KiB
TypeScript
65 lines
1.8 KiB
TypeScript
/**
|
|
* Mobile Client
|
|
*/
|
|
|
|
// Style
|
|
import './style.styl';
|
|
|
|
import init from '../init';
|
|
|
|
import chooseDriveFolder from './api/choose-drive-folder';
|
|
import chooseDriveFile from './api/choose-drive-file';
|
|
import dialog from './api/dialog';
|
|
import input from './api/input';
|
|
import post from './api/post';
|
|
import notify from './api/notify';
|
|
|
|
import MkIndex from './views/pages/index.vue';
|
|
import MkSignup from './views/pages/signup.vue';
|
|
import MkUser from './views/pages/user.vue';
|
|
import MkSelectDrive from './views/pages/selectdrive.vue';
|
|
import MkDrive from './views/pages/drive.vue';
|
|
import MkNotifications from './views/pages/notifications.vue';
|
|
import MkMessaging from './views/pages/messaging.vue';
|
|
import MkMessagingRoom from './views/pages/messaging-room.vue';
|
|
import MkPost from './views/pages/post.vue';
|
|
|
|
/**
|
|
* init
|
|
*/
|
|
init((launch) => {
|
|
// Register directives
|
|
require('./views/directives');
|
|
|
|
// Register components
|
|
require('./views/components');
|
|
|
|
// http://qiita.com/junya/items/3ff380878f26ca447f85
|
|
document.body.setAttribute('ontouchstart', '');
|
|
|
|
// Launch the app
|
|
const [app] = launch(os => ({
|
|
chooseDriveFolder,
|
|
chooseDriveFile,
|
|
dialog,
|
|
input,
|
|
post: post(os),
|
|
notify
|
|
}));
|
|
|
|
// Routing
|
|
app.$router.addRoutes([
|
|
{ path: '/', name: 'index', component: MkIndex },
|
|
{ path: '/signup', name: 'signup', component: MkSignup },
|
|
{ path: '/i/notifications', component: MkNotifications },
|
|
{ path: '/i/messaging', component: MkMessaging },
|
|
{ path: '/i/messaging/:username', component: MkMessagingRoom },
|
|
{ path: '/i/drive', component: MkDrive },
|
|
{ path: '/i/drive/folder/:folder', component: MkDrive },
|
|
{ path: '/i/drive/file/:file', component: MkDrive },
|
|
{ path: '/selectdrive', component: MkSelectDrive },
|
|
{ path: '/:user', component: MkUser },
|
|
{ path: '/:user/:post', component: MkPost }
|
|
]);
|
|
}, true);
|