From e1259409e914baaa399e2866feb887b3beddbdf7 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 20 Feb 2018 22:53:34 +0900 Subject: [PATCH] wip --- src/web/app/config.ts | 2 + src/web/app/desktop/api/post.ts | 6 +++ src/web/app/desktop/script.ts | 4 +- src/web/app/desktop/views/components/index.ts | 14 ------- ...ader-account.vue => ui.header.account.vue} | 4 +- ...i-header-clock.vue => ui.header.clock.vue} | 4 +- .../{ui-header-nav.vue => ui.header.nav.vue} | 10 +++-- ...ations.vue => ui.header.notifications.vue} | 8 ++-- ...der-post-button.vue => ui.header.post.vue} | 4 +- ...header-search.vue => ui.header.search.vue} | 4 +- .../{ui-header.vue => ui.header.vue} | 39 ++++++++++++++----- src/web/app/desktop/views/components/ui.vue | 14 +++---- .../pages/user/user-followers-you-know.vue | 2 +- .../desktop/views/pages/user/user-friends.vue | 4 +- src/web/app/desktop/views/pages/user/user.vue | 29 +++++++++----- src/web/app/init.ts | 2 + 16 files changed, 89 insertions(+), 61 deletions(-) create mode 100644 src/web/app/desktop/api/post.ts rename src/web/app/desktop/views/components/{ui-header-account.vue => ui.header.account.vue} (98%) rename src/web/app/desktop/views/components/{ui-header-clock.vue => ui.header.clock.vue} (96%) rename src/web/app/desktop/views/components/{ui-header-nav.vue => ui.header.nav.vue} (95%) rename src/web/app/desktop/views/components/{ui-header-notifications.vue => ui.header.notifications.vue} (96%) rename src/web/app/desktop/views/components/{ui-header-post-button.vue => ui.header.post.vue} (93%) rename src/web/app/desktop/views/components/{ui-header-search.vue => ui.header.search.vue} (92%) rename src/web/app/desktop/views/components/{ui-header.vue => ui.header.vue} (63%) diff --git a/src/web/app/config.ts b/src/web/app/config.ts index 25381ecce..2461b2215 100644 --- a/src/web/app/config.ts +++ b/src/web/app/config.ts @@ -5,6 +5,7 @@ declare const _DOCS_URL_: string; declare const _STATS_URL_: string; declare const _STATUS_URL_: string; declare const _DEV_URL_: string; +declare const _CH_URL_: string; declare const _LANG_: string; declare const _RECAPTCHA_SITEKEY_: string; declare const _SW_PUBLICKEY_: string; @@ -19,6 +20,7 @@ export const docsUrl = _DOCS_URL_; export const statsUrl = _STATS_URL_; export const statusUrl = _STATUS_URL_; export const devUrl = _DEV_URL_; +export const chUrl = _CH_URL_; export const lang = _LANG_; export const recaptchaSitekey = _RECAPTCHA_SITEKEY_; export const swPublickey = _SW_PUBLICKEY_; diff --git a/src/web/app/desktop/api/post.ts b/src/web/app/desktop/api/post.ts new file mode 100644 index 000000000..4eebd747f --- /dev/null +++ b/src/web/app/desktop/api/post.ts @@ -0,0 +1,6 @@ +import PostFormWindow from '../views/components/post-form-window.vue'; + +export default function() { + const vm = new PostFormWindow().$mount(); + document.body.appendChild(vm.$el); +} diff --git a/src/web/app/desktop/script.ts b/src/web/app/desktop/script.ts index 7278c9af1..251a2a161 100644 --- a/src/web/app/desktop/script.ts +++ b/src/web/app/desktop/script.ts @@ -14,6 +14,7 @@ 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 MkIndex from './views/pages/index.vue'; import MkUser from './views/pages/user/user.vue'; @@ -37,7 +38,8 @@ init(async (launch) => { chooseDriveFolder, chooseDriveFile, dialog, - input + input, + post }); /** diff --git a/src/web/app/desktop/views/components/index.ts b/src/web/app/desktop/views/components/index.ts index 8e48d67b9..fb8ded9c0 100644 --- a/src/web/app/desktop/views/components/index.ts +++ b/src/web/app/desktop/views/components/index.ts @@ -1,13 +1,6 @@ import Vue from 'vue'; import ui from './ui.vue'; -import uiHeader from './ui-header.vue'; -import uiHeaderAccount from './ui-header-account.vue'; -import uiHeaderClock from './ui-header-clock.vue'; -import uiHeaderNav from './ui-header-nav.vue'; -import uiHeaderNotifications from './ui-header-notifications.vue'; -import uiHeaderPostButton from './ui-header-post-button.vue'; -import uiHeaderSearch from './ui-header-search.vue'; import uiNotification from './ui-notification.vue'; import home from './home.vue'; import timeline from './timeline.vue'; @@ -46,13 +39,6 @@ import wBroadcast from './widgets/broadcast.vue'; import wTimemachine from './widgets/timemachine.vue'; Vue.component('mk-ui', ui); -Vue.component('mk-ui-header', uiHeader); -Vue.component('mk-ui-header-account', uiHeaderAccount); -Vue.component('mk-ui-header-clock', uiHeaderClock); -Vue.component('mk-ui-header-nav', uiHeaderNav); -Vue.component('mk-ui-header-notifications', uiHeaderNotifications); -Vue.component('mk-ui-header-post-button', uiHeaderPostButton); -Vue.component('mk-ui-header-search', uiHeaderSearch); Vue.component('mk-ui-notification', uiNotification); Vue.component('mk-home', home); Vue.component('mk-timeline', timeline); diff --git a/src/web/app/desktop/views/components/ui-header-account.vue b/src/web/app/desktop/views/components/ui.header.account.vue similarity index 98% rename from src/web/app/desktop/views/components/ui-header-account.vue rename to src/web/app/desktop/views/components/ui.header.account.vue index 337c47674..3728f94be 100644 --- a/src/web/app/desktop/views/components/ui-header-account.vue +++ b/src/web/app/desktop/views/components/ui.header.account.vue @@ -1,5 +1,5 @@