feat(frontend): refine loading marker
This commit is contained in:
@@ -4,7 +4,7 @@ import { Button } from "./ui/Button";
|
|||||||
import { Card } from "./ui/Card";
|
import { Card } from "./ui/Card";
|
||||||
|
|
||||||
const CommandQueue: Component = () => {
|
const CommandQueue: Component = () => {
|
||||||
const [commands, { refetch }] = createResource(commandsApi.list);
|
const [commands, { refetch }] = createResource("unverified", commandsApi.list);
|
||||||
|
|
||||||
const updateCommandStatus = async (id: number, status: string) => {
|
const updateCommandStatus = async (id: number, status: string) => {
|
||||||
try {
|
try {
|
||||||
@@ -25,7 +25,7 @@ const CommandQueue: Component = () => {
|
|||||||
<h2 class="text-2xl font-semibold">Command Queue</h2>
|
<h2 class="text-2xl font-semibold">Command Queue</h2>
|
||||||
|
|
||||||
<Card>
|
<Card>
|
||||||
<Show when={!commands.loading} fallback={<div class="p-4">Loading...</div>}>
|
<Show when={!commands.loading} fallback={<div class="p-8 text-center text-gray-500">Loading...</div>}>
|
||||||
<For
|
<For
|
||||||
each={commands()}
|
each={commands()}
|
||||||
fallback={<div class="p-8 text-center text-gray-500">No commands in queue</div>}
|
fallback={<div class="p-8 text-center text-gray-500">No commands in queue</div>}
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ const RequestLogs: Component = () => {
|
|||||||
when={!logsData.loading}
|
when={!logsData.loading}
|
||||||
fallback={
|
fallback={
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="3" class="text-center py-4">
|
<td colspan="3" class="p-8 text-center text-gray-500">
|
||||||
Loading...
|
Loading...
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ const RulesList: Component = () => {
|
|||||||
when={!rules.loading}
|
when={!rules.loading}
|
||||||
fallback={
|
fallback={
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4" class="text-center py-4">
|
<td colspan="4" class="p-8 text-center text-gray-500">
|
||||||
Loading...
|
Loading...
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
Reference in New Issue
Block a user