feat: footer
This commit is contained in:
@@ -135,9 +135,50 @@
|
|||||||
</q-page-container>
|
</q-page-container>
|
||||||
|
|
||||||
</q-layout>
|
</q-layout>
|
||||||
|
|
||||||
|
<q-layout view="hHh lpR fFf">
|
||||||
|
<q-footer bordered class="bg-grey-2 text-dark">
|
||||||
|
<q-toolbar class="justify-around">
|
||||||
|
<q-btn flat round icon="settings" @click="onSettingsClick" />
|
||||||
|
<q-btn flat round icon="sports_esports" @click="onGameClick" />
|
||||||
|
<q-btn flat round icon="menu_book" @click="onRulesClick" />
|
||||||
|
</q-toolbar>
|
||||||
|
</q-footer>
|
||||||
|
</q-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
import { LocalStorage } from 'quasar'
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
const drawer = ref(false)
|
const drawer = ref(false)
|
||||||
|
|
||||||
|
function onSettingsClick () {
|
||||||
|
const path = route.fullPath
|
||||||
|
if (path != "/user/settings" && path != "/rules") {
|
||||||
|
LocalStorage.setItem('returnPath', path)
|
||||||
|
}
|
||||||
|
|
||||||
|
router.push("/user/settings")
|
||||||
|
}
|
||||||
|
function onGameClick () {
|
||||||
|
const path = LocalStorage.getItem('returnPath', route.fullPath)
|
||||||
|
if (path) {
|
||||||
|
router.push(path)
|
||||||
|
} else {
|
||||||
|
router.push("/")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function onRulesClick () {
|
||||||
|
const path = route.fullPath
|
||||||
|
if (path != "/user/settings" && path != "/rules") {
|
||||||
|
LocalStorage.setItem('returnPath', path)
|
||||||
|
}
|
||||||
|
router.push("/rules")
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user