Refactor
This commit is contained in:
parent
89a98b2644
commit
36c11e1f0f
48 changed files with 105 additions and 191 deletions
|
|
@ -37,6 +37,7 @@ init(async (launch) => {
|
|||
|
||||
// Register components
|
||||
require('./views/components');
|
||||
require('./views/widgets');
|
||||
|
||||
// Launch the app
|
||||
const [app, os] = launch(os => ({
|
||||
|
|
|
|||
|
|
@ -29,19 +29,6 @@ import following from './following.vue';
|
|||
import usersList from './users-list.vue';
|
||||
import widgetContainer from './widget-container.vue';
|
||||
|
||||
//#region widgets
|
||||
import wNotifications from './widgets/notifications.vue';
|
||||
import wTimemachine from './widgets/timemachine.vue';
|
||||
import wActivity from './widgets/activity.vue';
|
||||
import wTrends from './widgets/trends.vue';
|
||||
import wUsers from './widgets/users.vue';
|
||||
import wPolls from './widgets/polls.vue';
|
||||
import wPostForm from './widgets/post-form.vue';
|
||||
import wMessaging from './widgets/messaging.vue';
|
||||
import wChannel from './widgets/channel.vue';
|
||||
import wProfile from './widgets/profile.vue';
|
||||
//#endregion
|
||||
|
||||
Vue.component('mk-ui', ui);
|
||||
Vue.component('mk-ui-notification', uiNotification);
|
||||
Vue.component('mk-home', home);
|
||||
|
|
@ -70,16 +57,3 @@ Vue.component('mk-followers', followers);
|
|||
Vue.component('mk-following', following);
|
||||
Vue.component('mk-users-list', usersList);
|
||||
Vue.component('mk-widget-container', widgetContainer);
|
||||
|
||||
//#region widgets
|
||||
Vue.component('mkw-notifications', wNotifications);
|
||||
Vue.component('mkw-timemachine', wTimemachine);
|
||||
Vue.component('mkw-activity', wActivity);
|
||||
Vue.component('mkw-trends', wTrends);
|
||||
Vue.component('mkw-users', wUsers);
|
||||
Vue.component('mkw-polls', wPolls);
|
||||
Vue.component('mkw-post-form', wPostForm);
|
||||
Vue.component('mkw-messaging', wMessaging);
|
||||
Vue.component('mkw-channel', wChannel);
|
||||
Vue.component('mkw-profile', wProfile);
|
||||
//#endregion
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../../common/define-widget';
|
||||
import define from '../../../common/define-widget';
|
||||
export default define({
|
||||
name: 'activity',
|
||||
props: () => ({
|
||||
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import ChannelStream from '../../../../common/scripts/streaming/channel-stream';
|
||||
import ChannelStream from '../../../common/scripts/streaming/channel-stream';
|
||||
import XForm from './channel.channel.form.vue';
|
||||
import XPost from './channel.channel.post.vue';
|
||||
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../../common/define-widget';
|
||||
import define from '../../../common/define-widget';
|
||||
import XChannel from './channel.channel.vue';
|
||||
|
||||
export default define({
|
||||
23
src/web/app/desktop/views/widgets/index.ts
Normal file
23
src/web/app/desktop/views/widgets/index.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
import Vue from 'vue';
|
||||
|
||||
import wNotifications from './notifications.vue';
|
||||
import wTimemachine from './timemachine.vue';
|
||||
import wActivity from './activity.vue';
|
||||
import wTrends from './trends.vue';
|
||||
import wUsers from './users.vue';
|
||||
import wPolls from './polls.vue';
|
||||
import wPostForm from './post-form.vue';
|
||||
import wMessaging from './messaging.vue';
|
||||
import wChannel from './channel.vue';
|
||||
import wProfile from './profile.vue';
|
||||
|
||||
Vue.component('mkw-notifications', wNotifications);
|
||||
Vue.component('mkw-timemachine', wTimemachine);
|
||||
Vue.component('mkw-activity', wActivity);
|
||||
Vue.component('mkw-trends', wTrends);
|
||||
Vue.component('mkw-users', wUsers);
|
||||
Vue.component('mkw-polls', wPolls);
|
||||
Vue.component('mkw-post-form', wPostForm);
|
||||
Vue.component('mkw-messaging', wMessaging);
|
||||
Vue.component('mkw-channel', wChannel);
|
||||
Vue.component('mkw-profile', wProfile);
|
||||
|
|
@ -6,8 +6,8 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../../common/define-widget';
|
||||
import MkMessagingRoomWindow from '../messaging-room-window.vue';
|
||||
import define from '../../../common/define-widget';
|
||||
import MkMessagingRoomWindow from '../components/messaging-room-window.vue';
|
||||
|
||||
export default define({
|
||||
name: 'messaging',
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../../common/define-widget';
|
||||
import define from '../../../common/define-widget';
|
||||
export default define({
|
||||
name: 'notifications',
|
||||
props: () => ({
|
||||
|
|
@ -15,7 +15,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../../common/define-widget';
|
||||
import define from '../../../common/define-widget';
|
||||
export default define({
|
||||
name: 'polls',
|
||||
props: () => ({
|
||||
|
|
@ -9,7 +9,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../../common/define-widget';
|
||||
import define from '../../../common/define-widget';
|
||||
export default define({
|
||||
name: 'post-form',
|
||||
props: () => ({
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../../common/define-widget';
|
||||
import define from '../../../common/define-widget';
|
||||
export default define({
|
||||
name: 'profile',
|
||||
props: () => ({
|
||||
|
|
@ -5,7 +5,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../../common/define-widget';
|
||||
import define from '../../../common/define-widget';
|
||||
export default define({
|
||||
name: 'timemachine',
|
||||
props: () => ({
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../../common/define-widget';
|
||||
import define from '../../../common/define-widget';
|
||||
export default define({
|
||||
name: 'trends',
|
||||
props: () => ({
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../../common/define-widget';
|
||||
import define from '../../../common/define-widget';
|
||||
|
||||
const limit = 3;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue