mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-05 19:20:12 +08:00
Add map(header),continue to map,login direct - map
This commit is contained in:
1 parent
bdd37ae747
commit
174941a37e
4 files changed
+39
-5
No files matched your search
@@ -41,7 +41,7 @@ const hasSocialLogins = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const success = () => {
|
const success = () => {
|
||||||
router.push({ name: 'game', params: { questId: 'helloworld' } })
|
router.push({ name: 'map' })
|
||||||
}
|
}
|
||||||
|
|
||||||
const error = (err) => {
|
const error = (err) => {
|
||||||
|
|||||||
@@ -20,12 +20,16 @@
|
|||||||
重來
|
重來
|
||||||
</p>
|
</p>
|
||||||
</button>
|
</button>
|
||||||
<button id="continue" class="bg-bg-disabled rounded-lg p-2">
|
<button
|
||||||
|
id="continue"
|
||||||
|
class="bg-bg-secondary rounded-lg p-2"
|
||||||
|
@click="continuePlay"
|
||||||
|
>
|
||||||
<font-awesome-icon
|
<font-awesome-icon
|
||||||
:icon="['far', 'circle-right']"
|
:icon="['far', 'circle-right']"
|
||||||
class="text-text-disabled"
|
class="text-text-primary"
|
||||||
/>
|
/>
|
||||||
<p class="text-text-disabled inline ml-1">
|
<p class="text-text-primary inline ml-1">
|
||||||
<!-- Continue -->
|
<!-- Continue -->
|
||||||
繼續
|
繼續
|
||||||
</p>
|
</p>
|
||||||
@@ -34,10 +38,22 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
|
import { useToast } from 'vue-toastification'
|
||||||
import { createSession } from '../store/session'
|
import { createSession } from '../store/session'
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
const reset = async () => {
|
const reset = async () => {
|
||||||
console.log('resetting...')
|
console.log('resetting...')
|
||||||
await createSession()
|
await createSession()
|
||||||
}
|
}
|
||||||
|
const continuePlay = async () => {
|
||||||
|
try {
|
||||||
|
router.push({ name: 'map' })
|
||||||
|
} catch (err) {
|
||||||
|
// useToast().error('Failed to load map')
|
||||||
|
useToast().error('無法讀取地圖')
|
||||||
|
console.error(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -15,7 +15,17 @@ const handleLogout = async () => {
|
|||||||
reset()
|
reset()
|
||||||
router.push({ name: 'login' })
|
router.push({ name: 'login' })
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
toast.error('Failed to logout')
|
// toast.error('Failed to logout')
|
||||||
|
toast.error('登出失敗')
|
||||||
|
console.error(err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const handleMap = async () => {
|
||||||
|
try {
|
||||||
|
router.push({ name: 'map' })
|
||||||
|
} catch (err) {
|
||||||
|
// toast.error('Failed to load map')
|
||||||
|
toast.error('無法讀取地圖')
|
||||||
console.error(err)
|
console.error(err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -65,6 +75,12 @@ const handleLogout = async () => {
|
|||||||
class="text-text-primary h-full w-full"
|
class="text-text-primary h-full w-full"
|
||||||
/>
|
/>
|
||||||
</button> -->
|
</button> -->
|
||||||
|
<button title="Map" @click="handleMap" class="h-5 w-5">
|
||||||
|
<font-awesome-icon
|
||||||
|
:icon="['fas', 'map']"
|
||||||
|
class="text-text-primary h-full w-full"
|
||||||
|
/>
|
||||||
|
</button>
|
||||||
<a
|
<a
|
||||||
title="Bug Report"
|
title="Bug Report"
|
||||||
:href="bugReportUrl"
|
:href="bugReportUrl"
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import {
|
|||||||
faArrowRight,
|
faArrowRight,
|
||||||
faBug,
|
faBug,
|
||||||
faCircleExclamation,
|
faCircleExclamation,
|
||||||
|
faMap,
|
||||||
} from '@fortawesome/free-solid-svg-icons'
|
} from '@fortawesome/free-solid-svg-icons'
|
||||||
import {
|
import {
|
||||||
faLightbulb,
|
faLightbulb,
|
||||||
@@ -36,6 +37,7 @@ library.add(
|
|||||||
faArrowRightFromBracket,
|
faArrowRightFromBracket,
|
||||||
faArrowRight,
|
faArrowRight,
|
||||||
faBug,
|
faBug,
|
||||||
|
faMap,
|
||||||
faCircleExclamation,
|
faCircleExclamation,
|
||||||
faLightbulb,
|
faLightbulb,
|
||||||
faCircleQuestion,
|
faCircleQuestion,
|
||||||
|
|||||||
Reference in new issue
Block a user