Merge branch 'main' into quest

This commit is contained in:
Lin, Hung-Shin authored and GitHub committed 2023-11-23 23:40:03 +08:00
commit 93e2485dee
18 files changed
+315 -29

No files matched your search

+10 -2
View File
@@ -1,3 +1,4 @@
<!-- eslint-disable no-console -->
<script setup>
import { ref, onMounted } from 'vue'
import { useRouter } from 'vue-router'
@@ -34,6 +35,7 @@ async function getQuests() {
return res.data
} catch (err) {
console.error(err)
throw err
}
}
@@ -93,9 +95,15 @@ const genOption = (nodes, edges) => ({
itemStyle: {
color: (params) => {
const {
data: { completed },
data: { completed, unlocked },
} = params
return completed ? '#ADADB5' : '#454552'
if (completed) {
return '#00ff00'
}
if (unlocked) {
return '#ADADB5'
}
return '454552'
},
},
},