|
1 | 1 | <template>
|
2 |
| - <div> |
3 |
| - <dialog |
4 |
| - className="modal mt-[-8vh]" |
5 |
| - :open="showModal" |
6 |
| - > |
7 |
| - <div className="modal-box max-w-[48rem]"> |
8 |
| - <div class="relative"> |
9 |
| - <h3 className="font-bold text-lg mb-4">🎉 Congratulations!</h3> |
10 |
| - <button |
11 |
| - tabindex="0" |
12 |
| - class="btn btn-ghost btn-sm absolute right-0 top-0 mx-1 h-7 w-7 rounded-md p-0" |
13 |
| - @click="soundSentence" |
14 |
| - > |
15 |
| - <span class="i-ph-speaker-simple-high h-full w-full"></span> |
16 |
| - </button> |
17 |
| - </div> |
| 2 | + <CommonModal :show-modal="showModal"> |
| 3 | + <div className="modal-box max-w-[48rem]"> |
| 4 | + <div class="relative"> |
| 5 | + <h3 className="font-bold text-lg mb-4">🎉 Congratulations!</h3> |
| 6 | + <button |
| 7 | + tabindex="0" |
| 8 | + class="btn btn-ghost btn-sm absolute right-0 top-0 mx-1 h-7 w-7 rounded-md p-0" |
| 9 | + @click="soundSentence" |
| 10 | + > |
| 11 | + <span class="i-ph-speaker-simple-high h-full w-full"></span> |
| 12 | + </button> |
| 13 | + </div> |
18 | 14 |
|
19 |
| - <div class="flex flex-col"> |
20 |
| - <div class="flex"> |
21 |
| - <span class="text-6xl font-bold">"</span> |
22 |
| - <div class="flex-1 text-center text-xl leading-loose"> |
23 |
| - {{ enSentence }} |
24 |
| - </div> |
25 |
| - <span class="invisible text-6xl font-bold">"</span> |
| 15 | + <div class="flex flex-col"> |
| 16 | + <div class="flex"> |
| 17 | + <span class="text-6xl font-bold">"</span> |
| 18 | + <div class="flex-1 text-center text-xl leading-loose"> |
| 19 | + {{ enSentence }} |
26 | 20 | </div>
|
| 21 | + <span class="invisible text-6xl font-bold">"</span> |
| 22 | + </div> |
27 | 23 |
|
28 |
| - <div class="flex"> |
29 |
| - <span class="invisible text-6xl font-bold">"</span> |
30 |
| - <div class="flex-1 text-center text-xl leading-loose"> |
31 |
| - {{ zhSentence }} |
32 |
| - </div> |
33 |
| - <span class="text-6xl font-bold">"</span> |
| 24 | + <div class="flex"> |
| 25 | + <span class="invisible text-6xl font-bold">"</span> |
| 26 | + <div class="flex-1 text-center text-xl leading-loose"> |
| 27 | + {{ zhSentence }} |
34 | 28 | </div>
|
35 |
| - <p class="text-3 text-right text-gray-200">—— 金山词霸「每日一句」</p> |
36 |
| - <p class="pl-14 text-base leading-loose text-gray-600"> |
37 |
| - {{ |
38 |
| - `恭喜您一共完成 ${courseTimer.totalRecordNumber()} 道题,用时 ${formatSecondsToTime( |
39 |
| - courseTimer.calculateTotalTime(), |
40 |
| - )} ` |
41 |
| - }} |
42 |
| - </p> |
43 |
| - </div> |
44 |
| - <div className="modal-action"> |
45 |
| - <button |
46 |
| - class="btn btn-primary" |
47 |
| - @click="toShare" |
48 |
| - > |
49 |
| - 生成打卡图 |
50 |
| - </button> |
51 |
| - <button |
52 |
| - class="btn" |
53 |
| - @click="handleDoAgain" |
54 |
| - > |
55 |
| - 再来一次 |
56 |
| - </button> |
57 |
| - |
58 |
| - <button |
59 |
| - class="btn" |
60 |
| - @click="goToNextCourse" |
61 |
| - > |
62 |
| - {{ haveNextCourse || !isAuthenticated() ? "开始下一课" : "返回课程列表" }} |
63 |
| - <kbd class="kbd"> ↵ </kbd> |
64 |
| - </button> |
| 29 | + <span class="text-6xl font-bold">"</span> |
65 | 30 | </div>
|
| 31 | + <p class="text-3 text-right text-gray-200">—— 金山词霸「每日一句」</p> |
| 32 | + <p class="pl-14 text-base leading-loose text-gray-600"> |
| 33 | + {{ |
| 34 | + `恭喜您一共完成 ${courseTimer.totalRecordNumber()} 道题,用时 ${formatSecondsToTime( |
| 35 | + courseTimer.calculateTotalTime(), |
| 36 | + )} ` |
| 37 | + }} |
| 38 | + </p> |
| 39 | + </div> |
| 40 | + <div className="modal-action"> |
| 41 | + <button |
| 42 | + class="btn btn-primary" |
| 43 | + @click="toShare" |
| 44 | + > |
| 45 | + 生成打卡图 |
| 46 | + </button> |
| 47 | + <button |
| 48 | + class="btn" |
| 49 | + @click="handleDoAgain" |
| 50 | + > |
| 51 | + 再来一次 |
| 52 | + </button> |
| 53 | + |
| 54 | + <button |
| 55 | + class="btn" |
| 56 | + @click="goToNextCourse" |
| 57 | + > |
| 58 | + {{ haveNextCourse || !isAuthenticated() ? "开始下一课" : "返回课程列表" }} |
| 59 | + <kbd class="kbd"> ↵ </kbd> |
| 60 | + </button> |
66 | 61 | </div>
|
67 |
| - <canvas |
68 |
| - ref="confettiCanvasRef" |
69 |
| - class="pointer-events-none absolute left-0 top-0 h-full w-full" |
70 |
| - ></canvas> |
71 |
| - </dialog> |
72 |
| - </div> |
| 62 | + </div> |
| 63 | + <canvas |
| 64 | + ref="confettiCanvasRef" |
| 65 | + class="pointer-events-none absolute left-0 top-0 h-full w-full" |
| 66 | + ></canvas> |
| 67 | + </CommonModal> |
73 | 68 | </template>
|
74 | 69 |
|
75 | 70 | <script setup lang="ts">
|
|
0 commit comments