Skip to content

Commit

Permalink
feat: add loading when process mails (#364)
Browse files Browse the repository at this point in the history
  • Loading branch information
dreamhunter2333 authored Jul 27, 2024
1 parent 5faae87 commit b57d462
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/src/components/MailBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ const refresh = async () => {
const { results, count: totalCount } = await props.fetchMailData(
pageSize.value, (page.value - 1) * pageSize.value
);
loading.value = true;
data.value = await Promise.all(results.map(async (item) => {
item.checked = false;
return await processItem(item);
Expand All @@ -161,6 +162,8 @@ const refresh = async () => {
} catch (error) {
message.error(error.message || "error");
console.error(error);
} finally {
loading.value = false;
}
};
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/views/telegram/Mail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@ const fetchMailData = async () => {
mailId: route.query.mail_id
})
});
loading.value = true;
return await processItem(res);
}
catch (error) {
console.error(error);
return {};
}
finally {
loading.value = false;
}
};
onMounted(async () => {
Expand Down
4 changes: 4 additions & 0 deletions vitepress-docs/docs/zh/guide/ui/d1.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@

创建完成后,我们在 cloudflare 的控制台可以看到 D1 数据库

::: warning 注意
下面输入的是 `db/schema.sql` 的内容
:::

打开 `Console` 标签页,输入 `db/schema.sql` 的内容,点击 `Execute` 执行

![d1](/ui_install/d1-exec.png)
Expand Down

0 comments on commit b57d462

Please sign in to comment.