mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f30f6472f5 | ||
|
|
5ac3b3088d | ||
|
|
acc4d5acba | ||
|
|
1fb43b78e3 | ||
|
|
b27adc1f69 | ||
|
|
6f68107405 |
No files matched your search
@@ -1,5 +1,17 @@
|
|||||||
<template>
|
<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">
|
<button disabled id="solution" class="bg-bg-disabled rounded-lg p-2">
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
:icon="['far', 'circle-question']"
|
:icon="['far', 'circle-question']"
|
||||||
@@ -41,6 +53,7 @@
|
|||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useToast } from 'vue-toastification'
|
import { useToast } from 'vue-toastification'
|
||||||
import { createSession } from '../store/session'
|
import { createSession } from '../store/session'
|
||||||
|
import { surveyUrl } from '../config'
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const reset = async () => {
|
const reset = async () => {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import { defineProps, onMounted } from 'vue'
|
|||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useToast } from 'vue-toastification'
|
import { useToast } from 'vue-toastification'
|
||||||
import { logout } from '../utils/auth'
|
import { logout } from '../utils/auth'
|
||||||
import { bugReportUrl } from '../config'
|
import { bugReportUrl, surveyUrl } from '../config'
|
||||||
import { reset } from '../store/session'
|
import { reset } from '../store/session'
|
||||||
import userProfileStore, {
|
import userProfileStore, {
|
||||||
loadUserProfile,
|
loadUserProfile,
|
||||||
@@ -35,6 +35,15 @@ const handleMap = async () => {
|
|||||||
console.error(err)
|
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({
|
defineProps({
|
||||||
title: {
|
title: {
|
||||||
@@ -110,6 +119,18 @@ onMounted(async () => {
|
|||||||
>
|
>
|
||||||
{{ userProfileStore.username }}
|
{{ userProfileStore.username }}
|
||||||
</p>
|
</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">
|
<button title="Map" @click="handleMap" class="h-5 w-5">
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
:icon="['fas', 'map']"
|
:icon="['fas', 'map']"
|
||||||
|
|||||||
+5
-1
@@ -16,6 +16,8 @@ import {
|
|||||||
faBug,
|
faBug,
|
||||||
faCircleExclamation,
|
faCircleExclamation,
|
||||||
faMap,
|
faMap,
|
||||||
|
faTrophy,
|
||||||
|
faFileInvoice,
|
||||||
} from '@fortawesome/free-solid-svg-icons'
|
} from '@fortawesome/free-solid-svg-icons'
|
||||||
import {
|
import {
|
||||||
faLightbulb,
|
faLightbulb,
|
||||||
@@ -38,10 +40,12 @@ library.add(
|
|||||||
faArrowRight,
|
faArrowRight,
|
||||||
faBug,
|
faBug,
|
||||||
faMap,
|
faMap,
|
||||||
|
faTrophy,
|
||||||
faCircleExclamation,
|
faCircleExclamation,
|
||||||
faLightbulb,
|
faLightbulb,
|
||||||
faCircleQuestion,
|
faCircleQuestion,
|
||||||
faCircleRight,
|
faCircleRight,
|
||||||
faGithub,
|
faGithub,
|
||||||
faGoogle
|
faGoogle,
|
||||||
|
faFileInvoice
|
||||||
)
|
)
|
||||||
@@ -159,7 +159,7 @@ stages:
|
|||||||
- ls-mkdir
|
- ls-mkdir
|
||||||
condition:
|
condition:
|
||||||
pwd:
|
pwd:
|
||||||
- notes
|
- ^/home/commander/notes$
|
||||||
responses:
|
responses:
|
||||||
- type: narrative
|
- type: narrative
|
||||||
content:
|
content:
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ stages:
|
|||||||
- condition:
|
- condition:
|
||||||
not:
|
not:
|
||||||
pwd:
|
pwd:
|
||||||
- /home/commander
|
- ^/home/commander$
|
||||||
responses:
|
responses:
|
||||||
- type: narrative
|
- type: narrative
|
||||||
content:
|
content:
|
||||||
@@ -78,11 +78,11 @@ stages:
|
|||||||
- ls
|
- ls
|
||||||
condition:
|
condition:
|
||||||
pwd:
|
pwd:
|
||||||
- /home/commander/folder1
|
- ^/home/commander/folder1$
|
||||||
exceptions:
|
exceptions:
|
||||||
- condition:
|
- condition:
|
||||||
pwd:
|
pwd:
|
||||||
- /home/commander
|
- ^/home/commander$
|
||||||
responses:
|
responses:
|
||||||
- type: narrative
|
- type: narrative
|
||||||
content:
|
content:
|
||||||
@@ -90,7 +90,7 @@ stages:
|
|||||||
- condition:
|
- condition:
|
||||||
not:
|
not:
|
||||||
pwd:
|
pwd:
|
||||||
- /home/commander
|
- ^/home/commander$
|
||||||
responses:
|
responses:
|
||||||
- type: narrative
|
- type: narrative
|
||||||
content:
|
content:
|
||||||
@@ -113,7 +113,7 @@ stages:
|
|||||||
- cd-folder1
|
- cd-folder1
|
||||||
condition:
|
condition:
|
||||||
pwd:
|
pwd:
|
||||||
- /home/commander/folder1
|
- ^/home/commander/folder1$
|
||||||
command:
|
command:
|
||||||
- ls
|
- ls
|
||||||
responses:
|
responses:
|
||||||
@@ -131,7 +131,7 @@ stages:
|
|||||||
- ls-folder1
|
- ls-folder1
|
||||||
condition:
|
condition:
|
||||||
pwd:
|
pwd:
|
||||||
- /home/commander
|
- ^/home/commander$
|
||||||
responses:
|
responses:
|
||||||
- content:
|
- content:
|
||||||
- 你成功的回到上一層資料夾了。
|
- 你成功的回到上一層資料夾了。
|
||||||
@@ -146,7 +146,7 @@ stages:
|
|||||||
- cd-..
|
- cd-..
|
||||||
condition:
|
condition:
|
||||||
pwd:
|
pwd:
|
||||||
- /home/commander/folder2
|
- ^/home/commander/folder2$
|
||||||
responses:
|
responses:
|
||||||
- content:
|
- content:
|
||||||
- 你成功的進入 `folder2` 資料夾了。
|
- 你成功的進入 `folder2` 資料夾了。
|
||||||
@@ -160,7 +160,7 @@ stages:
|
|||||||
- cd-folder2
|
- cd-folder2
|
||||||
condition:
|
condition:
|
||||||
pwd:
|
pwd:
|
||||||
- /home/commander/folder2
|
- ^/home/commander/folder2$
|
||||||
command:
|
command:
|
||||||
- ls
|
- ls
|
||||||
responses:
|
responses:
|
||||||
@@ -176,7 +176,7 @@ stages:
|
|||||||
- ls-folder2
|
- ls-folder2
|
||||||
condition:
|
condition:
|
||||||
pwd:
|
pwd:
|
||||||
- /home/commander
|
- ^/home/commander$
|
||||||
responses:
|
responses:
|
||||||
- content:
|
- content:
|
||||||
- 你成功的回到原本的資料夾了。
|
- 你成功的回到原本的資料夾了。
|
||||||
|
|||||||
Reference in new issue
Block a user