1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-18 10:45:48 +02:00

Merge branch 'develop' into vue3

This commit is contained in:
syuilo
2020-08-19 22:15:04 +09:00
119 changed files with 3454 additions and 640 deletions

View File

@@ -8,7 +8,8 @@ export default function <T extends Form>(data: {
return defineComponent({
props: {
widget: {
type: Object
type: Object,
required: false
},
isCustomizeMode: {
type: Boolean,
@@ -18,11 +19,11 @@ export default function <T extends Form>(data: {
computed: {
id(): string {
return this.widget.id;
return this.widget ? this.widget.id : null;
},
props(): Record<string, any> {
return this.widget.data;
return this.widget ? this.widget.data : {};
}
},
@@ -61,7 +62,9 @@ export default function <T extends Form>(data: {
},
save() {
this.$store.commit('deviceUser/updateWidget', this.widget);
if (this.widget) {
this.$store.commit('deviceUser/updateWidget', this.widget);
}
}
}
});

View File

@@ -1,5 +1,5 @@
<template>
<mk-container :show-header="props.showHeader">
<mk-container :show-header="props.showHeader" :body-togglable="bodyTogglable" :scrollable="scrollable">
<template #header><fa :icon="faGlobe"/>{{ $t('_widgets.federation') }}</template>
<div class="wbrkwalb">
@@ -40,6 +40,18 @@ export default defineComponent({
components: {
MkContainer, MkMiniChart
},
props: {
bodyTogglable: {
type: Boolean,
required: false,
default: false
},
scrollable: {
type: Boolean,
required: false,
default: false
},
},
data() {
return {
instances: [],