Add addressbar

This commit is contained in:
2024-10-17 19:10:21 +02:00
parent 41106a8686
commit 59470f5396
2 changed files with 65 additions and 2 deletions

View File

@@ -6,12 +6,11 @@ import navigationAppendItems from './components/navigation/navigationAppendItems
import navigationPrependItems from './components/navigation/navigationPrependItems.vue';
import { usePreferencesStore } from './data/stores/preferencesStore';
import { useFeedbackStore } from './data/stores/feedbackStore';
import { useShoppingStore } from './data/stores/shoppingStore';
import footerItems from './components/navigation/footerItems.vue';
import urlBar from './components/navigation/urlBar.vue';
const preferencesStore = usePreferencesStore()
const feedbackStore = useFeedbackStore()
const shoppingStore = useShoppingStore()
const theme = useTheme()
theme.global.name.value = preferencesStore.theme
@@ -25,6 +24,8 @@ watch(() => preferencesStore.language, () => {
<template>
<v-app>
<url-bar />
<v-app-bar
height="80"
color="primary"

View File

@@ -0,0 +1,62 @@
<script setup lang="ts">
import { ref, watch } from 'vue';
import { useRouter } from 'vue-router';
const router = useRouter()
const path = ref(router.currentRoute.value.fullPath)
function navigate() {
router.replace({ path: path.value.substring(path.value.indexOf('.com') + 4) })
}
watch(() => router.currentRoute.value.fullPath, () => {
path.value = "https://www.eventmaster.com" + router.currentRoute.value.fullPath
})
</script>
<template>
<v-app-bar
elevation="0"
height="50"
>
<v-row>
<v-col></v-col>
<v-col cols="auto" class="d-flex justify-start align-center">
<v-btn
density="comfortable"
icon="mdi-arrow-left"
@click="router.go(-1)"
/>
<v-btn
density="comfortable"
icon="mdi-arrow-right"
@click="router.go(1)"
/>
<v-btn
density="comfortable"
icon="mdi-refresh"
@click="router.replace({ path: router.currentRoute.value.fullPath })"
/>
</v-col>
<v-col cols="8">
<v-text-field
variant="outlined"
density="compact"
hide-details
@keyup.enter="navigate"
v-model="path"
/>
</v-col>
<v-col cols="2" class="d-flex justify-start align-center">
<v-btn
density="comfortable"
icon="mdi-arrow-right"
@click="navigate"
/>
</v-col>
</v-row>
</v-app-bar>
</template>