Compare commits

..
9 Commits
Author SHA1 Message Date
Lin, Hung-Shin eb9118d5b1 Quest update (#80) 2023-11-24 09:58:09 +08:00
Chen, Tai-Lin cfdf8730e8 fix error 2023-11-24 09:55:17 +08:00
Chen, Tai-Lin 6651071580 fix: error in quest read 2023-11-24 09:54:18 +08:00
Lin, Hung-Shin f30f6472f5 fix: error in quests (#79) 2023-11-24 09:51:33 +08:00
Chen, Tai-Lin 5ac3b3088d fix: error in create quest 2023-11-24 09:50:15 +08:00
Chen, Tai-Lin acc4d5acba fix: error in create quest 2023-11-24 09:48:41 +08:00
Chen, Tai-Lin 1fb43b78e3 fix: erro in quest explore 2023-11-24 09:46:06 +08:00
Lin, Hung-Shin b27adc1f69 Add survey and leaderboard button (#78)
Add survey and leaderboard button
2023-11-24 00:59:34 +08:00
Annie Huang 6f68107405 Add survey and 2023-11-24 00:58:03 +08:00
6 changed files with 56 additions and 18 deletions

No files matched your search

+14 -1
View File
@@ -1,5 +1,17 @@
<template>
<section class="h-[10%] p-3 grid grid-cols-3 gap-4 place-content-between">
<section class="h-[10%] p-3 grid grid-cols-4 gap-4 place-content-between">
<button id="survey" class="bg-bg-secondary rounded-lg p-2">
<a title="Survey" :href="surveyUrl" target="_blank" class="h-5 w-5">
<font-awesome-icon
:icon="['fas', 'file-invoice']"
class="text-text-primary"
/>
<p class="text-text-primary inline ml-1">
<!-- Survey -->
問卷
</p>
</a>
</button>
<button disabled id="solution" class="bg-bg-disabled rounded-lg p-2">
<font-awesome-icon
:icon="['far', 'circle-question']"
@@ -41,6 +53,7 @@
import { useRouter } from 'vue-router'
import { useToast } from 'vue-toastification'
import { createSession } from '../store/session'
import { surveyUrl } from '../config'
const router = useRouter()
const reset = async () => {
+22 -1
View File
@@ -3,7 +3,7 @@ import { defineProps, onMounted } from 'vue'
import { useRouter } from 'vue-router'
import { useToast } from 'vue-toastification'
import { logout } from '../utils/auth'
import { bugReportUrl } from '../config'
import { bugReportUrl, surveyUrl } from '../config'
import { reset } from '../store/session'
import userProfileStore, {
loadUserProfile,
@@ -35,6 +35,15 @@ const handleMap = async () => {
console.error(err)
}
}
const handleLeaderBoard = async () => {
try {
router.push({ name: 'leaderboard' })
} catch (err) {
// toast.error('Failed to load map')
toast.error('無法讀取排行榜')
console.error(err)
}
}
defineProps({
title: {
@@ -110,6 +119,18 @@ onMounted(async () => {
>
{{ userProfileStore.username }}
</p>
<a title="Survey" :href="surveyUrl" target="_blank" class="h-5 w-5">
<font-awesome-icon
:icon="['fas', 'file-invoice']"
class="text-text-primary h-full w-full"
/>
</a>
<button title="LeaderBoard" @click="handleLeaderBoard" class="h-5 w-5">
<font-awesome-icon
:icon="['fas', 'trophy']"
class="text-text-primary h-full w-full"
/>
</button>
<button title="Map" @click="handleMap" class="h-5 w-5">
<font-awesome-icon
:icon="['fas', 'map']"
+5 -1
View File
@@ -16,6 +16,8 @@ import {
faBug,
faCircleExclamation,
faMap,
faTrophy,
faFileInvoice,
} from '@fortawesome/free-solid-svg-icons'
import {
faLightbulb,
@@ -38,10 +40,12 @@ library.add(
faArrowRight,
faBug,
faMap,
faTrophy,
faCircleExclamation,
faLightbulb,
faCircleQuestion,
faCircleRight,
faGithub,
faGoogle
faGoogle,
faFileInvoice
)
+1 -1
View File
@@ -159,7 +159,7 @@ stages:
- ls-mkdir
condition:
pwd:
- notes
- ^/home/commander/notes$
responses:
- type: narrative
content:
+9 -9
View File
@@ -44,7 +44,7 @@ stages:
- condition:
not:
pwd:
- /home/commander
- ^/home/commander$
responses:
- type: narrative
content:
@@ -78,11 +78,11 @@ stages:
- ls
condition:
pwd:
- /home/commander/folder1
- ^/home/commander/folder1$
exceptions:
- condition:
pwd:
- /home/commander
- ^/home/commander$
responses:
- type: narrative
content:
@@ -90,7 +90,7 @@ stages:
- condition:
not:
pwd:
- /home/commander
- ^/home/commander$
responses:
- type: narrative
content:
@@ -113,7 +113,7 @@ stages:
- cd-folder1
condition:
pwd:
- /home/commander/folder1
- ^/home/commander/folder1$
command:
- ls
responses:
@@ -131,7 +131,7 @@ stages:
- ls-folder1
condition:
pwd:
- /home/commander
- ^/home/commander$
responses:
- content:
- 你成功的回到上一層資料夾了。
@@ -146,7 +146,7 @@ stages:
- cd-..
condition:
pwd:
- /home/commander/folder2
- ^/home/commander/folder2$
responses:
- content:
- 你成功的進入 `folder2` 資料夾了。
@@ -160,7 +160,7 @@ stages:
- cd-folder2
condition:
pwd:
- /home/commander/folder2
- ^/home/commander/folder2$
command:
- ls
responses:
@@ -176,7 +176,7 @@ stages:
- ls-folder2
condition:
pwd:
- /home/commander
- ^/home/commander$
responses:
- content:
- 你成功的回到原本的資料夾了。
+5 -5
View File
@@ -44,19 +44,19 @@ stages:
responses:
- content:
- 這個資料夾中有一個檔案和一個資料夾。
- 現在你可以使用 `cat` 指令來查看 `file.txt` 的內容。
- 現在你可以使用 `cat` 指令來查看 `file1.txt` 的內容。
hints:
- ➤ 請輸入 `cat file.txt` 來查看檔案的內容。
- ➤ 請輸入 `cat file1.txt` 來查看檔案的內容。
- id: cat-file
task: 查看 `file.txt` 的內容
- id: cat-file1
task: 查看 `file1.txt` 的內容
requirements:
- ls-~
condition:
pwd:
- ^/home/commander$
command:
- ^cat file.txt$
- ^cat file1.txt$
responses:
- content:
- 你應該能看到檔案的內容了。