wip
This commit is contained in:
parent
283c64e6f1
commit
61b95e0c26
11 changed files with 179 additions and 121 deletions
|
|
@ -13,6 +13,12 @@ import uploader from './uploader.vue';
|
|||
import specialMessage from './special-message.vue';
|
||||
import streamIndicator from './stream-indicator.vue';
|
||||
import ellipsis from './ellipsis.vue';
|
||||
import wNav from './widgets/nav.vue';
|
||||
import wCalendar from './widgets/calendar.vue';
|
||||
import wPhotoStream from './widgets/photo-stream.vue';
|
||||
import wSlideshow from './widgets/slideshow.vue';
|
||||
import wTips from './widgets/tips.vue';
|
||||
import wDonation from './widgets/donation.vue';
|
||||
|
||||
Vue.component('mk-signin', signin);
|
||||
Vue.component('mk-signup', signup);
|
||||
|
|
@ -27,3 +33,9 @@ Vue.component('mk-uploader', uploader);
|
|||
Vue.component('mk-special-message', specialMessage);
|
||||
Vue.component('mk-stream-indicator', streamIndicator);
|
||||
Vue.component('mk-ellipsis', ellipsis);
|
||||
Vue.component('mkw-nav', wNav);
|
||||
Vue.component('mkw-calendar', wCalendar);
|
||||
Vue.component('mkw-photo-stream', wPhotoStream);
|
||||
Vue.component('mkw-slideshoe', wSlideshow);
|
||||
Vue.component('mkw-tips', wTips);
|
||||
Vue.component('mkw-donation', wDonation);
|
||||
|
|
|
|||
|
|
@ -1,59 +0,0 @@
|
|||
<template>
|
||||
<div class="mkw-messaging">
|
||||
<p class="title" v-if="props.design == 0">%fa:comments%%i18n:desktop.tags.mk-messaging-home-widget.title%</p>
|
||||
<mk-messaging ref="index" compact @navigate="navigate"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import define from '../../../define-widget';
|
||||
export default define({
|
||||
name: 'messaging',
|
||||
props: {
|
||||
design: 0
|
||||
}
|
||||
}).extend({
|
||||
methods: {
|
||||
navigate(user) {
|
||||
if (this.platform == 'desktop') {
|
||||
this.wapi_openMessagingRoomWindow(user);
|
||||
} else {
|
||||
// TODO: open room page in new tab
|
||||
}
|
||||
},
|
||||
func() {
|
||||
if (this.props.design == 1) {
|
||||
this.props.design = 0;
|
||||
} else {
|
||||
this.props.design++;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.mkw-messaging
|
||||
overflow hidden
|
||||
background #fff
|
||||
border solid 1px rgba(0, 0, 0, 0.075)
|
||||
border-radius 6px
|
||||
|
||||
> .title
|
||||
z-index 2
|
||||
margin 0
|
||||
padding 0 16px
|
||||
line-height 42px
|
||||
font-size 0.9em
|
||||
font-weight bold
|
||||
color #888
|
||||
box-shadow 0 1px rgba(0, 0, 0, 0.07)
|
||||
|
||||
> [data-fa]
|
||||
margin-right 4px
|
||||
|
||||
> .mk-messaging
|
||||
max-height 250px
|
||||
overflow auto
|
||||
|
||||
</style>
|
||||
|
|
@ -44,7 +44,7 @@ export default define({
|
|||
this.$root.$data.os.stream.dispose(this.connectionId);
|
||||
},
|
||||
methods: {
|
||||
onStreamDriveFileCreated(file) {
|
||||
onDriveFileCreated(file) {
|
||||
if (/^image\/.+$/.test(file.type)) {
|
||||
this.images.unshift(file);
|
||||
if (this.images.length > 9) this.images.pop();
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ export default define({
|
|||
});
|
||||
},
|
||||
choose() {
|
||||
this.wapi_selectDriveFolder().then(folder => {
|
||||
this.$root.$data.api.chooseDriveFolder().then(folder => {
|
||||
this.props.folder = folder ? folder.id : null;
|
||||
this.fetch();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue