summaryrefslogtreecommitdiff
path: root/packages/frontend/src/widgets/WidgetUserList.vue
diff options
context:
space:
mode:
Diffstat (limited to 'packages/frontend/src/widgets/WidgetUserList.vue')
-rw-r--r--packages/frontend/src/widgets/WidgetUserList.vue17
1 files changed, 9 insertions, 8 deletions
diff --git a/packages/frontend/src/widgets/WidgetUserList.vue b/packages/frontend/src/widgets/WidgetUserList.vue
index a0d460c704..4f3ce1c8c5 100644
--- a/packages/frontend/src/widgets/WidgetUserList.vue
+++ b/packages/frontend/src/widgets/WidgetUserList.vue
@@ -24,6 +24,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</template>
<script lang="ts" setup>
+import { ref } from 'vue';
import { useWidgetPropsManager, Widget, WidgetComponentEmits, WidgetComponentExpose, WidgetComponentProps } from './widget.js';
import { GetFormResultType } from '@/scripts/form.js';
import MkContainer from '@/components/MkContainer.vue';
@@ -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;
});
});
};