diff --git a/src/web/app/config.ts b/src/web/app/config.ts index 25381ecce7..2461b22158 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 0000000000..4eebd747fb --- /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 7278c9af17..251a2a1619 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 8e48d67b98..fb8ded9c04 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 337c47674e..3728f94be8 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 @@