diff --git a/src/web/app/desktop/router.ts b/src/web/app/desktop/router.ts deleted file mode 100644 index 6ba8bda12..000000000 --- a/src/web/app/desktop/router.ts +++ /dev/null @@ -1,100 +0,0 @@ -/** - * Desktop App Router - */ - -import * as riot from 'riot'; -import * as route from 'page'; -import MiOS from '../common/mios'; -let page = null; - -export default (mios: MiOS) => { - route('/', index); - route('/selectdrive', selectDrive); - route('/i/customize-home', customizeHome); - route('/i/drive', drive); - route('/i/drive/folder/:folder', drive); - route('/i/messaging/:user', messaging); - route('/i/mentions', mentions); - route('/post::post', post); - route('/search', search); - route('/:user', user.bind(null, 'home')); - route('/:user/graphs', user.bind(null, 'graphs')); - route('/:user/:post', post); - route('*', notFound); - - function index() { - mios.isSignedIn ? home() : entrance(); - } - - function home() { - mount(document.createElement('mk-home-page')); - } - - function customizeHome() { - mount(document.createElement('mk-home-customize-page')); - } - - function entrance() { - mount(document.createElement('mk-entrance')); - document.documentElement.setAttribute('data-page', 'entrance'); - } - - function mentions() { - const el = document.createElement('mk-home-page'); - el.setAttribute('mode', 'mentions'); - mount(el); - } - - function search(ctx) { - const el = document.createElement('mk-search-page'); - el.setAttribute('query', ctx.querystring.substr(2)); - mount(el); - } - - function user(page, ctx) { - const el = document.createElement('mk-user-page'); - el.setAttribute('user', ctx.params.user); - el.setAttribute('page', page); - mount(el); - } - - function post(ctx) { - const el = document.createElement('mk-post-page'); - el.setAttribute('post', ctx.params.post); - mount(el); - } - - function selectDrive() { - mount(document.createElement('mk-selectdrive-page')); - } - - function drive(ctx) { - const el = document.createElement('mk-drive-page'); - if (ctx.params.folder) el.setAttribute('folder', ctx.params.folder); - mount(el); - } - - function messaging(ctx) { - const el = document.createElement('mk-messaging-room-page'); - el.setAttribute('user', ctx.params.user); - mount(el); - } - - function notFound() { - mount(document.createElement('mk-not-found')); - } - - (riot as any).mixin('page', { - page: route - }); - - // EXEC - (route as any)(); -}; - -function mount(content) { - document.documentElement.removeAttribute('data-page'); - if (page) page.unmount(); - const body = document.getElementById('app'); - page = riot.mount(body.appendChild(content))[0]; -} diff --git a/src/web/app/desktop/script.ts b/src/web/app/desktop/script.ts index 6c40ae0a3..e7c8f8e49 100644 --- a/src/web/app/desktop/script.ts +++ b/src/web/app/desktop/script.ts @@ -26,6 +26,7 @@ import MkDrive from './views/pages/drive.vue'; import MkHomeCustomize from './views/pages/home-customize.vue'; import MkMessagingRoom from './views/pages/messaging-room.vue'; import MkPost from './views/pages/post.vue'; +import MkSearch from './views/pages/search.vue'; /** * init @@ -76,6 +77,7 @@ init(async (launch) => { { path: '/i/drive', component: MkDrive }, { path: '/i/drive/folder/:folder', component: MkDrive }, { path: '/selectdrive', component: MkSelectDrive }, + { path: '/search', component: MkSearch }, { path: '/:user', component: MkUser }, { path: '/:user/:post', component: MkPost } ]); diff --git a/src/web/app/desktop/views/pages/user/user.home.vue b/src/web/app/desktop/views/pages/user/user.home.vue index bf96741cb..dbf02bd07 100644 --- a/src/web/app/desktop/views/pages/user/user.home.vue +++ b/src/web/app/desktop/views/pages/user/user.home.vue @@ -10,7 +10,7 @@
- +
@@ -25,19 +25,19 @@ - diff --git a/src/web/app/mobile/tags/page/entrance/signin.tag b/src/web/app/mobile/tags/page/entrance/signin.tag deleted file mode 100644 index e6deea8c3..000000000 --- a/src/web/app/mobile/tags/page/entrance/signin.tag +++ /dev/null @@ -1,52 +0,0 @@ - - - Twitterでサインイン -
or
- %i18n:mobile.tags.mk-entrance-signin.about% - -
diff --git a/src/web/app/mobile/tags/page/entrance/signup.tag b/src/web/app/mobile/tags/page/entrance/signup.tag deleted file mode 100644 index d219bb100..000000000 --- a/src/web/app/mobile/tags/page/entrance/signup.tag +++ /dev/null @@ -1,38 +0,0 @@ - - - - - diff --git a/src/web/app/mobile/tags/page/settings/authorized-apps.tag b/src/web/app/mobile/tags/page/settings/authorized-apps.tag deleted file mode 100644 index 35cc961f0..000000000 --- a/src/web/app/mobile/tags/page/settings/authorized-apps.tag +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - diff --git a/src/web/app/mobile/tags/page/settings/signin.tag b/src/web/app/mobile/tags/page/settings/signin.tag deleted file mode 100644 index 7a57406c1..000000000 --- a/src/web/app/mobile/tags/page/settings/signin.tag +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - diff --git a/src/web/app/mobile/tags/page/settings/twitter.tag b/src/web/app/mobile/tags/page/settings/twitter.tag deleted file mode 100644 index ca5fe2c43..000000000 --- a/src/web/app/mobile/tags/page/settings/twitter.tag +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - -