mirror of
https://github.com/misskey-dev/misskey
synced 2024-06-26 04:17:54 +02:00
33 lines
611 B
HTML
33 lines
611 B
HTML
<mk-activity-home-widget>
|
|
<mk-activity-widget design={ data.design } view={ data.view } user={ I } ref="activity"/>
|
|
<style>
|
|
:scope
|
|
display block
|
|
</style>
|
|
<script>
|
|
this.data = {
|
|
view: 0,
|
|
design: 0
|
|
};
|
|
|
|
this.mixin('widget');
|
|
|
|
this.initializing = true;
|
|
|
|
this.on('mount', () => {
|
|
this.refs.activity.on('view-changed', view => {
|
|
this.data.view = view;
|
|
this.save();
|
|
});
|
|
});
|
|
|
|
this.func = () => {
|
|
if (++this.data.design == 3) this.data.design = 0;
|
|
this.refs.activity.update({
|
|
design: this.data.design
|
|
});
|
|
this.save();
|
|
};
|
|
</script>
|
|
</mk-activity-home-widget>
|