merge: upstream

This commit is contained in:
Marie 2023-12-23 02:09:23 +01:00
commit 5db583a3eb
701 changed files with 50809 additions and 13660 deletions

View file

@ -24,7 +24,8 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
import { useWidgetPropsManager, Widget, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
import { ref } from 'vue';
import { useWidgetPropsManager, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
import { GetFormResultType } from '@/scripts/form.js';
import MkContainer from '@/components/MkContainer.vue';
import * as os from '@/os.js';
@ -57,9 +58,9 @@ const { widgetProps, configure, save } = useWidgetPropsManager(name,
emit,
);
let list = $ref();
let users = $ref([]);
let fetching = $ref(true);
const list = ref();
const users = ref([]);
const fetching = ref(true);
async function chooseList() {
const lists = await os.api('users/lists/list');
@ -79,19 +80,19 @@ async function chooseList() {
const fetch = () => {
if (widgetProps.listId == null) {
fetching = false;
fetching.value = false;
return;
}
os.api('users/lists/show', {
listId: widgetProps.listId,
}).then(_list => {
list = _list;
list.value = _list;
os.api('users/show', {
userIds: list.userIds,
userIds: list.value.userIds,
}).then(_users => {
users = _users;
fetching = false;
users.value = _users;
fetching.value = false;
});
});
};