Add addressbar
This commit is contained in:
@@ -6,12 +6,11 @@ import navigationAppendItems from './components/navigation/navigationAppendItems
|
|||||||
import navigationPrependItems from './components/navigation/navigationPrependItems.vue';
|
import navigationPrependItems from './components/navigation/navigationPrependItems.vue';
|
||||||
import { usePreferencesStore } from './data/stores/preferencesStore';
|
import { usePreferencesStore } from './data/stores/preferencesStore';
|
||||||
import { useFeedbackStore } from './data/stores/feedbackStore';
|
import { useFeedbackStore } from './data/stores/feedbackStore';
|
||||||
import { useShoppingStore } from './data/stores/shoppingStore';
|
|
||||||
import footerItems from './components/navigation/footerItems.vue';
|
import footerItems from './components/navigation/footerItems.vue';
|
||||||
|
import urlBar from './components/navigation/urlBar.vue';
|
||||||
|
|
||||||
const preferencesStore = usePreferencesStore()
|
const preferencesStore = usePreferencesStore()
|
||||||
const feedbackStore = useFeedbackStore()
|
const feedbackStore = useFeedbackStore()
|
||||||
const shoppingStore = useShoppingStore()
|
|
||||||
const theme = useTheme()
|
const theme = useTheme()
|
||||||
|
|
||||||
theme.global.name.value = preferencesStore.theme
|
theme.global.name.value = preferencesStore.theme
|
||||||
@@ -25,6 +24,8 @@ watch(() => preferencesStore.language, () => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<v-app>
|
<v-app>
|
||||||
|
<url-bar />
|
||||||
|
|
||||||
<v-app-bar
|
<v-app-bar
|
||||||
height="80"
|
height="80"
|
||||||
color="primary"
|
color="primary"
|
||||||
|
|||||||
62
software/src/components/navigation/urlBar.vue
Normal file
62
software/src/components/navigation/urlBar.vue
Normal 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>
|
||||||
Reference in New Issue
Block a user