diff --git a/app/src/components/QuestMap.vue b/app/src/components/QuestMap.vue index 1a1bd5d..75cdc42 100644 --- a/app/src/components/QuestMap.vue +++ b/app/src/components/QuestMap.vue @@ -1,32 +1,218 @@ @@ -44,7 +230,7 @@ import api from '../utils/api' import { NodeImage } from '../img/svg.js' const marginX = 100 -const marginY = 70 +const marginY = 65 const chartContainer = ref(null) let chartInstance = null @@ -63,6 +249,7 @@ async function getQuests() { async function getProgress() { try { const res = await api.get('/users/me') + console.log(res.data.progress) return res.data.progress } catch (err) { console.error(err) @@ -86,10 +273,10 @@ const genOption = (nodes, edges) => ({ roam: true, label: { show: true, - fontSize: 20, + fontSize: 22, }, - edgeSymbol: ['circle', 'arrow'], - edgeSymbolSize: [5, 12], + edgeSymbol: ['pin', 'arrow'], + edgeSymbolSize: [2, 15], edgeLabel: { fontSize: 25, }, @@ -99,9 +286,21 @@ const genOption = (nodes, edges) => ({ lineStyle: { opacity: 4, width: 3, - curveness: 0, + curveness: 0.08, + }, + itemStyle: { + color: (params) => { + const { + data: { completed }, + } = params + switch (completed) { + case true: + return '#ADADB5' + default: + return '#454552' + } + }, }, - itemStyle: { color: '#454552' }, }, ], }) diff --git a/app/src/views/QuestMapPage.vue b/app/src/views/QuestMapPage.vue index 31a07f0..63ea9b6 100644 --- a/app/src/views/QuestMapPage.vue +++ b/app/src/views/QuestMapPage.vue @@ -1,16 +1,15 @@