From dbc421cb571f69a4c71691c00b094925006b95fe Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 28 Feb 2018 00:11:28 +0900 Subject: :v: --- src/web/app/auth/script.ts | 25 +++++++++++++++++++++++++ src/web/app/auth/views/index.vue | 8 ++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 src/web/app/auth/script.ts (limited to 'src/web/app/auth') diff --git a/src/web/app/auth/script.ts b/src/web/app/auth/script.ts new file mode 100644 index 0000000000..31c758ebc2 --- /dev/null +++ b/src/web/app/auth/script.ts @@ -0,0 +1,25 @@ +/** + * Authorize Form + */ + +// Style +import './style.styl'; + +import init from '../init'; + +import Index from './views/index.vue'; + +/** + * init + */ +init(async (launch) => { + document.title = 'Misskey | アプリの連携'; + + // Launch the app + const [app] = launch(); + + // Routing + app.$router.addRoutes([ + { path: '/:token', component: Index }, + ]); +}); diff --git a/src/web/app/auth/views/index.vue b/src/web/app/auth/views/index.vue index 1e372c0bde..17e5cc6108 100644 --- a/src/web/app/auth/views/index.vue +++ b/src/web/app/auth/views/index.vue @@ -42,10 +42,14 @@ export default Vue.extend({ return { state: null, session: null, - fetching: true, - token: window.location.href.split('/').pop() + fetching: true }; }, + computed: { + token(): string { + return this.$route.params.token; + } + }, mounted() { if (!this.$root.$data.os.isSignedIn) return; -- cgit v1.2.3-freya