wip
This commit is contained in:
parent
249fdc1b5d
commit
910edf7c5f
|
@ -2,6 +2,18 @@ import Vue from 'vue';
|
||||||
|
|
||||||
import ui from './ui.vue';
|
import ui from './ui.vue';
|
||||||
import home from './home.vue';
|
import home from './home.vue';
|
||||||
|
import timeline from './timeline.vue';
|
||||||
|
import timelinePost from './timeline-post.vue';
|
||||||
|
import timelinePostSub from './timeline-post-sub.vue';
|
||||||
|
import subPostContent from './sub-post-content.vue';
|
||||||
|
import window from './window.vue';
|
||||||
|
import postFormWindow from './post-form-window.vue';
|
||||||
|
|
||||||
Vue.component('mk-ui', ui);
|
Vue.component('mk-ui', ui);
|
||||||
Vue.component('mk-home', home);
|
Vue.component('mk-home', home);
|
||||||
|
Vue.component('mk-timeline', timeline);
|
||||||
|
Vue.component('mk-timeline-post', timelinePost);
|
||||||
|
Vue.component('mk-timeline-post-sub', timelinePostSub);
|
||||||
|
Vue.component('mk-sub-post-content', subPostContent);
|
||||||
|
Vue.component('mk-window', window);
|
||||||
|
Vue.component('post-form-window', postFormWindow);
|
||||||
|
|
|
@ -18,13 +18,18 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="typescript">
|
<script lang="ts">
|
||||||
import dateStringify from '../../common/scripts/date-stringify';
|
import Vue from 'vue';
|
||||||
|
import dateStringify from '../../../common/scripts/date-stringify';
|
||||||
|
|
||||||
this.mixin('user-preview');
|
export default Vue.extend({
|
||||||
|
props: ['post'],
|
||||||
this.post = this.opts.post;
|
computed: {
|
||||||
this.title = dateStringify(this.post.created_at);
|
title(): string {
|
||||||
|
return dateStringify(this.post.created_at);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
|
|
|
@ -74,6 +74,8 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
import dateStringify from '../../../common/scripts/date-stringify';
|
import dateStringify from '../../../common/scripts/date-stringify';
|
||||||
|
import MkPostFormWindow from './post-form-window.vue';
|
||||||
|
import MkRepostFormWindow from './repost-form-window.vue';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['post'],
|
props: ['post'],
|
||||||
|
@ -162,6 +164,13 @@ export default Vue.extend({
|
||||||
reply: this.p
|
reply: this.p
|
||||||
}
|
}
|
||||||
}).$mount().$el);
|
}).$mount().$el);
|
||||||
|
},
|
||||||
|
repost() {
|
||||||
|
document.body.appendChild(new MkRepostFormWindow({
|
||||||
|
propsData: {
|
||||||
|
post: this.p
|
||||||
|
}
|
||||||
|
}).$mount().$el);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -169,11 +178,6 @@ export default Vue.extend({
|
||||||
|
|
||||||
<script lang="typescript">
|
<script lang="typescript">
|
||||||
|
|
||||||
this.repost = () => {
|
|
||||||
riot.mount(document.body.appendChild(document.createElement('mk-repost-form-window')), {
|
|
||||||
post: this.p
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
this.react = () => {
|
this.react = () => {
|
||||||
riot.mount(document.body.appendChild(document.createElement('mk-reaction-picker')), {
|
riot.mount(document.body.appendChild(document.createElement('mk-reaction-picker')), {
|
||||||
|
|
|
@ -63,7 +63,7 @@ export default Vue.extend({
|
||||||
default: 'auto'
|
default: 'auto'
|
||||||
},
|
},
|
||||||
popoutUrl: {
|
popoutUrl: {
|
||||||
type: String
|
type: [String, Function]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue