Skip to content
This repository was archived by the owner on Oct 15, 2025. It is now read-only.

Commit cd6b1a3

Browse files
committed
refactor(challenge): Add loading to deferred result
1 parent 32cc177 commit cd6b1a3

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<p {{ attributes }}>
2-
<strong>輸出格式:</strong>欄位順序分別為<code>{{
2+
<strong>輸出格式:</strong>欄位順序分別為 <code>{{
33
this.columnsOfAnswer|joinToQuoted('')
44
}}</code>。
55
</p>
6+
7+
{% macro placeholder(props) %}
8+
<p>
9+
<strong>輸出格式:</strong>欄位順序分別為
10+
</p>
11+
{% endmacro %}

templates/components/Challenge/Tabs/DiffPresenter.html.twig

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,10 @@
171171
</div>
172172
{% endif %}
173173
</div>
174+
175+
{% macro placeholder(props) %}
176+
<div class="alert alert-info d-flex gap-3 align-items-center">
177+
<div class="spinner-grow" role="status" aria-hidden="true"></div>
178+
<div>正在進行比較⋯⋯</div>
179+
</div>
180+
{% endmacro %}

templates/components/Challenge/Tabs/UserQueryResult.html.twig

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@
1616
{% endif %}
1717

1818
{% if result is not null and result.result %}
19-
<twig:Challenge:Tabs:QueryResultTable :result="result.result" />
19+
<twig:Challenge:Tabs:QueryResultTable :result="result.result"/>
2020
{% endif %}
2121
</div>
22+
23+
{% macro placeholder(props) %}
24+
<div class="alert alert-info d-flex gap-3 align-items-center">
25+
<div class="spinner-grow" role="status" aria-hidden="true"></div>
26+
<div>正在取回答案⋯⋯</div>
27+
</div>
28+
{% endmacro %}

0 commit comments

Comments
 (0)