mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +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 = () => {
|
||||
router.push({ name: 'game', params: { questId: 'helloworld' } })
|
||||
router.push({ name: 'map' })
|
||||
}
|
||||
|
||||
const error = (err) => {
|
||||
|
||||
@@ -20,12 +20,16 @@
|
||||
重來
|
||||
</p>
|
||||
</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
|
||||
: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 -->
|
||||
繼續
|
||||
</p>
|
||||
@@ -34,10 +38,22 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router'
|
||||
import { useToast } from 'vue-toastification'
|
||||
import { createSession } from '../store/session'
|
||||
|
||||
const router = useRouter()
|
||||
const reset = async () => {
|
||||
console.log('resetting...')
|
||||
await createSession()
|
||||
}
|
||||
const continuePlay = async () => {
|
||||
try {
|
||||
router.push({ name: 'map' })
|
||||
} catch (err) {
|
||||
// useToast().error('Failed to load map')
|
||||
useToast().error('無法讀取地圖')
|
||||
console.error(err)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -15,7 +15,17 @@ const handleLogout = async () => {
|
||||
reset()
|
||||
router.push({ name: 'login' })
|
||||
} 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)
|
||||
}
|
||||
}
|
||||
@@ -65,6 +75,12 @@ const handleLogout = async () => {
|
||||
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']"
|
||||
class="text-text-primary h-full w-full"
|
||||
/>
|
||||
</button>
|
||||
<a
|
||||
title="Bug Report"
|
||||
:href="bugReportUrl"
|
||||
|
||||
@@ -15,6 +15,7 @@ import {
|
||||
faArrowRight,
|
||||
faBug,
|
||||
faCircleExclamation,
|
||||
faMap,
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
import {
|
||||
faLightbulb,
|
||||
@@ -36,6 +37,7 @@ library.add(
|
||||
faArrowRightFromBracket,
|
||||
faArrowRight,
|
||||
faBug,
|
||||
faMap,
|
||||
faCircleExclamation,
|
||||
faLightbulb,
|
||||
faCircleQuestion,
|
||||
|
||||
Reference in new issue
Block a user